Skip to content

How to pause individual videos when working with multiple videos in different slides #21

@jodriscoll

Description

@jodriscoll

Sources for my code:
http://www.massgeneral.org/heartcenter/ask/default-tubeplayer.html [HTML]
http://www.massgeneral.org/heartcenter/ask/assets/askHeart-tuberplayer.js [jQuery ref]
http://www.massgeneral.org/assets/js-plugins/jquery.tubeplayer.js [tubePlayer ref]

Description:
Thanks for the great plugin to start off! I've been fiddling around with getting tubePlayer to work in the environment I'm working with and I've run into a couple issues. I've managed to get all my videos generating properly, however, when I'm attempting to bind the "pause" to my links in the bottom carousel, only the first link is properly pausing playback. If you navigate through the 5 slides at the bottom of the page, you will see that only the initial slide (Corrigan Women’s Heart Health...) is properly pausing the video when you navigate from the other videos. Here are the steps of how to locate the issue:

Steps:
01: Load http://www.massgeneral.org/heartcenter/ask/default-tubePlayer.aspx
02: Play video
03: Click the "Heart Failure" link in the bottom carousel
04: Initial video stops from the "Corrigan Women’s Heart Health" slide
05: Play the video on the "Heart Failure" page
06: Click the "Corrigan Women’s Heart Health" link in the bottom carousel
06-a: The video from the "Heart Failure" slide is still playing.
06-b: This does not happen if you complete steps 1-5 using the "Corrigan Women’s Heart Health" & "Coronary Artery Disease" slides.

After fiddling around with the UI, I'm sure you'll get an understanding that when a user initiates the anchor tag to switch slides, it will pause all the other slides. Also, if the user clicks the same slide they are currently on, it does not pause the video they are currently viewing, but instead pauses all the other videos. If you look into the HTML, you can see that I'm excluding the ID of the video sharing the same instance as the slide thumbnail from the anchor onClick.

I can't seem to find any examples of this plugin being used in this fashion. Any help would be EXTREMELY appreciated.

Second Inquiry:
Is there a way to control the initial thumbnail that is being generates for the YouTube videos? Sometimes the thumbnails that are generated are not exactly "flattering". Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions