Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Add Autoplay toggle on quote page so that clips play continuously from beginning to end of episode #90

Open
mitchdowney opened this issue Jul 4, 2014 · 3 comments

Comments

@mitchdowney
Copy link
Member

No description provided.

@mitchdowney
Copy link
Member Author

I've never implemented something like this but I imagine it would use Javascript and go something like...

-Add an "Autoplay" checkbox toggle in the middle between

-When the toggle is activated, have Javascript press the next> button as soon as the end of the clip is reached (is this possible with YouTube clips with a defined time_quote_ends? I'm not sure if this SO question can help. I know this it is possible to perform a Javascript action when a video ends completely, but can we make a Javascript action happen at the end of a clip?)

-When a clip ends and the next> button is activated by the Autoplay function, I imagine we should pass something at the end of the url like "=?autoplay" which would tell the video on the next play to begin playing as soon as the page loads, and also would ensure the Autoplay function remains toggled after moving to the next clip.

Does this sound alright?

@mitchdowney
Copy link
Member Author

Ooo this guy at the bottom says YouTube offers very simple event handling. Is the .at() function something we'd need?

youtubePlayer.at('5000', function() {
    alert("You're five seconds into this Youtube clip");
});

http://stackoverflow.com/questions/10074357/ytplayer-api-event-when-reaching-a-position-in-a-video

@scvnc
Copy link
Member

scvnc commented Jul 5, 2014

seems like you could either have it trigger when the player is at the last second or it looks like there is an event for when the state of the player ends at the first SO link you posted.

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

No branches or pull requests

2 participants