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

chore: Add MANIFEST_LOADING_STARTED event #3882

Conversation

vodlogic
Copy link
Contributor

We have a requirement to refresh the CDN token on the manifest URL. We found that updating the URL using attachSource() added a black screen for about a second, so we are now using this event in conjunction with RequestModifier.

@dsilhavy dsilhavy added this to the 4.3.0 milestone Feb 18, 2022
@@ -58,6 +58,7 @@ class CoreEvents extends EventsBase {
this.LOADING_PROGRESS = 'loadingProgress';
this.LOADING_DATA_PROGRESS = 'loadingDataProgress';
this.LOADING_ABANDONED = 'loadingAborted';
this.MANIFEST_LOADING_STARTED = 'manifestLoadingStarted';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using this event in your application? Then please add it to MediaPlayerEvents , CoreEvents are internal events that should not be needed at the player level.

@dsilhavy dsilhavy modified the milestones: 4.3.0, 4.3.1 Feb 20, 2022
@bbert
Copy link
Contributor

bbert commented Feb 21, 2022

Hello @vodlogic @dsilhavy
Another way to resolve this issue of MPD url token expiration is to propose an API to update the manifest URL for the session.
For example: MediaPlayer::updateManifestUrl(newUrl)

Thus, once the token has expired, you would be able to provide (by anticipation or once you get an (403) error on manifest update) the new manifest url without having to implement a RequestModifier.

What do you think?

@vodlogic
Copy link
Contributor Author

I personally think that having the new API suggested by @bbert would be beneficial as it would reduce the overhead of parsing the existing URL in the event. I'm still getting familiar with the innards of the player, so would welcome your input on what variable / property the updateManifestUrl() function should update.

The event in this PR may still be useful in some circumstances once its been moved to an exposed MediaPlayer event

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.

3 participants