Expose videoId of MediaElement
Categories
(GeckoView :: Media, enhancement)
Tracking
(Not tracked)
People
(Reporter: sebastian, Unassigned)
References
Details
In AC we are wrapping MediaElement and keeping a list of those media elements. It would be super helpful if we could expose "videoId" from MediaElement. That would help us manage them (e.g. when having to remove one) - like GeckoSession does internally too.
(In reply to Sebastian Kaspari (:sebastian; :pocmo) from comment #0)
In AC we are wrapping MediaElement and keeping a list of those media elements. It would be super helpful if we could expose "videoId" from MediaElement. That would help us manage them (e.g. when having to remove one) - like GeckoSession does internally too.
Apparently the id is just an index[1], so it's probably not too useful. You can just use reference equality, right? We should also make equals()
work.
Reporter | ||
Comment 2•5 years ago
|
||
Apparently the id is just an index[1], so it's probably not too useful
But you seem to use the id internally also to keep and update a list?
https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java#760-779
You can just use reference equality, right?
In theory yes.
Although it's a bit more complicated since we wrap that MediaElement in a generic Media state object.
We should also make equals() work.
How do you plan to do that without any state (except the id) in MediaElement?
(In reply to Sebastian Kaspari (:sebastian; :pocmo) from comment #2)
Apparently the id is just an index[1], so it's probably not too useful
But you seem to use the id internally also to keep and update a list?
https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java#760-779You can just use reference equality, right?
In theory yes.
Although it's a bit more complicated since we wrap that MediaElement in a generic Media state object.
In that case you could make equals()
work on your wrapper and make it use ref equality for the interior MediaElement
instance.
We should also make equals() work.
How do you plan to do that without any state (except the id) in MediaElement?
We'd probably need to make the id more useful and then rely on that. The point I was trying to make is that you shouldn't need the id anyway if we're doing the right thing.
Reporter | ||
Comment 4•5 years ago
|
||
No longer needed.
Comment 5•2 years ago
|
||
Moving some media bugs to the new GeckoView::Media component.
Description
•