},
"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,
"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,
"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,
"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"
}]
}
/*!
- 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
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) {
/*
i;
for (i = 0; i < containers.length; i++) {
- if (containers[i].Path === "/") {
+ if (containers[i].title === "home") {
server.root = new MediaContainer(containers[i]);
break;
}
_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;
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"];
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;
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;
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);
}
}
}
case "=":
for (i = 0; i < items.length; i++) {
if (items[i][property] === value) {
- tempItems.push(items[i].Path);
+ tempItems.push(items[i].id);
}
}
break;
case "!=":
for (i = 0; i < items.length; i++) {
if (items[i][property] !== value) {
- tempItems.push(items[i].Path);
+ tempItems.push(items[i].id);
}
}
break;
case "<":
for (i = 0; i < items.length; i++) {
if (items[i][property] < value) {
- tempItems.push(items[i].Path);
+ tempItems.push(items[i].id);
}
}
break;
case "<=":
for (i = 0; i < items.length; i++) {
if (items[i][property] <= value) {
- tempItems.push(items[i].Path);
+ tempItems.push(items[i].id);
}
}
break;
case ">":
for (i = 0; i < items.length; i++) {
if (items[i][property] > value) {
- tempItems.push(items[i].Path);
+ tempItems.push(items[i].id);
}
}
break;
case ">=":
for (i = 0; i < items.length; i++) {
if (items[i][property] >= value) {
- tempItems.push(items[i].Path);
+ tempItems.push(items[i].id);
}
}
break;
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--;
}
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);
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) {
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]));
+ }
}
}
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]));
}
}
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]));
}
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 () {
SpeechGrammar: {
path: "ivi/3.0/SpeechGrammar"
},
+ SpeechSynthesis: {
+ path: "ivi/3.0/SpeechSynthesis"
+ },
Zone: {
path: "ivi/3.0/Zone"
},