SRGSSR / pillarbox-web-suite

A suite of plugins, themes, and components for pillarbox-web
https://srgssr.github.io/pillarbox-web-suite/
MIT License
4 stars 0 forks source link

feat(playlist-plugin): implement smart navigation based on playback position #24

Closed jboix closed 3 months ago

jboix commented 4 months ago

Description

Resolves #17 by implementing smart navigation to the previous item in the playlist based on the current playback position:

Example usage:

import pillarbox from '@srgssr/pillarbox-web';
import './src/pillarbox-playlist-ui.js';

window.player = pillarbox('player', {
  plugins: {
    pillarboxPlaylist: {
      // The threshold in seconds
      previousNavigationThreshold: 10
    }
  }
});

Changes Made

Checklist

github-actions[bot] commented 4 months ago

Coverage Report

Status Category Percentage Covered / Total
šŸ”µ Lines 94.47% 958 / 1014
šŸ”µ Statements 94.47% 958 / 1014
šŸ”µ Functions 94.2% 65 / 69
šŸ”µ Branches 92.23% 95 / 103
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/pillarbox-playlist/src/pillarbox-playlist.js 98.84% 89.36% 95.83% 98.84% 107-110, 394
Generated in workflow #75
github-actions[bot] commented 4 months ago

PR Preview Action v1.4.7 :---: Preview removed because the pull request was closed. 2024-06-21 09:34 UTC

github-actions[bot] commented 3 months ago

:tada: This PR is included in version @srgssr/pillarbox-playlist-v1.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: