owt-client-javascript
owt-client-javascript copied to clipboard
p2p firefox remoteStream.ended event not trigger after chrome call publication.stop()
1: firefox connect server 2: chrome connect server 3: chrome and firefox setRemoteId each other 4: chrome publish localStream to firefox success 5: chrome call publication.stop()
expect: firefox side remoteStream.ended event will be triggered
actual: firefox side remoteStream.ended event can not be triggered
version: chrome : 86.0.4240.198(ubuntu 18.04) firefox : 83.0 (windows10)
With the Transceivers API, track.ended event is only triggered when the corresponding transceiver stops. This does not happen when tracks are removed with removeTrack (or removeStream).
By the way, the only reason this still works in Chrome is rather strange code in the _isUnifiedPlan function of the P2PPeerConnectionChannel: it actually checks whether the browser (unless it is Firefox) changes suggested unified-plan semantics to plan-b.