Skip to content

Commit 884b0b5

Browse files
authored
Remove unnecessary userAgent Checks (Nachtzuster#118)
For some reason "Mac" and "Chrome" were included, stopping live spectrogram on Macs. Only needs to be iPhone because it doesn't work on there. Tested on Mac FF, Chrome & Safari.
1 parent d3b6ccf commit 884b0b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/spectrogram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
};
127127

128128
// if user agent includes iPhone or Mac use legacy mode
129-
if(((window.navigator.userAgent.includes("iPhone") || window.navigator.userAgent.includes("Mac")) && !window.navigator.userAgent.includes("Chrome")) || legacy == true) {
129+
if(window.navigator.userAgent.includes("iPhone") || legacy == true) {
130130
document.getElementById("spectrogramimage").style.display="";
131131
document.body.querySelector('canvas').remove();
132132
document.getElementById('player').remove();

0 commit comments

Comments
 (0)