Playing Youtube, Vimeo and any other video services' videos in one's own player -


i know youtube , vimeo both have embed codes allow embed player webpage. however, i'm looking build web player consistent appearance. more importantly, i'm looking build player play videos many video hosting services out there. i'm starting youtube , vimeo, want gradually increase support video services. figured maybe if there interface consistent between video hosting services, maybe easier, protocol of sort. hit me urls general protocol sort of thing; no need re-invent protocol. so, if youtube , vimeo provided url video file play in player, can find cross-section between these services.

this why i'm here; i'm asking if knows if these services provide url raw video file or files (for different formats, flv, h.264, webm, etc) can use custom video player? or hosting services prohibit due advertising revenue things?

it's unlikely you'll find video hosting service gives direct access files themselves, many of reasons speculate (there's issue don't want downloading videos). however, youtube, @ least, offers ability embed video chromeless player -- way, there no youtube controls @ can overlay own javascript toolbar, hook player api, etc. other hosting services this.

vimeo, unless has changed recently, have player api well, doesn't give options of hiding controls, isn't seamless experience.

here's how can embed chromeless player youtube:

var tag = document.createelement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstscripttag = document.getelementsbytagname('script')[0]; firstscripttag.parentnode.insertbefore(tag, firstscripttag);  function onyoutubeiframeapiready() {   var player;   player = new yt.player('player', {     videoid: 'vonebqrzmbc',     playervars: { 'autoplay': 1, 'controls': 0 },   }); } 

you might find info looking @ code players attempting wrappers various video sharing sites, such http://www.videojs.com


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -