SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...
Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...
Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...University of Stuttgart
 
Lean Enterprise Experience Canves
Lean Enterprise Experience CanvesLean Enterprise Experience Canves
Lean Enterprise Experience CanvesCatchi
 
Home care across europe case studies
Home care across europe case studiesHome care across europe case studies
Home care across europe case studiesHome Care Aid
 
Copywriter Collective Aditya - Fun diary
Copywriter Collective   Aditya - Fun diaryCopywriter Collective   Aditya - Fun diary
Copywriter Collective Aditya - Fun diaryCopywriter Collective
 
Berufsinformation HLW Kufstein
Berufsinformation HLW KufsteinBerufsinformation HLW Kufstein
Berufsinformation HLW Kufsteinedu.support
 
Web Design Module - Session 1 - course aims
Web Design Module - Session 1  - course aimsWeb Design Module - Session 1  - course aims
Web Design Module - Session 1 - course aimschowders
 
Puzzle Families
Puzzle FamiliesPuzzle Families
Puzzle Families972design
 
RK_MANPOWER_CONSULTANCY_PPT_NEW
RK_MANPOWER_CONSULTANCY_PPT_NEWRK_MANPOWER_CONSULTANCY_PPT_NEW
RK_MANPOWER_CONSULTANCY_PPT_NEWrk solutions
 
Vuelo regalo llega a Colombia
Vuelo regalo llega a Colombia Vuelo regalo llega a Colombia
Vuelo regalo llega a Colombia vueloregalo
 
MWC - Operadores - Sefarad
MWC - Operadores - SefaradMWC - Operadores - Sefarad
MWC - Operadores - SefaradEial
 
Introduction Group Soft (2)
Introduction Group Soft (2)Introduction Group Soft (2)
Introduction Group Soft (2)bensura
 

Andere mochten auch (14)

Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...
Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...
Masses, Crowds, Communities, Movements. Collective Formations in the Digital ...
 
Lean Enterprise Experience Canves
Lean Enterprise Experience CanvesLean Enterprise Experience Canves
Lean Enterprise Experience Canves
 
Home care across europe case studies
Home care across europe case studiesHome care across europe case studies
Home care across europe case studies
 
Punishment across Europe. Prison and Probation challenges. Natalia Delgrande
Punishment across Europe. Prison and Probation challenges. Natalia DelgrandePunishment across Europe. Prison and Probation challenges. Natalia Delgrande
Punishment across Europe. Prison and Probation challenges. Natalia Delgrande
 
Estrés térmico frío
Estrés térmico fríoEstrés térmico frío
Estrés térmico frío
 
Copywriter Collective Aditya - Fun diary
Copywriter Collective   Aditya - Fun diaryCopywriter Collective   Aditya - Fun diary
Copywriter Collective Aditya - Fun diary
 
Berufsinformation HLW Kufstein
Berufsinformation HLW KufsteinBerufsinformation HLW Kufstein
Berufsinformation HLW Kufstein
 
Web Design Module - Session 1 - course aims
Web Design Module - Session 1  - course aimsWeb Design Module - Session 1  - course aims
Web Design Module - Session 1 - course aims
 
Puzzle Families
Puzzle FamiliesPuzzle Families
Puzzle Families
 
RK_MANPOWER_CONSULTANCY_PPT_NEW
RK_MANPOWER_CONSULTANCY_PPT_NEWRK_MANPOWER_CONSULTANCY_PPT_NEW
RK_MANPOWER_CONSULTANCY_PPT_NEW
 
Vuelo regalo llega a Colombia
Vuelo regalo llega a Colombia Vuelo regalo llega a Colombia
Vuelo regalo llega a Colombia
 
MWC - Operadores - Sefarad
MWC - Operadores - SefaradMWC - Operadores - Sefarad
MWC - Operadores - Sefarad
 
alojamiento en ibiza
alojamiento en ibizaalojamiento en ibiza
alojamiento en ibiza
 
Introduction Group Soft (2)
Introduction Group Soft (2)Introduction Group Soft (2)
Introduction Group Soft (2)
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Including Gestures in Smart TV Apps

  • 1. Including gestures in Smart TV apps Manikantan K Manikantan.k@samsung.com @manikantan_k
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. 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);
  • 8. 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
  • 10. 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.
  • 11. 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()
  • 12. 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; } };