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

Feature Request: Seek or Scrub Media Source #1219

Open
respectTheCode opened this issue May 5, 2024 · 1 comment
Open

Feature Request: Seek or Scrub Media Source #1219

respectTheCode opened this issue May 5, 2024 · 1 comment

Comments

@respectTheCode
Copy link

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

It would be great to have away to move the playhead of a media source to an absolute or relative time

Requested Feature Usage Scenario

While a video is playing jump back 15 seconds to repeat a section.

Jumping to the last 30 seconds of a video to see how it ends.

@Joefis-x20s
Copy link

Joefis-x20s commented May 22, 2024

You can use GetMediaInputStatus to get the current playback time in milliseconds along with the playback status and the total length of the video.

Using this info just do a calculation on that data and then use SetMediaInputCursor to set the media source to that time. (Be aware of the keyframe interval of your video. As you'd ideally want to seek to a keyframe for eg 2 sec you'd want to seek to 2000,4000,6000....)

TriggerMediaInputAction can also be used to Play/Pause/Restart/Stop the media source. (If you plan on seeking frequently it's best to pause the source before doing so.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants