Use replaceTrack(null) for pauseUpstream#712
Conversation
Previously we were creating placeholder tracks, that is not compatible with react-native.
🦋 Changeset detectedLatest commit: 8c4acc6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
|
Tested as working on RN with both iOS and Android. On Android, seemed to add a small delay (increased to about half a second) when connected to a local server, but didn't seem to increase over repeated usages and the audio/video stayed in sync. |
|
there's a Safari issue from 2018 that might be a problem https://bugs.webkit.org/show_bug.cgi?id=184911 Only looking at the date of the fix it seems like the bug is present on Safari versions prior to 12 |
|
@lukasIO thanks for checking on this.. do you think we should keep the existing behavior for older browsers like Safari 12? |
|
the existing behaviour would then only apply to Safari 11.x as versions before that do not support canvas.captureStream that we use for creating the dummy video track. (https://caniuse.com/mdn-api_htmlcanvaselement_capturestream) Alternatively we could throw an error instead when trying to use the API on Safari 11 (instead of ending the track) and declare the API to be only supported on Safari >= 12. |
|
I like the latter approach. will update the docstring and throw an exception < Safari 12 |
Previously we were creating placeholder tracks, that is not compatible with react-native.
Previously we were creating placeholder tracks, that is not compatible with react-native. This is the second attempt. With the previous attempt in #712, paused tracks were not unpublished correctly.
Previously we were creating placeholder tracks, that is not compatible with react-native.