Open travishaagen opened 3 years ago
In format/webrtcv3/adapter.go a data-channel is required to keep the WebRTC connection open.
format/webrtcv3/adapter.go
peerConnection.OnDataChannel(func(d *webrtc.DataChannel) { d.OnMessage(func(msg webrtc.DataChannelMessage) { element.ClientACK.Reset(5 * time.Second) }) })
I see RTSPtoWebRTC/web/static/js/app.js this note:
RTSPtoWebRTC/web/static/js/app.js
//send ping becouse PION not handle RTCSessionDescription.close() sendChannel = pc.createDataChannel('foo'); sendChannel.onclose = () => console.log('sendChannel has closed'); sendChannel.onopen = () => { console.log('sendChannel has opened'); sendChannel.send('ping'); setInterval(() => { sendChannel.send('ping'); }, 1000) } sendChannel.onmessage = e => log(`Message from DataChannel '${sendChannel.label}' payload '${e.data}'`);
If this is a bug/limitation in pion/webrtc, it would need to be fixed there first. Is there an issue filed with that project? I could not find one.
pion/webrtc
pion has already fixed this problem, we have removed this block.
In
format/webrtcv3/adapter.go
a data-channel is required to keep the WebRTC connection open.I see
RTSPtoWebRTC/web/static/js/app.js
this note:If this is a bug/limitation in
pion/webrtc
, it would need to be fixed there first. Is there an issue filed with that project? I could not find one.