chrome extension for YouTube video playback - google-chrome

I wrote an extension for YouTube which among other things, pauses YouTube's video play back when page is opened. The problem is the video pauses but the video tool bar is not updating so it shows the pause button instead of the play button.
this is my code:
html5Videos = document.querySelectorAll("video");
for (var v = 0; v < html5Videos.length; v++)
html5Videos[v].pause();
I can't find a way to update the video tool bar.
This is how it looks, I need to hit play but the pause button is shown.
thanks.

Find the pause button element and click it:
document.querySelector('.ytp-play-button').click();

Related

Action Script 3.0 Fullscreen Issue

stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE
I'm using this command to make my flash application fullscreen, and on that frame I have a video and a button to skip and pause the video and go to next frame,
PROBLEM I'm Facing:-
when I open flash application it launch's in fullscreen but my buttons are not visible at all.
I want to make only canvas fullscreen but not the video.
please help

Audio player shows and disappear in Firefox

I try to use HTML5's audio tag to play a music file on my site. This is my syntax:
The problem I am encountering is that when I refresh my page, I can see the player, but only for a few seconds, then it fade out.

Why video is started from last end position?

I have a problem with youtube-api when i load a video. I am using loadVideoById function. I have tried also cueVideoById but the result is the same.
OK, here is what it is about.
when i play some video at YouTube page and will finish it in for example middle. YouTube will remember that position and next time i enter this video it will play from that position. Also im logged in in the Chrome browser. So when i load this video at my page using youtube api by function mentioned before it also starts this video from previously remembered position.
I tried to use stopVideo or seekTo(0) after loading it but it doesnt work. Also when i change the time of video and press stop and play next it will start again from remember position. Does anyone know the solution for this ?
JS fiddle:
https://jsfiddle.net/or2w8fpd/6/
Just open video by youtube side stop in the middle, check if youtube saved your position for future (if you return to video where does progress start) then open jsfiddle and try it. remember to be logged in to chrome browser

Swipebox - Issue when playing a youtube video and navigating to another video in Chrome

The following only occurs in a newly release Chrome browser (meaning it was working on a previous Chrome browser version) while using the JQuery plugin Swipebox. Firefox, IE and Edge all work as expected.
Issue (swipebox 1.4.1 latest):
While playing a Youtube Video, click swipebox's Next or Prev navigation arrows.
The next video will be showed, however, trying to play this video will result in the next video to appear on top of the current video, which is actually playing (you can hear the sound, but can not see it).
The close "X" and navigation arrows are no longer visible.
You are now stuck. Must refresh page or press "ESC".
Again, in IE, Firefox and Edge, the video navigation all behave properly.
This only seems to occur on the Chrome browser.
How to replicate:
Example video page: http://donsfootwear.com/production-videos
Click a thumbnail - The Swipebox plugin will initiate and show the video preview fullscreen.
Play video by clicking on it - The video will start playing.
Whist the video plays, click the "Next" arrow - The next video preview will be showed.
Play video by clicking on it.
You are now stuck - The video you just clicked play will disappear. The next video preview will be shown (unresponsive). Swipebox "X" close and "Next"/"Prev" navigation buttons will disappear. Only way to escape is pressing "ESC" or refresh page.
Anyone can verify/experienced this with their own site, and most importantly have a workaround?
Thank you.
This has been fixed via a google chrome update recently.

iOS HTML5 video player next/prev buttons

Is there a way to access/listen to the previous/next buttons in the iOS HTML5 video player? Ideally I would listen to some sort of a prev and next event and swap out the videos accordingly without the user having to close the video and click my prev/next buttons.
(source: iphonefaq.org)
I am currently using jwplayer to generate the html5 video and listening to their playlist next/prev listeners don't seem to do the trick. I can always find and attach listeners to the actual <video> tag pretty easily though.
If you attach listeners to the video tag itself then when the user hits next and previous then the listeners in the code will put up on those buttons. I am doing something similar with youTube videos. If you hit next it goes to the end of the youtube video and fires a video complete event tag and then I load the next video when that is called, so that the video will one loop without the next button and two the users can hit the buttons. I have not found a way to monitor the buttons in the player on the iphone side, but if I find it I will post that as well since it is important to know both angels if possible.
Funny thing I think I am looking to try and do the same exact thing. I know how to transition the videos to the next without having to leave the fullscreen mode because of using youTube api in the js but I am not able to observe the quicktime player itself and need to for another feature that I would like to work on.
That's the native iOS player which is a thin version of Quicktime. You'll know if it's an HTML5 player when it doesn't transition from the Quicktime player and your page in Safari. How is your movie being embedded?
I recently had a similar problem and was unable to find a solution using the HTML player. I ended up implementing the video player using MPVideoPlayer Framework and launching it from my web view with a custom URL scheme (AppName:Commnad:Asset). I was then able to use the delegate methods to monitor user interactions. If you would like to see basic implementation, let me know and I can add some code.