-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
define behaviors of the common ConstrainablePattern Interfaces #48
Comments
Yes, I think that this is important. I think that the only things we want to honor here is the frameRate constraint. The rest can remain unsupported. |
If one desires to make a 640x480 recording of an UHD video element ( (It's OK to say "can't do this", but I don't like the idea of making the spec "can't ask for this"). |
In my opinion you cannot constrain the decoder because it will output UHD frames always - as they were encoded. It would become a processing step rather than a configuration (by constraining the source) step. I think MediaRecorder should have an API for this instead. |
In the scenario I sketched, there might not be a decoder (the UHD-sized video element might be showing animation from a Canvas). Or there might be one. In all cases, the UHD frames will be fed to a rescaler somewhere in the system. The question is just about how we specify the API whereby the user can say "I want this to be rescaled". |
To bring the Constrainable Pattern to the
and also the behaviour of the rest of the Constrainable Pattern methods that are needed as well, i.e. these guys:
And to round the change, We should also have a similar analysis for the "standard" MediaStreamTrack produced by ImageCapture has a rendering of my proposed PR in https://rawgit.com/Miguelao/mediacapture-image/pr001_constrainable_pattern/index.html |
Maybe width and height are OK to change. I'd have to double check with @jan-ivar though on the latest viewpoint on those regarding processing in the track (as opposed to having the source just change its capture size). |
If we only have one constrainable value, |
as to the mediaTrackSupportedConstraints thing - I think you would want to return this in Capabilities (give no alternatives for things you can't alter) rather than supportedConstraints (which ar esupposed to list things where the name is understood by the platform). given that CanvasCaptureMediaStreamTrack is a subclass of MediaStreamTrack, it already inherits the constrainable-pattern functions. You don't get to remove features when inheriting. |
The Constrainable pattern was designed for device discovery and sharing. It's complex, because A) people's devices may not suit your needs, and B) devices you get may already be in use, effectively shared with another party (another tab) - without any knowledge of other parties - which puts a cramp on available settings. It's an API designed around compromise and negotiation. A rescaler is the opposite of that. If you ask for 800x600, you'll always get it. Every time. Exactly. This makes the Constrainable pattern overkill and a terrible API for a rescaler. It's also a weak API, because the pattern allows huge variance in browser implementations. Maybe you'll get
I'd say on the contrary, unless a source explicitly defines constrainable properties, then there are none implied by simply pulling in a pattern. E.g. None of the properties Also, IMHO we should start with needs, not go looking for functionality to implement out of some need for symmetry. From the needs I've heard, something straightforward like what @Pehrsons mentions sounds better to me. |
This issue was mentioned in WEBRTCWG-2024-03-26 (Page 29) |
The spec currently doesn't cover behaviors for the ConstrainablePattern Interfaces. As example, here are some questions with applyConstraints()
In case any of the common ConstrainablePattern Interfaces is irrelevant, the spec should call that out explicitly.
The text was updated successfully, but these errors were encountered: