Do not communicate needlessly the media element to multiple modules #1641
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While rebasing our Proof-of-concept for content preloading, I noticed that multiple modules asked for the
HTMLMediaElement
to be provided to them as argument despite the fact that most of them also rely on aPlaybackObserver
which fulfill most of its roles.I decided to just remove that unneeded dependency for them.
A longer-term end goal might be to make
PlaybackObserver
the preferred interface to theHTMLMediaElement
in general (and perhaps rename it), a bit like theSourceBufferInterface
is forSourceBuffer
objects. We're not too far from this.