ConnectSDK / Connect-SDK-Cordova-Plugin

Cordova/PhoneGap plugin for Connect SDK
Apache License 2.0
69 stars 46 forks source link

More controls over launchYouTube(videoId) API? #9

Open fxu12 opened 9 years ago

fxu12 commented 9 years ago

Hi,

Is there anything I can do to listen a event that the playing video is finished? Are there any more controls such as play, pause, seek, skip?

Thanks!

Andolamin commented 9 years ago

@FuningXu1 We aren't able to get the play state from Youtube, however, as of the 1.6.0 plugin release you can use the MediaControl capability on webOS to control Youtube playback.

connectableDevice.getMediaControl().play();
connectableDevice.getMediaControl().pause();
connectableDevice.getMediaControl().rewind();
connectableDevice.getMediaControl().fastForward();
connectableDevice.getMediaControl().stop();