From bb15fbf29717953f8cf290bc8423495854bd80f8 Mon Sep 17 00:00:00 2001 From: Mustafa BOLEKEN Date: Mon, 10 Apr 2023 13:49:51 +0300 Subject: [PATCH 1/2] Handle when high resource error occurs, connect again --- src/plugin.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugin.js b/src/plugin.js index dc597fb..49fc77b 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -83,6 +83,15 @@ class WebRTCHandler { } break; } + case ANT_CALLBACKS.CLOSED: { + if (iceConnected) { + // webrtc connection was successful and try to play again with webrtc + this.webRTCAdaptor.getStreamInfo(this.source.streamName); + } else { + this.initiateWebRTCAdaptor(this.source, this.options); + } + break; + } case ANT_CALLBACKS.PLAY_STARTED: { this.joinStreamHandler(obj); break; From 77f4fa4a140bc6f637ca90071df30bd0e7e9c9bf Mon Sep 17 00:00:00 2001 From: Mustafa BOLEKEN Date: Mon, 10 Apr 2023 16:48:40 +0300 Subject: [PATCH 2/2] Update plugin.js --- src/plugin.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugin.js b/src/plugin.js index 49fc77b..79758a1 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -85,7 +85,6 @@ class WebRTCHandler { } case ANT_CALLBACKS.CLOSED: { if (iceConnected) { - // webrtc connection was successful and try to play again with webrtc this.webRTCAdaptor.getStreamInfo(this.source.streamName); } else { this.initiateWebRTCAdaptor(this.source, this.options);