aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/embed.html
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-09-02 09:31:07 +0200
committerChocobozzz <me@florianbigard.com>2021-09-02 09:31:07 +0200
commitc21a0aa855f61daaca458e16b47f95278898beb4 (patch)
tree007e28debbf935f7115dbcf1db81168e1b59cac5 /client/src/standalone/videos/embed.html
parentf4e75a6fd037c396b532e0cfc0a48d769e29f6ae (diff)
downloadPeerTube-c21a0aa855f61daaca458e16b47f95278898beb4.tar.gz
PeerTube-c21a0aa855f61daaca458e16b47f95278898beb4.tar.zst
PeerTube-c21a0aa855f61daaca458e16b47f95278898beb4.zip
Display a message in embed on unsupported web browser
Diffstat (limited to 'client/src/standalone/videos/embed.html')
-rw-r--r--client/src/standalone/videos/embed.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/client/src/standalone/videos/embed.html b/client/src/standalone/videos/embed.html
index 3455b4aa4..8ec03d199 100644
--- a/client/src/standalone/videos/embed.html
+++ b/client/src/standalone/videos/embed.html
@@ -44,5 +44,31 @@
44 44
45 <div id="placeholder-preview"></div> 45 <div id="placeholder-preview"></div>
46 46
47 <script type="text/javascript">
48 // Can be called in embed.ts
49 window.displayIncompatibleBrowser = function () {
50 const text = 'The player is not compatible with your web browser. Please try latest Firefox version.'
51
52 document.title = 'Sorry' + ' - ' + text
53
54 const errorBlock = document.getElementById('error-block')
55 errorBlock.style.display = 'flex'
56
57 const errorTitle = document.getElementById('error-title')
58 errorTitle.innerHTML = 'Sorry'
59
60 const errorText = document.getElementById('error-content')
61 errorText.innerHTML = text
62 }
63
64 window.onerror = function () {
65 window.displayIncompatibleBrowser()
66 }
67
68 if (/MSIE|Trident/.test(window.navigator.userAgent) ) {
69 window.displayIncompatibleBrowser()
70 }
71 </script>
72
47 </body> 73 </body>
48</html> 74</html>