-
Notifications
You must be signed in to change notification settings - Fork 10
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
Can the MediaStreamTrack list its cropping regions directly? #6
Comments
I generally like the idea, but I see some issues. Discussion follows.
Not necessarily. We could say that calling produceCropTarget() immediately registers the crop-ID on all relevant tracks, present and future.
As mentioned, I like the idea. Some potential issues here, curious to hear if you have good solutions.
nit: I think you mean
Not sure if "complex" is the right word, but it's a bit more ergonomic if tokens are already attached to the track, than if the sender has to "manually" attach them to the message (or send a separate message). Modulo aforementioned issues. I do not see this as a strong selling point. |
Right, the goal of the proposal is indeed to use sensible names like "main", "slides"... If it is not possible to fully collaborate (would be sad), the application could do something like "main-XYZ", "slides-XYZ", XYZ being given to the capturer for extra safety, "main" and "slides" having an application specific semantic.
This token is only visible to trusted parties, i.e. the top level frames or frames that are deemed capturing in the name of the top level frame. I think this gives a good enough story.
Right.
It is indeed more ergonomic because it is attached to the track. The additional point is that it allows a more declarative approach so that an iframe may create its regions without ever reacting to a message from its parent, or sending a message to its parent. |
We agree that exposing the regions on the track[*] would be ergonomic.
That we can add this later is especially true because I'll continue the discussion of the merits of expose-on-track in my next comment, but I hope we can agree that this is a non-blocking early discussion about later improvements? @youennf? @jan-ivar? [*] This refers back to issue #10, as we are now discussing yet another property to be exposed on tracks, and so the issue of irrelevant-exposure becomes more important. It strikes me as odd that when |
This comment continues the discussion of
I think we want these to be Assume we (later) extends
My order of preference is currently with no1 as the most preferred and no3 as the least preferred.
It's a credible story only so long as we don't try to reuse this mechanism for cropping non-own-tabs. The assertion that "the author of [*] That is, not without extending the API further. |
I was answering for the case of self tabs and creator of the region not providing any origin restriction. That said, I am not sure I like it since it is yet another hole in our partitioning client rules. |
I missed that question. |
That requires extending the API even further. For me, this is beyond the scope of an MVP. This thread has me convinced that we have a viable way forward for both (i) exposing region on the track and (ii) doing so in a way that's consistent with other-tab-capture. Tabling this discussion would not risk us painting ourselves into a corner. The only thing I see us potentially losing by not having this discussion right away, is that we might specify that Wdyt? |
Another interesting corollary of your suggestion to expose CropTargets on MediaStreamTrack, is that whenever a CropTarget is minted, it "magically" produces a new entry elsewhere with a message in the form of your |
This is part of the API example exposed in the initial message of this thread.
It depends on the API used to create a CropTarget, this seems fine in scope of the API example exposed in the initial message of this thread.
Yes, that is my main concern, even though in practice it does not really matter (the fact you self capture is already breaking the isolation), it seems best to stick with something simple.
Sounds good to me. |
There are two separate access-controls here:
I gather from your latest message that you intend the same access-control to apply to both simultaneously. I'd just like to bring to your attention that, so long CropTargets are transferable, the first does not imply the second. You'd have to explicitly state that your access-control applies to both. And then you'd also need to discuss what happens to a track that's transferred after a crop has been applied, if the new owner of the track would not have otherwise been allowed to crop by itself. Access-control is hard and best left as post-MVP whenever possible[*].
Great, seems like we agree about it being post-MVP. I look forward to resuming this discussion when we've reaches consensus on the MVP parts. -- |
Transferring a track is not transferring the source, so the source origin remains stable. |
When trying to apply a region to a track, you currently do not know whether the region can be used for the track.
This might be getting more complex if transferring the MediaStreamTrack say to a worker. You then need to transfer the regions where you transfer the track. This might be worse if allowing cropping for any tab in the future. This also goes against the idea of tracks being descriptive in their capabilities.
It would seem more natural if the regions could be retrieved directly from the track itself.
Here is an API example that could illustrate this:
The main issue with that idea is that this might require to expose an API on the capturee-side, so that the MediaStreamTrack source can explicitly list its regions. This is the part I am most annoyed with, in particular with regards to the handling of third-party iframes. Here is nonetheless an API example to illustrate what could be done if the source is a browser tab:
The text was updated successfully, but these errors were encountered: