[Webkit-unassigned] [Bug 262375] New: MediaStreamTrack (getUserMedia) setting is lost after cloning

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 29 09:02:45 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=262375

            Bug ID: 262375
           Summary: MediaStreamTrack (getUserMedia) setting is lost after
                    cloning
           Product: WebKit
           Version: Safari 16
          Hardware: iPhone / iPad
                OS: iOS 16
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebRTC
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mukeshbiswas at microsoft.com
                CC: youennf at gmail.com

I have encountered a bug in WebKit related to the cloning of MediaStreamTrack objects obtained through getUserMedia(). The cloned track loses its settings, specifically the resolution. 

This behavior is unexpected as it doesn't follow the w3c spec(https://www.w3.org/TR/mediacapture-streams/#dom-mediastreamtrack-clone)
Steps to Reproduce:

1 - Obtain MediaStream through getUserMedia()
2 - Attach it to DOM Video element. ----- Height 640, Width 360
3 - Clone the MediaStream using the stream.clone(), or construct new stream after cloning individual tracks.
4 - Attach it to DOM Video element.
5 - Repeat the step 3 and 4
6 - The resolution is lost after cloning 2nd times ----- Height 360, Width 640 

Expected Results:
The cloned MediaStreamTrack should retain all its settings, including dimensions, after cloning.

Actual Results:
The cloned MediaStreamTrack does not have the correct dimensions and may have other settings lost as well. It swaps the height and width

CodePen link: https://codepen.io/Mukesh-the-decoder/pen/VwqrpZv

Device: IPhone 16, Safari

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230929/de738aa2/attachment-0001.htm>


More information about the webkit-unassigned mailing list