onEnter() don't work with youtube plugin on smartphone
Russandol opened this issue · comments
Sébastien CLEMENT commented
Hello,
I'm trying to add event on video using cuePoints, onEnter and onComplete function. But it doesn't work with Youtube plugin when the video is see on a smartphone. When I test without Youtube plugin it work on smartphone.
Here my code :
controller :
var timePoint = [];
var start = 3;
var end = 10;
var result = {};
result.timeLapse = {
start: start,
end: end
};
result.onComplete = function onComplete(currentTime, timeLapse, params) {
alert('onComplete')
};
result.onEnter = function onEnter(currentTime, timeLapse, params) {
alert('onEnter');
};
timePoint.push(result);
this.config = {
preload: "none",
sources: [{
src: "https://www.youtube.com/watch?v=bZZB40MRjiI"
}],
theme: {
url: "http://www.videogular.com/styles/themes/default/latest/videogular.css"
},
cuePoints: {
timePoint: timePoint
},
plugins: {
controls: {
autoHide: true,
autoHideTime: 5000
}
}
};
view :
<videogular vg-theme="videoController.config.theme.url"
vg-player-ready="videoController.onPlayerReady($API)"
vg-auto-play="true"
vg-native-fullscreen="false"
vg-plays-inline="true"
vg-cue-points="videoController.config.cuePoints"
vg-complete="videoController.onCompleteVideo()" >
<vg-media vg-src="videoController.config.sources"
vg-native-controls="false"
vg-youtube="rel=1;showinfo=0">
</vg-media>
</videogular>
Any Idea ?