voice.onVoiceCommand - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.voice.onVoiceCommand

API μ„€λͺ…

  • μŒμ„± λͺ…λ Ή μˆ˜μ‹  API
  • λ‹€μŒ νŽ˜μ΄μ§€, 이전 νŽ˜μ΄μ§€ λ“±μ˜ μŒμ„± λͺ…λ Ή μ½”λ“œλ₯Ό μˆ˜μ‹ 

API ꡬ쑰

  • function callback(event,extra)
  • event λŠ” λ‹€μŒμ˜ μŒμ„± λͺ…령에 λŒ€ν•΄μ„œ String으둜 전달함
    • nextPage: λ‹€μŒ νŽ˜μ΄μ§€
    • prevPage: 이전 νŽ˜μ΄μ§€
    • naviNext: λ‹€μŒμœΌλ‘œ
    • naviPrev: μ΄μ „μœΌλ‘œ
  • 확인, μ·¨μ†ŒλŠ” getVoiceText 의 mode=2 에 λŒ€ν•œ 응닡을 전달함
    • confirm: 확인
    • cancel: μ·¨μ†Œ

μ‚¬μš© μ˜ˆμ‹œ

gigagenie.voice.onVoiceCommand = function (event) {
    switch (event) {
        case 'nextPage':
            //navigate next page
            break;
        case 'prevPage':
            //navigate prev page
            break;
        default:
            break;
    }
};