0

Haven't logged in to this site for years, and now I need some help. I also don't know if this is the right forum, but here it goes.

I'm trying to write a site a hosts some of my own videos. I want to have a list of videos, each as a link, and when I click on one I want it to load on that same page by graying out everything else but the video. I'm using html 5 and css and I can get the video to come up, but the problem is that when I go to that page, all of the videos load. If I play a video from the pop up window and then close the window, the video will keep playing.

How can I make this work?

4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by iamthwee
0

I don't know those HTML5 videos too well, but I believe they have an autoload attribute? You need to remove it. Or set it to false. Or something. And as for the window closing, does the video object not have a stop() or something method? If so, call it :) (or pause(), even better?)

0

What about listing each video link, and when the link is clicked it opens up in a foreground frame (eg. Fancybox) that loads the video based on parameters sent to the frame via javascript?

That way, when the foreground frame is closed, it could trigger a function that stops or pauses the video.

0

I don't know those HTML5 videos too well, but I believe they have an autoload attribute? You need to remove it. Or set it to false. Or something. And as for the window closing, does the video object not have a stop() or something method? If so, call it (or pause(), even better?)

Thanks, that makes sense. Although I noticed that each browser acts differently. Safari doesn't load anything until you click play, chrome loads everything, and firefox doesn't support mp4 for some reason.

What about listing each video link, and when the link is clicked it opens up in a foreground frame (eg. Fancybox) that loads the video based on parameters sent to the frame via javascript?

That way, when the foreground frame is closed, it could trigger a function that stops or pauses the video.

That doesn't sound too hard. I'll look into that and post my results.

In the meantime what I've done is have a page with link to the videos, so when they're clicked on, they play in a new tab. Works for the mean time, but I'm gonna make it look nicer.

0

^^Christ, which that many gotchas using youtube over HTML5 for videos seems a lot rosier from where I'm sitting.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.