Samsung / cordova-plugin-toast

Cordova plugin that provides TV Specific functionalities.
Apache License 2.0
122 stars 60 forks source link

webapis is not defined #92

Closed orcunkobal closed 5 years ago

orcunkobal commented 5 years ago

Hello,

var media = toast.Media.getInstance(); media.open('...../abr/playlist.m3u8'); media.play();

The code is working on WebOS and tizen. But when I try to test on chrome with Cordova emulate then I get an error like this


toast.js:2287 media::create() - id =31bb5399-d3fa-ca9a-0ccd-dd65bbe5a02c
toast.js:2297 media::open() - id =31bb5399-d3fa-ca9a-0ccd-dd65bbe5a02c src = http://.../abr/playlist.m3u8
cordova.js:1000 Exception calling native with command :: toast.Media :: open ::exception=ReferenceError: webapis is not defined
toast.js:2370 media::play() - id =31bb5399-d3fa-ca9a-0ccd-dd65bbe5a02c
cordova.js:1000 Exception calling native with command :: toast.Media :: play ::exception=ReferenceError: webapis is not defined

I just want to test media on the browser.

Thank you,

pwsses commented 5 years ago

Hi Sorry for late reply. webapis is device api lib which is work on sectv-orsay / sectv-tizen. So If you package to browser, It should doesn't load. In browser package, toast media base on video tag. Please check your package Build.

Thank you.

orcunkobal commented 5 years ago

Thank you for your reply. I fixed my problem 👍