Closed Bug 1257569 Opened 9 years ago Closed 9 years ago

replaceTrack does not update peer identity

Categories

(Core :: WebRTC, defect, P1)

defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox48 --- affected

People

(Reporter: jib, Assigned: jib)

References

Details

Attachments

(2 files)

STR: 1. Open https://jsfiddle.net/rv4v8n6w/ 2. Hit [Start!] and share camera+mic. 3. Hit [Replace!] and share same (or different if you have) camera+mic. Expected result: SecurityError (because 2nd stream has explicit peerIdentity). Actual result: 10 second recording finishes & plays (including both camera angles in the same stream if you picked two different cameras). (pehrsons has a patch that refactors all the principal stuff for tracks and streams, and fixes this in bug 1208371, so marking as blocked on that).
Rank: 19
Priority: -- → P1
Actually, looks like the patch pehrsons gave me worked (turning the video black, not SecurityError as I said in comment 0). Will upload it here.
Assignee: nobody → jib
No longer depends on: 1208371
Attachment #8731846 - Flags: review?(martin.thomson) → review+
Comment on attachment 8731846 [details] MozReview Request: Bug 1257569 - Update sink identity after adding track. r?mt https://reviewboard.mozilla.org/r/40879/#review37409
Comment on attachment 8731846 [details] MozReview Request: Bug 1257569 - Update sink identity after adding track. r?mt Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40879/diff/1-2/
Fixed a merge mistake. Also I notice the video goes black, but the audio keeps going. Something's missing. Should also make a test out of the fiddle.
Comment on attachment 8731846 [details] MozReview Request: Bug 1257569 - Update sink identity after adding track. r?mt Couldn't figure out how to ask for review in again mozReview...
Attachment #8731846 - Flags: review+ → review?(martin.thomson)
Attachment #8731846 - Flags: review?(martin.thomson) → review+
Comment on attachment 8731846 [details] MozReview Request: Bug 1257569 - Update sink identity after adding track. r?mt https://reviewboard.mozilla.org/r/40879/#review37427 Yes, please try to test this somehow.
(In reply to Jan-Ivar Bruaroey [:jib] from comment #5) > Also I notice the video goes black, but the audio > keeps going. Something's missing. You only replace video? Is audio expected to go silent if it's bundled with video that breaks the privacy constraint, even if itself does not?
No, I'm just a doofus. I've updated the fiddle and it now turns silent. Thanks for catching that.
BTW, when it goes silent I see spew of this: [Child 97804] ###!!! ASSERTION: Unknown format: 'aFormat == AUDIO_FORMAT_S16 || aFormat == AUDIO_FORMAT_FLOAT32', file /Users/Jan/moz/mozilla-central/dom/media/AudioSampleFormat.h, line 247 Would be nice if our asserts printed what the value actually was (it's AUDIO_FORMAT_SILENCE). Is this a bug that should be filed somewhere?
> Would be nice if our asserts printed what the value actually was (it's > AUDIO_FORMAT_SILENCE). > > Is this a bug that should be filed somewhere? Some of the assertion routines don't take format strings (NS_ASSERTION?) Sounds like the assert should be updated though (and maybe the code)
(In reply to Jan-Ivar Bruaroey [:jib] from comment #10) > BTW, when it goes silent I see spew of this: > > [Child 97804] ###!!! ASSERTION: Unknown format: 'aFormat == AUDIO_FORMAT_S16 > || aFormat == AUDIO_FORMAT_FLOAT32', file > /Users/Jan/moz/mozilla-central/dom/media/AudioSampleFormat.h, line 247 > > Would be nice if our asserts printed what the value actually was (it's > AUDIO_FORMAT_SILENCE). > > Is this a bug that should be filed somewhere? Here's where the silence comes from: https://dxr.mozilla.org/mozilla-central/rev/3e04659fdf6aef792f7cf9840189c6c38d08d1e8/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp#1000 I also have a patch for that in the queue for bug 1208371 - though not published yet.
Like so, but this won't apply cleanly on m-c.
jib, FYI with bug 1208371 landed, following your STR, my recording gets black after hitting "Replace!". Not sure if it's exactly per spec but much better.
Flags: needinfo?(jib)
That matches comment 1. I may have been mixing peer identity and cross origin restrictions. Maybe we can close this.
Flags: needinfo?(jib) → needinfo?(martin.thomson)
Great!
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(martin.thomson)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: