Re: [mediacapture-record] Clarification needed for mime type handling (#170)

I'm leaning towards a proposal that cements current behavior, but makes the `mimeType` attribute accurate while we're recording.

Basically, allow the UA to extend on the mime type that was passed in to the constructor, but not modify it. This would happen in `start()` where tracks are known, and be restored to the mime type passed in to the constructor when recording stops.

This would mean that an audio mime type is not allowed to record a video track. A passed-in audio codec is locked to be used for all audio tracks, but if an audio codec is not passed in we reflect the one used for encoding in the mimetype after start(). Similarly for video. If a container is specified we'd also restrict the tracks to that, in case it, or the UA, doesn't support a track type present in the stream on `start()` we'd throw.

This clarification would have the side effect of throwing in `start()` in case the tracks present in the stream are violating the passed-in mime type.

Any immediate thoughts on this? @jan-ivar? If not I'll write up a PR.

-- 
GitHub Notification of comment by Pehrsons
Please view or discuss this issue at https://github.com/w3c/mediacapture-record/issues/170#issuecomment-503620363 using your GitHub account

Received on Wednesday, 19 June 2019 15:53:33 UTC