Reputation: 73
According to this site, this is supported in the playbackRate
and defaultPlaybackRate
attributes, accessible via the DOM. But this is not working on mobile. Example:
<!DOCTYPE html>
<video id="my-video" src="chubby-bubbies.ogv" ...></video>
<script type="text/javascript">
/* play video twice as fast */
document.getElementById("my-video").defaultPlaybackRate = 2.0;
document.getElementById("my-video").play();
/* now play three times as fast just for the heck of it */
document.getElementById("my-video").playbackRate = 3.0;
</script>
The above works on Chrome, and also Firefox 20 and above on desktop.
Upvotes: 3
Views: 20156
Reputation: 226
The answer is simply that Mobile Chrome (Android) doesn’t support playbackRate changes even tho this website says it does: https://developer.mozilla.org/en/docs/Web/API/HTMLMediaElement#AutoCompatibilityTable
This is the real browser supported by playbackRate changes on mobile:
I created a website and tested it by first adding the following to the web.config-file:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4"/>
</staticContent>
</system.webServer>
Then I uploaded a simple video to my website and uploaded it to Azure for testing in the different browsers: http://pandasneezy.azurewebsites.net/
I suggest you use Mobile Firefox 24+, and it should work just fine with
:
document.getElementById("my-video").playbackRate = 3.0;
Upvotes: 2