![]() ![]() You can't get rid of the YouTube icon in the lower right corner that shows up on pause or mouseover. e.g., more responsive and better reporting of buffering. Make sure you add &html5=1 to the YT URL when you set the src.Įven with the wrapper, the HTML5 video API just performs a little bit better than the YT API. You need to include the latest version of Popcorn.js and wrappers/common/popcorn._MediaElementProto.js from that repo. Note: The official source for that file is on the mozilla/popcorn-js repo, but this one is currently ahead with bug fixes and features. Now, if you want to go one step further, Popcorn.js now has a nifty wrapper object for the YouTube API that will make a YouTube (they have one for Vimeo too) video behave like an HTMLVideoElement, with most of the same properties, methods and events. If you're just doing a straight iframe embed, add it to the query string like this: If you're using the YouTube API, add html5: 1 to the playerVars. The video will be in an iframe, but you can apply all the usual CSS tricks to that iframe - opacity, transforms, etc. To start, you can add the "html5=1" hint to the embed, which will tell youtube to use html5 video instead of Flash (it usually complies, but not always). However, there are a few steps you can take to be able to do just about everything you could do if you were using the video tag. In any case, that URL is probably going to change regularly, whether YT adjusts their infrastructure or they go out of their way to stop people from directly accessing the video files. YouTube doesn't want you doing that, and it's probably against their TOS. There isn't really a reliable way to actually play a YouTube video inside a real video tag. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |