File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
lib/membrane_webrtc/ex_webrtc Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ defmodule Membrane.WebRTC.ExWebRTCSource do
3838 output_tracks: % { ( pad_id :: term ( ) ) => output_track ( ) } ,
3939 awaiting_outputs: [ { :video | :audio , Membrane.Pad . ref ( ) } ] ,
4040 awaiting_candidates: [ ExWebRTC.ICECandidate . t ( ) ] ,
41- signaling: Signaling . t ( ) | { :websocket , SimpleWebSocketServer . options ( ) } ,
41+ signaling:
42+ Signaling . t ( )
43+ | { :websocket , SimpleWebSocketServer . options ( ) }
44+ | { :whip , Membrane.WebRTC.Source . whip_options ( ) } ,
4245 status: :init | :connecting | :connected | :closed ,
4346 audio_params: [ ExWebRTC.RTPCodecParameters . t ( ) ] ,
4447 video_params: [ ExWebRTC.RTPCodecParameters . t ( ) ] ,
@@ -304,6 +307,10 @@ defmodule Membrane.WebRTC.ExWebRTCSource do
304307 ctx ,
305308 % { signaling: % { pid: signaling_pid } } = state
306309 ) do
310+ if state . pc != nil do
311+ PeerConnection . stop ( state . pc )
312+ end
313+
307314 handle_close ( ctx , state )
308315 end
309316
@@ -313,6 +320,7 @@ defmodule Membrane.WebRTC.ExWebRTCSource do
313320 ctx ,
314321 % { pc: pc } = state
315322 ) do
323+ Signaling . close ( state . signaling_pid )
316324 handle_close ( ctx , state )
317325 end
318326
You can’t perform that action at this time.
0 commit comments