Start a new topic

Slower playing speed (dev question)

I want to change the speed of the video while transcribing it. I think it should be possible in some cases, if I can access the JavaScript instance of the Popcorn video object (through Popcorn.js's playbackRate(rate), or through showing the default Youtube control bar).


Ideally I could do it in a Greasemonkey script or at least in the JavaScript console. But unfortunately I couldn't find a way to access the Popcorn object or the VideoPlayer object, even after looking at the code on GitHub. Does anyone (a developer ?) have any tip ?


Thanks


1 person has this question

 Thank you for this topic, jlgrall.


I was going to suggest you add a comment to Support slow motion for transcription #1820 on GitHub, but you have already done so. This possibility to change the video speed would indeed be most useful: already via accessing the commands of the YouTube video, but it would be even better if it could be done via a native Amara option, so that it also works with non-YouTube videos.


Best,


Claude


1 person likes this

Sure, thanks for the answer !


I finally took some time to hack a JavaScript snippet to find an object in a webpage.


I found the following objects with properties "play" and "pause":


Popcorn.p // That must be the Popcorn prototype
Popcorn.instances[0]
Popcorn.instances[0].media
Popcorn.instances[0].video
Popcorn.instances[0].data.trackEvents.parent


But they seem to be only proxies to the real objects. Thus, I had no luck trying to change the playbackRate, nor trying to show the youtube controls...


Laters,


jlgrall

I got it working from a javascript console. See: Support slow motion for transcription #1820

I got it working. I can change the playback rate from a JavaScript console. See my comment on GitHub: https://github.com/pculture/unisubs/issues/1820#issuecomment-122526651

Congratulations and great thanks, jlgrall. Can this be implemented in the editor as default? (Sorry, I'm code-illiterate and don't even know how to start setting up a javascript console).

Best,

Claude

 


2 people like this
Login or Signup to post a comment