media.onOTVWebAppMsg - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.media.onOTVWebAppMsg

API ์„ค๋ช…

  • OTV WebApp ๋ฉ”์‹œ์ง€ ์ˆ˜์‹  API
  • OTV WebApp์—์„œ ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•จ
  • onOTVWebAppMsg ์˜ ์ฝœ๋ฐฑํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ•ด์•ผ ํ•จ

API ๊ตฌ์กฐ

  • function callback(extra)
  • extra
    • uAppId: ๋ฉ”์‹œ์ง€๋ฅผ ์ „๋‹ฌํ•œ OTV WebApp์˜ appid
    • message: ์ „๋‹ฌ ๋ฉ”์‹œ์ง€(OTV WebApp Message ์ •์˜ ์— ์ •์˜๋จ)
    • args: ๋ฉ”์‹œ์ง€ ์ถ”๊ฐ€ ๋ฐ์ดํ„ฐ

์‚ฌ์šฉ ์˜ˆ์‹œ

// callback ๋ฐฉ์‹
gigagenie.media.onOTVWebAppMsg = function (extra) {
    console.log("appid: " + extra.uAppId);
    console.log("message: " + extra.message);
    console.log("args: " + extra.args);
};