baker icon indicating copy to clipboard operation
baker copied to clipboard

Pause Youtube video (old embed code) using javascript or jquery

Open marcheluis opened this issue 13 years ago • 4 comments

Hi, as the Title says, im trying to pause a video on one of my pages using javascript or jquery, this is using the following code: $(window).blur( function() { $('#myVideo').pause(); }); or something like that, because of the three-card render mode im using, to stop/pause the video when changing from the page with the video to another. I also deleted the initialization of userAgent on the AppDelegate to stop an issue when clicking the pause button, so now the video displays as a native safari video.

marcheluis avatar Feb 14 '13 01:02 marcheluis

Uhm... I'm not getting the problem you're having. Could you describe it more clearly?

folletto avatar Feb 14 '13 01:02 folletto

Ok... Im using the three-card rendering mode on baker, but it makes so if i play the video on say page 2, then swipe to page 3, the video on page 2 is still playing. I want to pause the video on page 2 when i swipe to page 3 or 1. I can already detect when the user changes from the page with the video to other page, but i haven't found a way to pause/stop the embedded video on page 2 using javascript or jquery, which i embed using the old code from youtube (not using iframe, but using object).

Sorry if im not explaining myself better, my english isn't that good.

marcheluis avatar Feb 14 '13 01:02 marcheluis

this is the code i'm using to embed the youtube videos: `

` I'm using laker as a base to design the publication and this is the way it's explained there.

marcheluis avatar Feb 14 '13 04:02 marcheluis

I'm closing this, however it seem more a javascript problem than a Baker problem.

folletto avatar May 26 '13 14:05 folletto