[Tizen-submit] 9357: Changes to Tizen:IVI/MediaPlayer

noreply at tizen.org noreply at tizen.org
Wed Aug 28 23:30:08 GMT 2013


Hi,
brianjjones have made the following changes to MediaPlayer in project Tizen:IVI. Please review and accept ASAP.

Thank You,

[This message was auto-generated]

---

Request: #9357

  submit:       Tizen:IVI:build/MediaPlayer(cleanup) -> Tizen:IVI


Message:
Submitter: brianjjones <brian.j.jones at intel.com>
Comments: Adding tizen.speech (voice control) support.
Git project: profile/ivi/MediaPlayer
Tag: submit/tizen/20130828.233443
Commit: f8a91e88da5777174920d840afb8541fef751b1f Adding tizen.speech (voice control) support.

State:   new        2013-08-28T16:26:53 tizenrobot
Comment: <no comment>
changes files:
--------------
--- MediaPlayer.changes
+++ MediaPlayer.changes
@@ -0,0 +1,3 @@
+* Tue Aug 27 2013 brianjjones <brian.j.jones at intel.com> submit/tizen/20130723.194640 at f68855f
+- Adding tizen.speech (voice control) support.
+

spec files:
-----------
--- MediaPlayer.spec
+++ MediaPlayer.spec
@@ -2,7 +2,7 @@
 Summary:    A HTML media player application
 Version:    0.0.1
 Release:    1
-VCS:        profile/ivi/MediaPlayer#submit/tizen/20130729.210437-0-gd275028607f5b67face2c714c05652e7af719f82
+VCS:        profile/ivi/MediaPlayer#submit/tizen/20130828.233443-0-gf8a91e88da5777174920d840afb8541fef751b1f
 Group:      Applications/System
 License:    Apache 2.0
 URL:        http://www.tizen.org2

other changes:
--------------

++++++ MediaPlayer-0.0.1.tar.bz2
--- config.xml
+++ config.xml
@@ -4,7 +4,7 @@
     <content src="index.html"/>
     <icon src="MediaPlayer.png"/>
     <name>MediaPlayer</name>
+    <tizen:privilege name="http://tizen.org/privilege/speech"/>
     <tizen:privilege name="http://tizen.org/privilege/content.read"/>
     <tizen:privilege name="http://tizen.org/privilege/content.write"/>
-    <tizen:privilege name="http://tizen.org/privilege/filesystem.read"/>
 </widget>
--- js/main.js
+++ js/main.js
@@ -36,10 +36,11 @@
 var mediaListItemH;
 var imageControls;
 var loadAndPlay = false;
-var loadTimer; 
+var loadTimer;
 var currentFileLoaded = false;
 var mediaNameCanvas;
 var mediaNameCTX;
+var speechObj;
 
 var mainMenuTitleTemplateLandscape = {"font" : "oblique bolder 30pt arial", "lineWidth" : 9.5, "fillStyle" : "black", "strokeStyle" : "white", "textAlign" : "left",
 		"largeShadow" : 8, "shadowOffsetX" : 0, "shadowOffsetY" : 0, "shadowBlur" : 45, "shadowColor" : "rgba(255, 187, 0, 0.4)"};
@@ -76,6 +77,71 @@
 	console.log("Content discovery failed");
 }
 
+function setupSpeech()
+{
+	speechObj = tizen.speech;
+
+	try
+	{
+		var speechEventListener = {
+			onaudiostart: function(){console.log("MediaPlayer: onaudiostart received");},
+			onsoundstart: function(){console.log("MediaPlayer: onsoundstart received");},
+			onspeechstart: function(){console.log("MediaPlayer: onspeechstart received");},
+			onspeechend: function(){console.log("MediaPlayer: onspeechend received");},
+			onsoundend: function(){console.log("MediaPlayer: onsoundend received");},
+			onaudioend: function(){console.log("MediaPlayer: onaudioend received");},
+			onresult: function(result){
+
+				console.log("MediaPlayer: onresult received");
+
+				for (var i = 0; i < result.length; i++)
+				{
+					console.log("MediaPlayer: forloop, command = " + result[i]);
+					var commandFound = false;
+
+					switch(result[i])
+					{
+						case "play":
+							playButtonClick();
+							commandFound = true;
+						break;
+						case "next":

Please refer to OBS webUI for more details about this SR.


More information about the Tizen-submit mailing list