We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9fb734 commit 063fef5Copy full SHA for 063fef5
www/video-rtc.js
@@ -19,7 +19,7 @@ export class VideoRTC extends HTMLElement {
19
super();
20
21
this.DISCONNECT_TIMEOUT = 5000;
22
- this.RECONNECT_TIMEOUT = 30000;
+ this.RECONNECT_TIMEOUT = 15000;
23
24
this.CODECS = [
25
'avc1.640029', // H.264 high 4.1 (Chromecast 1st and 2nd Gen)
@@ -248,6 +248,11 @@ export class VideoRTC extends HTMLElement {
248
249
this.appendChild(this.video);
250
251
+ this.video.addEventListener('error', ev => {
252
+ console.warn(ev);
253
+ if (this.ws) this.ws.close(); // run reconnect for broken MSE stream
254
+ });
255
+
256
// all Safari lies about supported audio codecs
257
const m = window.navigator.userAgent.match(/Version\/(\d+).+Safari/);
258
if (m) {
0 commit comments