SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

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
 

En vedette (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)
 

Dernier

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Dernier (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

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; } };