Skip to content
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

Do not communicate needlessly the media element to multiple modules #1641

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

peaBerberian
Copy link
Collaborator

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 a PlaybackObserver 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 the HTMLMediaElement in general (and perhaps rename it), a bit like the SourceBufferInterface is for SourceBuffer objects. We're not too far from this.

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 a
`PlaybackObserver` 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 the `HTMLMediaElement` in general (and
perhaps rename it), a bit like the `SourceBufferInterface` is
for `SourceBuffer` objects. We're not too far from this.
@peaBerberian peaBerberian force-pushed the misc/avoid-media-element branch from e63c6ce to 1590912 Compare February 3, 2025 14:14
Copy link

github-actions bot commented Feb 3, 2025

Automated performance checks have been performed on commit 15909127f05441119181818a4029bba5e61dd75d with the base branch dev.

Tests results

✅ Tests have passed.

Performance tests 1st run output

No significative change in performance for tests:

Name Mean Median
loading 21.36ms -> 21.28ms (0.083ms, z: 1.39279) 29.25ms -> 29.25ms
seeking 21.19ms -> 18.52ms (2.670ms, z: 0.18049) 11.85ms -> 11.85ms
audio-track-reload 27.79ms -> 27.81ms (-0.011ms, z: 1.13248) 40.65ms -> 40.65ms
cold loading multithread 50.86ms -> 50.12ms (0.736ms, z: 10.88135) 74.55ms -> 73.20ms
seeking multithread 25.62ms -> 27.67ms (-2.048ms, z: 0.56890) 10.65ms -> 10.65ms
audio-track-reload multithread 27.76ms -> 27.77ms (-0.003ms, z: 0.82851) 40.80ms -> 40.80ms
hot loading multithread 17.36ms -> 17.09ms (0.270ms, z: 3.62908) 24.90ms -> 24.75ms

If you want to skip performance checks for latter commits, add the skip-performance-checks label to this Pull Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant