• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Including Gestures in Smart TV Apps
 

Including Gestures in Smart TV Apps

on

  • 2,881 views

Quick overview and code snippets to include Motion Recognition and Voice recognition capability in your Smart TV apps for Samsung.

Quick overview and code snippets to include Motion Recognition and Voice recognition capability in your Smart TV apps for Samsung.

Statistics

Views

Total Views
2,881
Views on SlideShare
2,881
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Including Gestures in Smart TV Apps Including Gestures in Smart TV Apps Presentation Transcript

    • Including gestures in Smart TV apps Manikantan K Manikantan.k@samsung.com @manikantan_k
    • Motion Recognition http://www.samsungdforum.com/Guide/d01/index.html
    • Single Handed Gestures • You need to include mouse support in config.xml <mouse>y</mouse> • Mouse listener like the web. • Create a div in scene1.html <div id="button0">Button</div> <!-- make it as button --> <div id="div0“></div> <!-- make it as trial element --> • Adding listener document.getElementById('div0').addEventListener('mouseover', function(){ document.getElementById('div0').style.backgroundColor = 'lime'; }, false); document.getElementById('div0').addEventListener('mouseout', function(){ document.getElementById('div0').style.backgroundColor = 'yellow'; }, false); document.getElementById('div0').addEventListener('click', function(){ alert("clicked"); }, false);
    • Double Handed Gestures • Include webapis <script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/webapis.js"></script> • Usage. • Check for support and enabled if (webapis.recognition.IsRecognitionSupported()) { if (webapis.recognition.IsGestureRecognitionEnabled()) { // perform Recognition related actions here, e.g. subscribe } else { alert("ERROR: Gesture recognition is not enabled"); } } else { alert("ERROR: Gesture recognition not supported"); } Subscribe to events webapis.recognition.SubscribeExEvent(webapis.recognition.PL_RECOGNITION_T YPE_GESTURE, “returnID", function (evt) { that.handleRecognitionEvent.call(that, evt); }); EVENT_GESTURE_2HAND_ZOOM , EVENT_GESTURE_2HAND_ROTATE etc
    • Voice Recognition http://samsungdforum.com/Guide/tut000001/index.html
    • Voice Recognition • Embedded Mode Predefined voice commands. The engine does more of comparison than recognition Does NOT require internet. Limited to comparing between 7 items. • Server Guide Mode Free- form speech. Depends heavily on user’s linguistics and pronunciation. Voice Data is sent to internet to recognize user’s speech. No limits.
    • Voice Recognition • Include webapis and in config.xml <script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/webapis.js "></script> <voice>y</voice> in config.xml • Check for support and if enabled deviceapis.recognition.IsRecognitionSupported() deviceapis.recognition.IsVoiceRecognitionEnabled() deviceapis.recognition.IsVoiceServerLanguageSupported()
    • Voice Recognition • Subscribe to Voice Events deviceapis.recognition.SubscribeExEvent( deviceapis.recognition.PL_RECOGNITION_TYPE_VOICE, "VoiceEvt", Main.onVoiceEvent ); deviceapis.recognition.UnsubscribeExEvent( deviceapis.recognition.PL_RECOGNITION_TYPE_VOICE, "VoiceEvt” ); • Handle voice events Main.onVoiceEvent = function(evt){ switch (evt.eventtype){ case 'EVENT_VOICE_RECOG_RESULT': alert('The user say ' + evt.result); break; } };
    • Thank You