This example demonstrates configuring the player for Youtube 360 videos and control. Enabling the vr
config will allow mouse and touch controls to the Youtube player through Video.JS.
This is needed for VR 360 controls.
<div class="flex w-full h-auto my-auto">
<video class="video-js vjs-default-skin vjs-fluid " crossorigin="anonymous" controls="" id="vr"></video>
</div>
<script type="text/javascript">
var player = videojs("vr", {
"plugins": {
"qualitymenu": {},
"youtube": {
"vr": 1
}
},
"sources": [
{
"src": "http://www.youtube.com/watch?v=PusRw0HDfL0",
"type": "video/youtube"
}
]
});
</script>