DASH playback in videojs is broken
OctoNezd opened this issue · 1 comments
OctoNezd commented
Description
It's impossible to set DASH source in videojs when using lightgallery.
Steps to reproduce
Demo: https://codepen.io/octonezd/pen/LYaGOao
- Create anchor with data pointing to DASH source
JS code that you use to initialize lightGallery.
function opengallery() {
const lg = lightGallery(document.getElementById("gallery"), {
plugins: [lgVideo],
speed: 250,
mobileSettings: {},
videojs: true,
videojsOptions: {
vhs: {
overrideNative: true
},
html5: {
vhs: {
overrideNative: true
},
nativeAudioTracks: false,
nativeVideoTracks: false
}
}
});
lg.openGallery()
}
Sample HTML markup
<div id="gallery">
<a data-video="{"source":["https://v.redd.it/be101931ndac1/DASHPlaylist.mpd"],"attributes":{"preload":false,"playsinline":true,"controls":true}}" data-lg-size="1280-720" data-sub-html="">
<img referrerpolicy="no-referrer" src="https://external-preview.redd.it/YmFwb3JwejBuZGFjMYaOaN5dQT3MQ130NxDcBZQpVq3Z1AHPX2eSYT88-A8S.png?width=140&height=130&crop=140:130,smart&format=jpg&v=enabled&lthumb=true&s=d1b2de1b7b136eca44e3914b4128ad4d87b34843"></a>
</div>
Environment
- Browser and version - Firefox 121.0, can also reproduce on Edge 120.0.2210.91
- OS - Windows 11
- lightGallery version - 2.7.2
Additional context
OctoNezd commented
Can't reproduce anymore in codepen for some reason. I assume its an issue with the way extension injects its features.
Sorry for creating this issue.