neddit

the frontend of the frontpage of the internet  https://neddit.ce9e.org
git clone https://git.ce9e.org/neddit.git

commit
2671a426ed3f41e3166d2c77d136718be420941e
parent
b2f829f23dd1752acef6a1ee200b9241fc3d593c
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-11-07 09:49
adapt to new audio filename

Diffstat

M static/video.js 8 ++++++--

1 files changed, 6 insertions, 2 deletions


diff --git a/static/video.js b/static/video.js

@@ -37,8 +37,12 @@ document.querySelectorAll('video').forEach(function(video) {
   37    37 
   38    38 	var url = video.querySelectorAll('source')[4].src;
   39    39 	var audio = document.createElement('audio');
   40    -1 	addSource(audio, url.replace('DASH_96', 'DASH_AUDIO_64'));
   41    -1 	addSource(audio, url.replace('DASH_96', 'DASH_audio'));
   -1    40 	if (url.includes('DASH_96')) {
   -1    41 		addSource(audio, url.replace('DASH_96', 'DASH_AUDIO_64'));
   -1    42 		addSource(audio, url.replace('DASH_96', 'DASH_audio'));
   -1    43 	} else if (url.includes('CMAF_96')) {
   -1    44 		addSource(audio, url.replace('CMAF_96', 'CMAF_AUDIO_128'));
   -1    45 	}
   42    46 	audio.preload = 'none';
   43    47 	audio.loop = true;
   44    48 	video.after(audio);