From: brianjjones Date: Fri, 21 Feb 2014 21:39:34 +0000 (-0800) Subject: Adding back in tizen.vehicle reference. Also adding a check for which menu should... X-Git-Tag: accepted/tizen/ivi/20140221.215721 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Faccepted%2Ftizen%2Fivi%2F20140221.215721;p=profile%2Fivi%2FMediaPlayer.git Adding back in tizen.vehicle reference. Also adding a check for which menu should be shown at startup Change-Id: Ie70496e3b2790e8a71ae826d1fdce96c286e75c8 --- diff --git a/config.xml b/config.xml index b8b32d9..8d9e05d 100644 --- a/config.xml +++ b/config.xml @@ -8,4 +8,5 @@ + diff --git a/js/main.js b/js/main.js index 5dbadff..e51e17c 100644 --- a/js/main.js +++ b/js/main.js @@ -42,6 +42,7 @@ var stopServerSearch; var playBarHeight; var boxWidth; var textStartX; +var remoteMediaSearchAttempts = 0; var mainMenuTitleTemplateLandscape = {"font" : "oblique bolder 18pt arial", "lineWidth" : 6.5, "fillStyle" : "black", "strokeStyle" : "white", "textAlign" : "left", "largeShadow" : 8, "shadowOffsetX" : 0, "shadowOffsetY" : 0, "shadowBlur" : 45, "shadowColor" : "rgba(255, 187, 0, 0.4)"}; @@ -362,7 +363,7 @@ function showMainMenu() { console.log("MediaPlayer in showMainMenu, clearing all localStorage..."); currentMenu = "main"; - localStorage.prevMenu = "MAIN"; + delete localStorage.prevMenu; localStorage.prevAudioTime = undefined; localStorage.prevAudioTrack = undefined; localStorage.prevVideo = undefined; @@ -620,7 +621,7 @@ function init() //Resize all items and search for local media resizeAll(); - if (localStorage.prevMenu && localStorage.prevMenu !== "MAIN") + if (localStorage.prevMenu && localStorage.prevMenu !== undefined && localStorage.prevMenu !== "MAIN") changeMenu(localStorage.prevMenu) else showMainMenu(); @@ -635,7 +636,14 @@ function init() //Currently no success signal, so continue trying until a server is found. Once that //happens, clear the stopServerSearch interval - stopServerSearch = setInterval(function(){console.log("MediaPlayer searching for remote media..."); tizen.mediaserver.scanNetwork(foundMediaServer);}, 5000); + stopServerSearch = setInterval(function(){ + console.log("MediaPlayer searching for remote media..."); + if (remoteMediaSearchAttempts < 5) + tizen.mediaserver.scanNetwork(foundMediaServer); + else + clearInterval(stopServerSearch); + remoteMediaSearchAttempts++; + }, 5000); } else console.log("MediaPlayer: No DLNA server running, using local media only..."); diff --git a/packaging/MediaPlayer.changes b/packaging/MediaPlayer.changes index 03cb48f..6777d23 100644 --- a/packaging/MediaPlayer.changes +++ b/packaging/MediaPlayer.changes @@ -1,3 +1,6 @@ +* Fri Feb 21 2014 brianjjones accepted/tizen/ivi/20140128.214305@dcfa371 +- Adding back in tizen.vehicle reference. Also adding a check for which menu should be shown at startup + * Wed Dec 18 2013 brianjjones submit/tizen/20131218.195059@b3964db - Adding requirement to the spec for speech-recognition and wrt-plugins-ivi