Hi, I need a play and a reverse buttons to control a mp4. I have seen the following solution that controls the video with a slider:
Does anyone have an Idea about how to create a video scrub controller in a banner ad (doubleClick).
Moving a toggle would make video scub forward or backwards.
Cheers I anyone can help.
Clinton
I need to do the same, but the video is triggered forward when the play button is pressed and backward with the back button.
Thanks!
MaxZieb
(Loves Hype)
November 25, 2021, 10:54am
#2
Do you want to play the video in reverse? or just rewind it? Just a hint that videos are streamed progressively. There is no easy way to play them backwards without getting strange or laggy behavior.
jonathan
(Jonathan Deutsch)
November 25, 2021, 8:08pm
#3
Using a negative value for the HTML5 video's playbackRate
looks only supported by Safari:
opened 03:13PM - 09 Jun 18 UTC
addition/proposal
needs implementer interest
topic: media
interop
### The Problem
The spec does not require support for negative playback rates… . Some browsers support a negative playback rate, others do not.
| Browser | Support? |
| ----- | ----- |
| Safari | ✔|
| Chrome | ✘|
| Firefox | ✘|
| Edge | ? |
> Should I add other browsers to this table?
### Proposed Changes
1. an update to the spec to require support for negative playback rate
2. browser willingness to implement the functionality
Perhaps it would make sense to require the same playback rates in both directions. So if a browser supports from +0.1 to +16, then it would also need to support -0.1 to -16.
### Previous discussion
#### Firefox
@cpearce from the Mozilla team summarized the opinion of the Firefox team over in https://github.com/whatwg/html/issues/2754#issuecomment-308314017 :
> As a feature, it seems more of a gimmick, a usage pattern left over from the days of VCRs, rather than something which will have significant use in the modern web. We don't see a compelling use case for it.
#### Chrome
_It has probably been discussed somewhere, but I do not where the discussion is at this time. I couldn't find an existing Chromium issue._
### Usefulness
> I originally described this example over in https://github.com/whatwg/html/issues/2754#issuecomment-395849498
Video editing in the browser is one area where negative playback rates would be useful. In Adobe Premiere, a popular video editing tool, there are 3 hotkeys that are used for "shuttling" (moving through the video): J, K, and L.
| Hotkey | Behavior |
| ----- | ----- |
| J | play the video in reverse. continually press it to increase the (negative) playback speed
| K | pause the video, and set the playback speed to 1
| L | play the video in the forward direction. continued presses increase the (positive) playback speed
Users of Premiere are _constantly_ using this system to navigate videos, and anyone who is making a video editor in the browser will likely want to reproduce this same workflow.
A tutorial demonstrating shuttling in Premiere can be viewed on YouTube [**here**](https://www.youtube.com/watch?v=L0F0DT4Tmlw).
#### Relevant links
> I'll find and/or create links on the relevant browser issue trackers, but I haven't yet.
- [Chromium issue](https://bugs.chromium.org/p/chromium/issues/detail?id=851255&can=2&q=negative%20playbackrate&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified)
- [Bugzilla issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1468019)
- [Motivating comment](https://github.com/whatwg/html/issues/2754#issuecomment-395936981): This is the comment from @annevk that motivated me to open this issue.
You may instead want to have two videos (one is in reverse) and swap them. You'd need some code to sync their currentTime
value.
MaxZieb
(Loves Hype)
November 26, 2021, 7:37am
#4
This might be a starting point. I experimented with something like that, although with a single video. Having two player, as @jonathan suggested, and swapping visibility might also come in nicely.
[HypeReverseVideo_1]
This topic was inspired by this thread and originated here …
It got split into it’s own thread to not high jack the original thread and has the goal to explore the great combination of pre-rendered video and Hype. It has the goals to…
avoid multiple movies
avoid switching movies at all
easy sync between Hype and Video
The basic idea was to use a single movie that is mirrored and attached to itself (in premiere or some online tool). Then through some simple time ind…