w3c / mediacapture-extensions

Extensions to Media Capture and Streams by the WebRTC Working Group
https://w3c.github.io/mediacapture-extensions/
Other
19 stars 14 forks source link

MediaStreamTrack transfer requires secure context? #73

Open dogben opened 1 year ago

dogben commented 1 year ago

Many APIs providing a MediaStreamTrack are limited by SecureContext in WebIDL, such as enumerateDevices, getUserMedia, and getDisplayMedia. Other APIs do not require a SecureContext, e.g. captureStream.

Which of the following is the correct restriction for transferring a MediaStreamTrack?

  1. Any track can be transferred, regardless of whether the origin and/or destination contexts are secure. (This is how I interpret the current wording.)
  2. Transfer fails if either the origin or destination contexts are not secure.
  3. If the origin context is secure, transfer fails if the destination context is not secure.
  4. Something else?

@alvestrand

youennf commented 1 year ago

A captureStream MediaStreamTrack should be transferrable and can be created in not secure contexts. I think option 1 is what the spec currently implies as well.