-
Notifications
You must be signed in to change notification settings - Fork 1
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
Handle time intervals #212
Labels
Milestone
Comments
On Apple platforms |
amtins
added a commit
that referenced
this issue
Feb 20, 2024
Resolves #212 by giving developers access to intervals directly from the player's text tracks. Intervals, as defined by SRG SSR, can be used, for example, to define the position of the opening and closing credits of a media. Intervals can be accessed in several ways. The first is raw data via the mediaData object from player currentSource. The second is via the player's textTracks. This latter method allows you to listen to the cuechange event and react as required. ```javascript // Accessing raw data player.currentSource().mediaData.intervals; // Listen for cuechange events and get the active cue player.textTracks().getTrackById('srgssr-intervals').on('cuechange', ()=>{ const [active] = Array.from(player.textTracks().getTrackById('srgssr-intervals').activeCues); JSON.parse(active); // note that active can be undefined }); ``` - adds the intervals property to the mediaComposition - adds a function for adding intervals to the player - adds intervals when resolving the resource in the setSource function - add test cases - add a test media containing an interval
amtins
added a commit
that referenced
this issue
Feb 23, 2024
Resolves #212 by giving developers access to intervals directly from the player's text tracks. Intervals, as defined by SRG SSR, can be used, for example, to define the position of the opening and closing credits of a media. Intervals can be accessed in several ways. The first is raw data via the mediaData object from player currentSource. The second is via the player's textTracks. This latter method allows you to listen to the cuechange event and react as required. ```javascript // Accessing raw data player.currentSource().mediaData.intervals; // Listen for cuechange events and get the active cue player.textTracks().getTrackById('srgssr-intervals').on('cuechange', ()=>{ const [active] = Array.from(player.textTracks().getTrackById('srgssr-intervals').activeCues); JSON.parse(active); // note that active can be undefined }); ``` - adds the intervals property to the mediaComposition - adds a function for adding intervals to the player - adds intervals when resolving the resource in the setSource function - add test cases - add a test media containing an interval
amtins
added a commit
that referenced
this issue
Feb 23, 2024
Resolves #212 by giving developers access to intervals directly from the player's text tracks. Intervals, as defined by SRG SSR, can be used, for example, to define the position of the opening and closing credits of a media. Intervals can be accessed in several ways. The first is raw data via the mediaData object from player currentSource. The second is via the player's textTracks. This latter method allows you to listen to the cuechange event and react as required. ```javascript // Accessing raw data player.currentSource().mediaData.intervals; // Listen for cuechange events and get the active cue player.textTracks().getTrackById('srgssr-intervals').on('cuechange', ()=>{ const [active] = Array.from(player.textTracks().getTrackById('srgssr-intervals').activeCues); JSON.parse(active.text); // note that active can be undefined }); ``` - adds the intervals property to the mediaComposition - adds a function for adding intervals to the player - adds intervals when resolving the resource in the setSource function - add test cases - add a test media containing an interval
amtins
added a commit
that referenced
this issue
Feb 23, 2024
Resolves #212 by giving developers access to intervals directly from the player's text tracks. Intervals, as defined by SRG SSR, can be used, for example, to define the position of the opening and closing credits of a media. Intervals can be accessed in several ways. The first is raw data via the mediaData object from player currentSource. The second is via the player's textTracks. This latter method allows you to listen to the cuechange event and react as required. ```javascript // Accessing raw data player.currentSource().mediaData.intervals; // Listen for cuechange events and get the active cue player.textTracks().getTrackById('srgssr-intervals').on('cuechange', ()=>{ const [active] = Array.from(player.textTracks().getTrackById('srgssr-intervals').activeCues); JSON.parse(active.text); // note that active can be undefined }); ``` - adds the intervals property to the mediaComposition - adds a function for adding intervals to the player - adds intervals when resolving the resource in the setSource function - add test cases - add a test media containing an interval
github-actions bot
pushed a commit
that referenced
this issue
Feb 23, 2024
## [1.1.0](v1.0.1...v1.1.0) (2024-02-23) ### Refactor 🔩 * **srgssr-middleware:** move srgssr specific options declaration ([1138f89](1138f89)) * **srgssrg-middleware:** extraction of duplicated code in text tracks ([4ff0bc8](4ff0bc8)) ### New Features 🚀 * **mediaComposition:** exposes the media URN through the main resources ([4b4c5a5](4b4c5a5)) * **srgssr-middleware:** add blocked segments support ([ad4e906](ad4e906)), closes [#211](#211) * **srgssr-middleware:** add chapters support ([62ff02a](62ff02a)), closes [#204](#204) * **srgssr-middleware:** add intervals support ([00ad42c](00ad42c)), closes [#212](#212) * **srgssr-middleware:** add support for remote subtitles ([dbe9eb4](dbe9eb4)), closes [#203](#203) ### CI 🔁 * add pull request previews ([a50f20d](a50f20d)), closes [#196](#196) ### Docs 📖 * **analytics:** add tracking limitations section to known issues ([a69c916](a69c916)), closes [#208](#208)
🎉 This issue has been resolved in version 1.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a developer, I'd like to be able to create my own UI/UX for time intervals, e.g skip credits
Acceptance Criteria
The text was updated successfully, but these errors were encountered: