A rejoint le : 15 mai 2022

À propos

Abbott's Magic And The American Side Show: Step Right Up - You Have To See It To Believe It!.epub (Updated 2022)




About Rebecca Spooner is a writer, researcher, and teacher of writing and literature. She is the author of the novel, The Exit Club, and co-founder of the writing journal The Unstill.Q: Detect when a movie is paused I have a video element that can be paused using the HTML5 video element's pause() method. I would like to detect when the video has been paused, but I'm struggling to find any good tutorials on how to do this. It's very similar to the question this guy asked, but the answers are a bit more complicated and I don't want to handle the pause/resume manually by counting (ie. changing) the paused attribute of the video element. A: you can use a handler that will know when the media is paused (and when it resumes) DEMO var currentTime = 0; var player; function init(){ player = document.getElementById('player'); player.addEventListener('pause', function(){ player.currentTime = currentTime; }); player.addEventListener('ended', function(){ currentTime = 0; }); } init(); document.addEventListener('keydown', function(e) { if(e.keyCode === 32){ player.pause(); } }); document.addEventListener('keyup', function(e) { if(e.keyCode === 32){; } }); Q: Hibernate transaction not working I have a problem with my Tran