Explore the community Forums Lectora Lectora Questions & Answers Changing playback speed of Audio or Video Reply To: Changing playback speed of Audio or Video

#373544 Score: 1
Profile photo of Math Notermans
Math Notermans
Member
contributor
intermediate
advanced
friend finder
junior moderator
advocate
LUC16 Attendee
LUC16
wise owl
curious george
129 pts
@mnotermans5114

Guess you know the answer. Using javascript 😉 And some library to get that done.

Here is a sample i did quite a while ago about spritesheets. In it a character running. Several buttons below it. Among them 2, 1 to slowdown speed and 1 to make him run faster. Click multiple times to see the effect.

Spritesheet setup in Lectora

Similar technique(s) will work for video offcourse. As the Lectora mediaplayer is based upon the Mediaelement.

http://www.mediaelementjs.com/

It should be possible to enhance Lectoras mediaplayer with javascript or add existing Mediaelement plugins to a project. There is for example a plugin to give the player an extra button to set the playbackspeed.

https://github.com/mediaelement/mediaelement-plugins/blob/master/docs/speed.md

Sounds like a interesting option. I got no clue how to add a plugin to an existing mediaelement. HTML5 video has default the playbackRate property.

https://www.w3schools.com/tags/av_prop_playbackrate.asp

 

For audio you offcourse need something else.
You could for example use this audio library.

Fade audio in Lectora

Checking the documentation for Buzz
http://buzz.jaysalvat.com/documentation/sound/

you quickly find that there is a speed property. So you can speedup/slowdown audio with Buzz.

Set the playback speed where 1 is normal speed, 2 is double speed, etc.
mySound.setSpeed(2);

Enough said i guess. With Javascript you can 😉

Kind regards,
Math

This post has received 1 vote up.