Open kuehn-sba opened 7 years ago
@kuehn-sba Have you tried using the callback options? Something like...
this.vjs = videojs(video, {
preload: 'metadata',
plugins: {
panorama: {
showNotice: false,
clickAndDrag: true,
clickToToggle: true,
callback: function() {
//autoplay would be a variable/option
if (autoplay) {
this.vjs.play()
}
}
}
}
});
I have a different syntax where I don't use the plugin option, so I'm not sure if this will work for you.
thx, but I already use this workaround... autoplay would be more general
Hey, you have another two options:
First: put autoplay attribute to video tag like below:
<video autoplay></video>
Second: put autoplay to videojs options
videojs(video, {
preload: 'metadata',
autoplay: true,
plugins: {
.....
}
});
hi yanwsh,
In the case of the Autoplay flag, the video will start automatically, but it will only be displayed in black. When I restart playback or using the workaround above, it will work.
https://s3.ap-south-1.amazonaws.com/viyatrademo/Viyatra.html
check this goto source code
Can the plugin handle the videojs autoplay option? For me, it's not working: