-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated YouTube Tech #157
Updated YouTube Tech #157
Conversation
…utton, and playback issues when running from a local file
…ch/youtube.* files
…am to use the native YouTube player controls
* Added the full JSON object including JSON.stringify (needed by Vimeo) * Small fixes for YouTube getters * Vimeo tech using iFrame wrapper (uses built-in Vimeo controls instead of VideoJS controls) * Refactored techs into separate files
Heck yeah, thanks for the help. I'm trying to get v3.2 out the door and then I'll dig in more. Cheers. -heff |
On my fork I also have a functional Vimeo tech, although it is limited compared to the YouTube tech. YouTube will give you a "chromeless" player allowing a VideoJS skin to be overlaid, while Vimeo insists on their interface always being present. Having the VideoJS and Vimeo interfaces fight with each other is no good, so I opted to auto-hide VideoJS controls with Vimeo and just use their interface. Better than nothing if you want to embed Vimeo videos with a universal player, but many people probably won't use this so I broke out each tech into a separate file to make building without YouTube or Vimeo support easier. I haven't looked at the plugin refactor branch so I'm not sure if this aligns with that work or not, but it seemed like a good first step. I've also been working on audio-only support (using the latest video-js-swf binary for Flash mp3 playback) which I will commit to my fork when I get something working. My goal is to have one player that can handle audio and video across a wide number of providers and all popular browsers/devices. This is getting very close to that goal! |
Awesome. Bummer about Vimeo, but I'm sure most people will be fine using the Vimeo interface and just happy to have a universal way to embed video. I'm glad you were able to dig into audio support. The functionality has been in the swf for a bit, and just haven't had the time to run tests. Let me know how it goes. |
It looks like the events being fired are not quite matching up with what video.js requires to function properly. The first issue I'm running into is that the "playing" event is fired but not "play", which is listened for to swap the poster and big play image with the control bar. A hacky fix in V.flash.onEvent() would be adding |
Play should be triggered when play() is called or when autoplay is triggered. Playing should be triggered whenever the video goes from paused to playing, and I believe only once the video is actually playing, not just when it's been told to play. Digging into this more today. http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#event-definitions |
I am noticing some issues with the full screen functionality in my tests. On transition to and from full screen the video is paused, and when I click play, it starts over from the beginning. Also, after a full screen transition, the controls stop working and clicking on them causes the youtube javascript to throws this error: Other than that, it seems to be working great. Thanks for a great plugin. |
Also, one really minor thing I saw was that right now it doesn't check the protocol (https vs http) in the function to get the poster image. So, users could get the "unsecured resources on a secure page" warning that we all love so much. |
Thanks for the heads up, I'll take a look at both issues. Which browser/OS were you using when experiencing the fullscreen issues? Just in case I have any trouble reproducing it. |
Thanks. I was testing in Firefox 11 on Windows 7. When I get a chance I'll test some other browsers as well. |
Just tested in a couple more browsers (all on Windows 7). I'm not seeing any issues in IE8+ (there might be an issue with IE7, but I can't confirm that at the moment). In Chrome, everything seems to work perfectly, but I do get the following error in my console when the video is initially setup: Unsafe JavaScript attempt to access frame with URL http://3strandsmarketing.com/video.php from frame with URL http://www.youtube.com/embed/Tblcf8MGorY?disablekb=1&enablejsapi=1&iv_load_policy=3&modestbranding=1&playerapiid=vjs-test-youtube_youtube_api&wmode=opaque&rel=0&showinfo=0&showsearch=0&controls=0&autoplay=0&loop=0&hd=0&origin=http%3A%2F%2F3strandsmarketing.com. Domains, protocols and ports must match. |
Just noticed another issue. It seems like the After tinkering with this a bit, it seems like this might be connected to the |
I found a small bug in core.js (line 116), you need to change it to this line: techOrder: ["html5","flash", "youtube"], This will allow more programmatic instantiation. |
All seems to work fine for me in IE7,8,9, FF 11 and Chrome 19 once my above alteration had been made. The only issue I'm seeing is the the UI doesn't reset when the tech switches (due to an .src() call). This just means that the progress bar and play/pause button might show the wrong state until the new video starts playing so not a big deal. I don't know if this has ever been addressed in the zencoder master branch either but it might be something for the future. Cheers |
… removed a JSHint warning Courtesy of @e1fjl
…host and hiding video.js controls when native YT controls are enabled
Could you provide a working example? |
… controls. Sometimes this throws an exception on init
Hi there ! Do you think there is a chance to merge this PR anytime soon? Thank you Aurélien |
yeah, I'm also user of that tech, it will be nice if we get merged all ull request that are waiting for half year already, minify was not so bad, I don't think closure is more important then fixing bugs with merge of pull requests that are fixing those bugs |
+1 for a merge. |
@jhurliman, would you be interested in breaking this out into it's own repo? I'm currently heads down on refactoring the core project, and looking to keep it very focused, as in only HTML5 + Flash, and only features supported natively by HTML5 video. Everything else would be plugins/modules. |
Sure. Let me know when it's ready. |
+1 for getting this to a usable state |
To everyone following this thread: We've recently switched away from video.js at MOX due to the lack of HLS support in Flash. I'm still interested in using video.js for side projects and maintaining the YouTube plugin, but we have a launch on March 15th and I don't have time for any extracurricular coding before then. If someone wants to jump in and get started on this now please feel free, otherwise I'll get started probably early April (2013). |
Thank you for this update ! Can you tell us what are you using now? |
I'm evaluating JWPlayer 6 and the Yospace HLS SDK for Flash. |
We do have an HLS version in the works for those interested. Hoping to release it along with v4. On Feb 21, 2013, at 2:23 PM, John Hurliman notifications@github.com wrote:
|
Closing this pull request for now since it's for the old version. There's a plugins page on the wiki for anyone who wants to create a youtube plugin. |
@heff @jhurliman : can videojs-youtube working perfectly with videojs-vast-plugin ? |
I wrote a new YouTube tech following the latest VideoJS API conventions. It uses the YouTube iFrame embed method which automatically chooses between HTML5 or Flash when serving videos, staying true to the HTML5 nature of VideoJS :-).
I tested all of the basic functionality with the following platforms:
Testing on additional platforms and more API feature testing (such as swapping out the playing video with a src() call) is welcome.