mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 03:37:53 +01:00
test ignore
This commit is contained in:
parent
5dd37cc23e
commit
edf8991914
1 changed files with 10 additions and 8 deletions
|
@ -982,11 +982,10 @@ function cstsRemaining(totalTimeInSeconds, elapsedTimeInSeconds) {
|
||||||
aud.addEventListener("canplaythrough", shouldPlay);
|
aud.addEventListener("canplaythrough", shouldPlay);
|
||||||
vid.addEventListener("canplaythrough", shouldPlay);
|
vid.addEventListener("canplaythrough", shouldPlay);
|
||||||
})
|
})
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
const audi = document.getElementById("aud");
|
|
||||||
const audioContext = new (window.AudioContext || window.webkitAudioContext)();
|
const audioContext = new (window.AudioContext || window.webkitAudioContext)();
|
||||||
const source = audioContext.createMediaElementSource(audi);
|
const source = audioContext.createMediaElementSource(aud);
|
||||||
const analyser = audioContext.createAnalyser();
|
const analyser = audioContext.createAnalyser();
|
||||||
|
|
||||||
source.connect(analyser);
|
source.connect(analyser);
|
||||||
|
@ -1005,7 +1004,7 @@ function checkAudio() {
|
||||||
if (video.ended || video.paused || quality === 'medium') return;
|
if (video.ended || video.paused || quality === 'medium') return;
|
||||||
|
|
||||||
// Check if the audio volume is greater than 0
|
// Check if the audio volume is greater than 0
|
||||||
if (audi.volume === 0) return;
|
if (aud.volume === 0) return;
|
||||||
|
|
||||||
const bufferLength = analyser.fftSize;
|
const bufferLength = analyser.fftSize;
|
||||||
const dataArray = new Uint8Array(bufferLength);
|
const dataArray = new Uint8Array(bufferLength);
|
||||||
|
@ -1016,13 +1015,16 @@ function checkAudio() {
|
||||||
|
|
||||||
if (!isAudioPlaying) {
|
if (!isAudioPlaying) {
|
||||||
// Play/pause workaround to reset audio
|
// Play/pause workaround to reset audio
|
||||||
audi.pause();
|
aud.pause();
|
||||||
audi.play();
|
aud.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check audio every second
|
// Check audio every second
|
||||||
setInterval(checkAudio, 1000);
|
setInterval(checkAudio, 1000);
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<% if(shortsui) { %>
|
<% if(shortsui) { %>
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in a new issue