Skip to content

Commit

Permalink
feat: remove timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
robtpaton committed Aug 18, 2024
1 parent e5695cc commit d0cd114
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions custom_components/webrtc/www/video-rtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class VideoRTC extends HTMLElement {

this.DISCONNECT_TIMEOUT = 5000;
this.RECONNECT_TIMEOUT = 30000;
this.PLAY_REATTEMPT_TIMEOUT = 500;

this.CODECS = [
'avc1.640029', // H.264 high 4.1 (Chromecast 1st and 2nd Gen)
Expand Down Expand Up @@ -170,11 +169,9 @@ export class VideoRTC extends HTMLElement {

if (!this.video.muted && isAutoplayError) {
this.video.muted = true;
setTimeout(() =>
this.video.play().catch(secondError => {
console.warn(secondError);
}
), this.PLAY_REATTEMPT_TIMEOUT);
this.video.play().catch(secondError => {
console.warn(secondError);
});
}
});
}
Expand Down

0 comments on commit d0cd114

Please sign in to comment.