owt-client-javascript icon indicating copy to clipboard operation
owt-client-javascript copied to clipboard

p2p firefox remoteStream.ended event not trigger after chrome call publication.stop()

Open zhangyihui1 opened this issue 5 years ago • 1 comments

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)

zhangyihui1 avatar Nov 13 '20 08:11 zhangyihui1

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.

snnz avatar Nov 18 '20 22:11 snnz