Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to activate seeking (via keyboard) even if only clicked on "play-large" button (the center play button)? #2780

Unanswered
RaulSofia asked this question in Q&A
Discussion options

How can I allow seeking (forward or backward n seconds) if the user only clicked the large center play button? In the https://plyr.io/ demo it works as I intend it to: whenever the user plays the video, no matter whether he clicks on the center button or wherever else in the player, the video starts playing and I can seek forward or backward with the keyboard arrows. However, whenever I include a plyr player on my HTML, only with the default playerSettings, it seems to only accept seeking interaction if the user played the video by NOT clicking the center play button (and clicking somewhere else instead to start playing or pause). Whenever the video is played (or paused, too) via the center button, seeking action is irresponsive. Is there some setting I should tweak to acomplis this?

Below I append my current plyr player settings.

Thanks in advance.

var playerSettings = {
 controls: [
 'play-large', // The large play button in the center
 // 'restart', // Restart playback
 'rewind', // Rewind by the seek time (default 10 seconds)
 'play', // Play/pause playback
 'fast-forward', // Fast forward by the seek time (default 10 seconds)
 'progress', // The progress bar and scrubber for playback and buffering
 'current-time', // The current time of playback
 'duration', // The full duration of the media
 'mute', // Toggle mute
 'volume', // Volume control
 // 'captions', // Toggle captions
 'settings', // Settings menu
 // 'pip', // Picture-in-picture (currently Safari only)
 // 'airplay', // Airplay (currently Safari only)
 // 'download', // Show a download button with a link to either the current source or a custom URL you specify in your options
 'fullscreen', // Toggle fullscreen
 ],
 speed: {
 selected: 1,
 options: [1]
 },
 seekTime: 5,
 };
 const player = new Plyr('video', playerSettings);
 window.player = player;
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /