Leite Vorschaubilder und Filmstufen geschuetzt ab
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d6ff881e4e
commit
c997eb500c
32 files changed
+979
-68
No files matched your search
@@ -1,3 +1,25 @@
|
||||
import Hls from 'hls.js';
|
||||
|
||||
document.querySelectorAll('video[data-hls]').forEach((video) => {
|
||||
const source = video.dataset.hls;
|
||||
|
||||
if (!source) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = source;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Hls.isSupported()) {
|
||||
const playback = new Hls();
|
||||
playback.loadSource(source);
|
||||
playback.attachMedia(video);
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('click', (event) => {
|
||||
const fullscreen = event.target.closest('[data-fullscreen]');
|
||||
|
||||
|
||||
Reference in new issue
Block a user