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:
@@ -126,7 +126,7 @@ window.onload = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
// if user agent includes iPhone or Mac use legacy mode
|
// 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.getElementById("spectrogramimage").style.display="";
|
||||||
document.body.querySelector('canvas').remove();
|
document.body.querySelector('canvas').remove();
|
||||||
document.getElementById('player').remove();
|
document.getElementById('player').remove();
|
||||||
|
|||||||
Reference in New Issue
Block a user