clappr-youtube-playback icon indicating copy to clipboard operation
clappr-youtube-playback copied to clipboard

The demo do not allow to change video source

Open onigetoc opened this issue 7 years ago • 1 comments

The demo do not allow to change video source, It never load the new video

onigetoc avatar Apr 11 '17 15:04 onigetoc

it is because we need to reinitialized window.YT (player data), it called from iframe_api, the solution is to set it null. it can be done by replacing:

value: function embedYoutubeApiScript() {
    var _this2 = this;

with

value: function embedYoutubeApiScript() {
    window.YT = null;
    var _this2 = this;

ewwink avatar May 10 '17 05:05 ewwink