Fixed MediaServer bug TC-2311 39/33839/1
authorAlice Liu <alice.liu@intel.com>
Thu, 15 Jan 2015 13:16:54 +0000 (21:16 +0800)
committerAlice Liu <alice.liu@intel.com>
Thu, 15 Jan 2015 13:19:24 +0000 (21:19 +0800)
Fixed MediaServer bug TC-2311 and added speechSynthesis
interface to Speech module.

Change-Id: I2fbc42b79892a7b30cc4fdff7ebc8dba72f4bc3b
Signed-off-by: Alice Liu <alice.liu@intel.com>
package/changelog
package/pkginfo.manifest
web/cache.manifest
web/dbsamples/dbmediaserver.json
web/ripple.js

index 95a2929..8870be0 100644 (file)
@@ -1,3 +1,7 @@
+* 2.0.49
+- Fixed bug TC-2311 and added speechSynthesis
+interface to Speech module.
+== Alice Liu <alice.liu@intel.com> 2015-01-15 21:15
 * 2.0.48
 - Fixed bug TC-2309
 == Alice Liu <alice.liu@intel.com> 2015-01-13 18:19
index b9477d1..eeaaefa 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.0.48
+Version:2.0.49
 Maintainer:hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>
 
 Package:websimulator-core
index a9cac03..dca3a12 100644 (file)
@@ -108,4 +108,4 @@ themes/light/images/ui-icons_454545_256x240.png
 themes/light/images/ui-icons_888888_256x240.png
 themes/light/images/ui-icons_cd0a0a_256x240.png
 themes/light/theme.css
-# Manifest build date: Tue Jan 13 2015 18:18:16 GMT+0800 (CST)
\ No newline at end of file
+# Manifest build date: Thu Jan 15 2015 21:12:52 GMT+0800 (CST)
\ No newline at end of file
index ed26c64..506da01 100644 (file)
@@ -5,8 +5,8 @@
     },
     "items": [{
         "type": "video",
-        "Path": "/videos/mediaserver_video_1.mp4",
-        "DisplayName": "mediaserver_video_1.mp4",
+        "id": "/videos/mediaserver_video_1.mp4",
+        "title": "mediaserver_video_1.mp4",
         "MIMEType": "video/x-msvideo",
         "Rating": 22050,
         "Size": 3662871,
@@ -17,8 +17,8 @@
         "Height": 480
     },{
         "type": "audio",
-        "Path": "/audio/mediaserver_audio_1.mp3",
-        "DisplayName": "mediaserver_audio_1.mp3",
+        "id": "/audio/mediaserver_audio_1.mp3",
+        "title": "mediaserver_audio_1.mp3",
         "MIMEType": "audio/x-msaudio",
         "Size": 2047320,
         "Rating": 0,
@@ -28,8 +28,8 @@
         "Duration": 0
     },{
         "type": "audio",
-        "Path": "/audio/mediaserver_audio_2.mp3",
-        "DisplayName": "mediaserver_audio_2.mp3",
+        "id": "/audio/mediaserver_audio_2.mp3",
+        "title": "mediaserver_audio_2.mp3",
         "MIMEType": "audio/x-msaudio",
         "Size": 9891422,
         "Rating": 0,
@@ -39,8 +39,8 @@
         "Duration": 0
     },{
         "type": "audio",
-        "Path": "/audio/mediaserver_audio_3.mp3",
-        "DisplayName": "mediaserver_audio_3.mp3",
+        "id": "/audio/mediaserver_audio_3.mp3",
+        "title": "mediaserver_audio_3.mp3",
         "MIMEType": "audio/x-msaudio",
         "Size": 6146928,
         "Rating": 0,
         "Duration": 0
     },{
         "type": "image",
-        "Path": "/images/mediaserver_img_1.jpg",
-        "DisplayName": "mediaserver_img_1.jpg",
+        "id": "/images/mediaserver_img_1.jpg",
+        "title": "mediaserver_img_1.jpg",
         "MIMEType": "image/jpg",
         "Size": 13811,
         "Width": 527,
         "Height": 400
     },{
         "type": "image",
-        "Path": "/images/mediaserver_img_2.png",
-        "DisplayName": "mediaserver_img_2.png",
+        "id": "/images/mediaserver_img_2.png",
+        "title": "mediaserver_img_2.png",
         "MIMEType": "image/png",
         "Size": 21869,
         "Width": 275,
     }],
     "containers": [{
         "id": "0d185b21-967e-4b4d-a50f-6dd07cd56d8b",
-        "Path": "/",
         "type": "container",
-        "DisplayName": "home"
+        "title": "home"
     },{
-        "id": "b88b4e37-2e11-4674-8747-9015bdf2a4f0",
-        "Path": "/audio/",
+        "id": "/",
         "type": "container",
-        "DisplayName": "audio"
+        "title": "all media"
     },{
-        "id": "58a1a38b-4d78-4204-8c0e-73d0d7e08b76",
-        "Path": "/video/",
+        "id": "/audio",
         "type": "container",
-        "DisplayName": "video"
+        "title": "audio"
     },{
-        "id": "8c1ab914-7366-49dd-98cc-389d12dfb7ce",
-        "Path": "/images/",
+        "id": "/video",
         "type": "container",
-        "DisplayName": "images"
+        "title": "video"
+    },{
+        "id": "/images",
+        "type": "container",
+        "title": "images"
     }]
 }
index e31a53a..3b93f36 100644 (file)
@@ -1,5 +1,5 @@
 /*! 
-  Ripple Mobile Environment Emulator v0.9.8 :: Built On Tue Jan 13 2015 18:18:15 GMT+0800 (CST)
+  Ripple Mobile Environment Emulator v0.9.8 :: Built On Thu Jan 15 2015 21:12:51 GMT+0800 (CST)
 
                                 Apache License
                            Version 2.0, January 2004
@@ -77556,6 +77556,28 @@ SpeechRecognition = function () {
 module.exports = SpeechRecognition;
 
 });
+define('ripple/platform/ivi/3.0/SpeechSynthesis', function (require, exports, module) {
+/*
+ *  Copyright 2014 Intel Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var SpeechSynthesis = window.speechSynthesis;
+
+module.exports = SpeechSynthesis;
+
+});
 define('ripple/platform/ivi/3.0/VehiclePanelEngine', function (require, exports, module) {
 
 /*
@@ -79048,7 +79070,7 @@ function _initialize() {
         i;
 
     for (i = 0; i < containers.length; i++) {
-        if (containers[i].Path === "/") {
+        if (containers[i].title === "home") {
             server.root = new MediaContainer(containers[i]);
             break;
         }
@@ -79057,8 +79079,8 @@ function _initialize() {
     _data.root = _setRoot();
 
     for (i = 0; i < items.length; i++) {
-        items[i].URLs = [_data.root + items[i].Path];
-        items[i].ThumbnailURIs = _data.root + items[i].Path;
+        items[i].URLs = [_data.root + items[i].id];
+        items[i].ThumbnailURIs = _data.root + items[i].id;
     }
 
     _data.mediaServer.server = server;
@@ -79074,7 +79096,7 @@ function _setRoot() {
 
 function _formatSortMode(sortMode) {
     var order, attributeName,
-        attributes = ["type", "Path", "DisplayName", "URLs", "ThumbnailURIs",
+        attributes = ["type", "id", "title", "URLs", "ThumbnailURIs",
                 "MIMEType", "Rating", "Size", "Duration", "Album", "Genre",
                 "Artists", "Width", "Height", "SampleRate"];
 
@@ -79130,7 +79152,7 @@ function _goFiltering(filter, items) {
         case "contains":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property].indexOf(value) > -1) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79138,7 +79160,7 @@ function _goFiltering(filter, items) {
         case "doesNotContain":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property].indexOf(value) === -1) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79148,12 +79170,12 @@ function _goFiltering(filter, items) {
                 if ((tempArray[2] === "true") ||
                     (tempArray[2] === true)) {
                     if (items[i][tempArray[0]]) {
-                        tempItems.push(items[i].Path);
+                        tempItems.push(items[i].id);
                     }
                 } else if ((tempArray[2] === "false") ||
                     (tempArray[2] === false)) {
                     if (!items[i][tempArray[0]]) {
-                        tempItems.push(items[i].Path);
+                        tempItems.push(items[i].id);
                     }
                 }
             }
@@ -79162,7 +79184,7 @@ function _goFiltering(filter, items) {
         case "=":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property] === value) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79170,7 +79192,7 @@ function _goFiltering(filter, items) {
         case "!=":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property] !== value) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79178,7 +79200,7 @@ function _goFiltering(filter, items) {
         case "<":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property] < value) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79186,7 +79208,7 @@ function _goFiltering(filter, items) {
         case "<=":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property] <= value) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79194,7 +79216,7 @@ function _goFiltering(filter, items) {
         case ">":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property] > value) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79202,7 +79224,7 @@ function _goFiltering(filter, items) {
         case ">=":
             for (i = 0; i < items.length; i++) {
                 if (items[i][property] >= value) {
-                    tempItems.push(items[i].Path);
+                    tempItems.push(items[i].id);
                 }
             }
             break;
@@ -79295,7 +79317,7 @@ function _filter(searchFilter, items) {
     if (results.length === 0) return [];
 
     for (i = 0; i < items.length; i++) {
-        if (results.indexOf(items[i].Path) === -1) {
+        if (results.indexOf(items[i].id) === -1) {
             items.splice(i, 1);
             i--;
         }
@@ -79496,7 +79518,7 @@ MediaServer = function (obj) {
             errorCallback) {
         t.MediaServer("browse", arguments);
 
-        var i, j, results, container = "", mediaFiles = [],
+        var i, j, results, container = "", mediaFiles = [], isContainer = false,
             paths = _data.mediaServer.containers,
             medias = _data.mediaServer.items,
             sort = _formatSortMode(sortMode);
@@ -79509,15 +79531,13 @@ MediaServer = function (obj) {
 
         for (i = 0; i < paths.length; i++) {
             if (paths[i].id === containerId) {
-                container = paths[i].Path;
+                container = paths[i].id;
+                if (paths[i].title === 'home') {
+                    isContainer = true;
+                }
                 continue;
             }
 
-            if ((paths[i].Path.indexOf(containerId) === 0) &&
-                    (paths[i].Path !== containerId)) {
-                mediaFiles.push(new MediaFactory(paths[i].type,
-                    paths[i]));
-            }
         }
 
         if (!container) {
@@ -79526,18 +79546,22 @@ MediaServer = function (obj) {
             return;
         }
 
-        for (i = 0; i < paths.length; i++) {
-            if ((paths[i].Path.indexOf(container) === 0) &&
-                    (paths[i].Path !== container)) {
+        if (isContainer) {
+            for (i = 0; i < paths.length; i++) {
+                if (paths[i].title === 'home') {
+                    continue;
+                }
                 mediaFiles.push(new MediaFactory(paths[i].type,
                     paths[i]));
             }
         }
 
-        for (j = 0; j < medias.length; j++) {
-            if (medias[j].Path.indexOf(container) === 0) {
-                mediaFiles.push(new MediaFactory(medias[j].type,
-                        medias[j]));
+        if (!isContainer) {
+            for (j = 0; j < medias.length; j++) {
+                if (medias[j].id.indexOf(container) === 0) {
+                    mediaFiles.push(new MediaFactory(medias[j].type,
+                            medias[j]));
+                }
             }
         }
 
@@ -79568,12 +79592,12 @@ MediaServer = function (obj) {
 
         for (i = 0; i < paths.length; i++) {
             if (paths[i].id === containerId) {
-                container = paths[i].Path;
+                container = paths[i].id;
                 continue;
             }
 
-            if ((paths[i].Path.indexOf(containerId) === 0) &&
-                    (paths[i].Path !== containerId)) {
+            if ((paths[i].id.indexOf(containerId) === 0) &&
+                    (paths[i].id !== containerId)) {
                 mediaFiles.push(new MediaFactory(paths[i].type,
                         paths[i]));
             }
@@ -79586,15 +79610,15 @@ MediaServer = function (obj) {
         }
 
         for (i = 0; i < paths.length; i++) {
-            if ((paths[i].Path.indexOf(container) === 0) &&
-                    (paths[i].Path !== container)) {
+            if ((paths[i].id.indexOf(container) === 0) &&
+                    (paths[i].id !== container)) {
                 mediaFiles.push(new MediaFactory(paths[i].type,
                         paths[i]));
             }
         }
 
         for (j = 0; j < medias.length; j++) {
-            if (medias[j].Path.indexOf(container) === 0) {
+            if (medias[j].id.indexOf(container) === 0) {
                 mediaFiles.push(new MediaFactory(medias[j].type,
                         medias[j]));
             }
@@ -79649,16 +79673,11 @@ MediaObject = function (property) {
     var mediaObject = {};
 
     mediaObject.id = property.id || "";
-    mediaObject.Path = property.Path || "";
-    mediaObject.DisplayName = property.DisplayName || "";
+    mediaObject.title = property.title || "";
     mediaObject.type = property.type || "";
 
-    this.__defineGetter__("Path", function () {
-        return mediaObject.Path;
-    });
-
-    this.__defineGetter__("DisplayName", function () {
-        return mediaObject.DisplayName;
+    this.__defineGetter__("title", function () {
+        return mediaObject.title;
     });
 
     this.__defineGetter__("type", function () {
@@ -81354,6 +81373,9 @@ module.exports = {
         SpeechGrammar: {
             path: "ivi/3.0/SpeechGrammar"
         },
+        SpeechSynthesis: {
+            path: "ivi/3.0/SpeechSynthesis"
+        },
         Zone: {
             path: "ivi/3.0/Zone"
         },