From: Jaroslav Kysela Date: Thu, 14 Sep 2017 11:44:03 +0000 (+0200) Subject: webui: comet - don't use websockets for Safari browsers, fixes #4589 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fc3520623cf2423474dff9b83d682ad645a2b6b;p=thirdparty%2Ftvheadend.git webui: comet - don't use websockets for Safari browsers, fixes #4589 https://bugs.webkit.org/show_bug.cgi?id=80362 Note: Probably all other "plain" webkit browsers are affected until the above bug is resolved. --- diff --git a/src/webui/static/app/comet.js b/src/webui/static/app/comet.js index 8673c17fb..2f0e89eed 100644 --- a/src/webui/static/app/comet.js +++ b/src/webui/static/app/comet.js @@ -96,7 +96,9 @@ tvheadend.cometWebsocket = function() { }; tvheadend.cometInit = function() { - if ("WebSocket" in window) { + var isSafari = navigator.vendor && navigator.vendor.indexOf('Apple') > -1 && + navigator.userAgent && !navigator.userAgent.match('CriOS'); + if (!isSafari && ("WebSocket" in window)) { var loc = window.location; var path = loc.pathname.substring(0, loc.pathname.lastIndexOf("/")); tvheadend.wsURI = (loc.protocol === "https:" ? "wss:" : "ws:") + "//" + loc.host + path + "/comet/ws";