Skip to content

Double Tab Seeking Left/Right #1218

Answered by mihar-22
chethavuthy asked this question in Q&A
Discussion options

You must be logged in to vote

Not an officially documented or public API available for this but you can try doing it like this:

JS

player.addEventListener("media-seek-request", event => {
  const originEvent = event.originEvent;
  if (originEvent && 'MEDIA_GESTURE' in originEvent) {
    // ...
  }
});

React

import { type MediaSeekRequestEvent } from '@vidstack/react';

function onSeekRequest(time: number, nativeEvent: MediaSeekRequestEvent) {
  const originEvent = event.originEvent;
  if (originEvent && 'MEDIA_GESTURE' in originEvent) {
    // ...
  }
}

<MediaPlayer onMediaSeekRequest={onSeekRequest}>

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@chethavuthy
Comment options

@mihar-22
Comment options

@chethavuthy
Comment options

Answer selected by chethavuthy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants