Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
104
rated 0 times [  111] [ 7]  / answers: 1 / hits: 51967  / 14 Years ago, thu, november 11, 2010, 12:00:00

I am building a website with HTML5-<video> in fullscreen background. There are pages in shape of <div>s becoming visible with SWF-container player in them that cause serious CPU performance issues when both media play.
So I want to add a simple javascript command that pauses the background video when a project-<div> becomes visible. Would be nice if it resumes again the playback when it gets closed/hidden.



Thanks in advance.


More From » html5-video

 Answers
15
document.getElementById('myvideotag').pause();


Note that there is no stop() method. In the function that shows/hides your DIV, place the play/pause function there.



More resources here: http://www.digitaria.com/blogs/html5-video-skinning-tutorial-part-2-play-buttons


[#95003] Tuesday, November 9, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
makaylahk

Total Points: 166
Total Questions: 94
Total Answers: 117

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;