]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE html> | |
2 | <html> | |
3 | <head> | |
4 | <meta charset="UTF-8"> | |
5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
6 | <meta name="robots" content="noindex"> | |
7 | <meta property="og:platform" content="PeerTube" /> | |
8 | ||
9 | <script type="text/javascript"> | |
10 | // Thanks: https://mathiasbynens.be/notes/globalthis | |
11 | (function() { | |
12 | if (typeof globalThis === 'object') return; | |
13 | Object.prototype.__defineGetter__('__magic__', function() { | |
14 | return this; | |
15 | }); | |
16 | __magic__.globalThis = __magic__ | |
17 | delete Object.prototype.__magic__; | |
18 | }()); | |
19 | </script> | |
20 | ||
21 | ||
22 | <!-- /!\ The following comment is used by the server to prerender some tags /!\ --> | |
23 | ||
24 | <!-- title tag --> | |
25 | <!-- description tag --> | |
26 | <!-- custom css tag --> | |
27 | <!-- meta tags --> | |
28 | <!-- server config --> | |
29 | ||
30 | <!-- /!\ Do not remove it /!\ --> | |
31 | ||
32 | <link rel="icon" type="image/png" href="/client/assets/images/favicon.png" /> | |
33 | </head> | |
34 | ||
35 | <body id="custom-css" class="standalone-video-embed"> | |
36 | ||
37 | <div id="error-block"> | |
38 | <!-- eslint-disable-next-line @angular-eslint/template/elements-content --> | |
39 | <h1 id="error-title"></h1> | |
40 | ||
41 | <div id="error-content"></div> | |
42 | </div> | |
43 | ||
44 | <div id="video-wrapper"></div> | |
45 | ||
46 | <div id="placeholder-preview"></div> | |
47 | ||
48 | <script type="text/javascript"> | |
49 | // Can be called in embed.ts | |
50 | window.displayIncompatibleBrowser = function () { | |
51 | const text = 'The player is not compatible with your web browser. Please try latest Firefox version.' | |
52 | ||
53 | document.title = 'Sorry' + ' - ' + text | |
54 | ||
55 | const errorBlock = document.getElementById('error-block') | |
56 | errorBlock.style.display = 'flex' | |
57 | ||
58 | const errorTitle = document.getElementById('error-title') | |
59 | errorTitle.innerHTML = 'Sorry' | |
60 | ||
61 | const errorText = document.getElementById('error-content') | |
62 | errorText.innerHTML = text | |
63 | ||
64 | const videoWrapper = document.getElementById('video-wrapper') | |
65 | if (videoWrapper) videoWrapper.style.display = 'none' | |
66 | ||
67 | const placeholderPreview = document.getElementById('placeholder-preview') | |
68 | if (placeholderPreview) placeholderPreview.style.display = 'none' | |
69 | } | |
70 | ||
71 | window.onerror = function (msg) { | |
72 | if (typeof msg === 'string' && msg.toLowerCase().includes(' ice ')) { | |
73 | console.warn(msg) | |
74 | return | |
75 | } | |
76 | ||
77 | window.displayIncompatibleBrowser() | |
78 | } | |
79 | ||
80 | if (/MSIE|Trident/.test(window.navigator.userAgent) ) { | |
81 | window.displayIncompatibleBrowser() | |
82 | } | |
83 | </script> | |
84 | ||
85 | </body> | |
86 | </html> |