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

feat/added Events to player #28

Merged
merged 13 commits into from
Jan 20, 2025
Merged

Conversation

Manuel-Barrabino
Copy link
Contributor

The Player extends EventTarget in order to dispatch events to be listen with addEventListener. Those events are:

  • loadeddata: Fired when the first frame of the media has finished loading.
  • play: Triggered when the video starts playing.
  • pause: Triggered when the video playback is paused.
  • catalogupdated: Triggered when the catalog is updated. In this case, only when it's received initially.
  • volumechange: Triggered when the user adjusts the volume.
  • loadedmetadata:  Triggered when the video metadata (duration, dimensions, etc.) has been loaded. In this case the only metadata is when the catalog is received initially.
  • error: Triggered when an error occurs during video playback.

Could not implement the next events:

  • waiting: Fired when playback has stopped because of a temporary lack of data.
    We did not implement this event because it did not made sense in live edge for us.
  • ended: Triggered when the video reaches the end. 
    In the current player status, it only streams nonstop.
  • (nonstandard) adaptation: Triggered when the player changes the rendered video or audio track. 
    AdaptationEvents are not fired for manual track selections, so this event has no use in the current player state.
  • fullscreenchange: Triggered when the user enters or exits fullscreen mode.
    This functionality is not implemented yet.
  • timeupdate: Triggered periodically as the video plays, providing the current playback time.
    There is no current playback time in the player right now.

@englishm englishm merged commit e5e4b0a into englishm:main Jan 20, 2025
1 check passed
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