Remove unnecessary userAgent Checks (#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.
This commit is contained in:
Lloyd Bayley
2024-06-22 18:12:39 +10:00
committed by GitHub
parent d3b6ccf65d
commit 884b0b5f9c
+1 -1
View File
@@ -126,7 +126,7 @@ window.onload = function(){
};
// if user agent includes iPhone or Mac use legacy mode
if(((window.navigator.userAgent.includes("iPhone") || window.navigator.userAgent.includes("Mac")) && !window.navigator.userAgent.includes("Chrome")) || legacy == true) {
if(window.navigator.userAgent.includes("iPhone") || legacy == true) {
document.getElementById("spectrogramimage").style.display="";
document.body.querySelector('canvas').remove();
document.getElementById('player').remove();