You tube video can not display in the web site - youtube

I am trying to embed the you tube video in my web site . I would like to embed this video in my site for example http://www.youtube.com/watch?v=Ma4k5sEdBDo
It works well when I use the url http://www.youtube.com/embed/Ma4k5sEdBDo in the iframe, but it is not working when I use the url http://youtu.be/Ma4k5sEdBDo ( that got from the share option). I would like to enter the url from the share option.
This is my code
<iframe width="420" height="315" src="{$movieDetails.url}" frameborder="0" allowfullscreen></iframe>
Thanks in advance,
Sunil

In order to embed your channel, all you need to do is copy then paste the following code in another web-page.
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=YourChannelName&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
Make sure to replace the YourChannelName with your actual channel name.
For example: if your channel name were CaliChick94066 your channel embed code would be:
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=CaliChick94066&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
Please look at the following links:
YouTube on your site
Embed YouTube Channel
You just have to name the URL to your channel name. Also you can play with the height and the border color and size. Hope it helps

Related

HTML5 cc_load_policy=1 What am I doing wrong?

I have tired all the iframe and URLs that I came across while searching for an answer. I did see a post where YouTube support was quoted HTML5 ignores cc_load_policy parameter but that conflicted with what I found on the dev site that states AS3 and HTML5 support this parameter. Using this code for the dev video works - autostarts and displays the closed captions. When I use another video that has closed captions it doesn't show them.
This works
<iframe width="420" height="345"src="http://www.youtube.com/embed/M7lc1UVf-VE?cc_load_policy=1&autoplay=1"></iframe>
I updated the video ID with another video that has closed captions but they DO NOT display.
<iframe width="420" height="345"src="http://www.youtube.com/embed/0F87rB0c6Is?cc_load_policy=1&autoplay=1"></iframe>
Any ideas?

Embeded Youtube video not playing locally, fine when online

When I embed Youtube video on a page and test it locally nothing happens or the browser even locks up, depending on the browser. Publish the page, test online and it works fine. Obviously not an ideal develop/test scenario. I'm using the iframe embed code from Youtube.
It sure seems like a cross domain security issue but I see no errors using Firebug and haven't found any reference to that nor anyone with a similar problem. Probably just missing something but I'm stumped. I don't like being stumped... for long.
Example that works online but not locally even if this is the only code in the body:
<iframe width="640" height="360" src="//www.youtube.com/embed/INg83kArY4g?rel=0" frameborder="0" allowfullscreen></iframe>
BTW, no problem embedding and playing the same video locally when hosted on my own web server (not locally). Any help would be appreciated.
The reason that file will not load locally is because you are using a protocol relative URL when defining the src attribute.
When the browser parses the src it will prepend the scheme(http: or https:) that the page is viewed in. If the page is being viewed locally, your browser will prepend file to the URL and that will result in an invalid URL.
You can remedy the issue by inserting a scheme on the src e.g.
src="http://www.youtube.com/embed/INg83kArY4g?rel=0"
or by serving up that page on a local server.
Reference
Paul Irish
Try adding 'http:' to the beginning of the src attribute:
<iframe width="640" height="360" src="http://www.youtube.com/embed/INg83kArY4g?rel=0" frameborder="0" allowfullscreen></iframe>

Playing Youtubes with HTML 5 on iOS

I am trying load a YouTube video into a HTML 5 tag.
The problem I am having is I do not know what the “src” property should be. Using the URL for a video on YouTube does not seem to work, that URL seems to retrieve an entire page rather than just a video file.
I have been able to copy and paste YouTube’s own tag (by viewing the page source), that they use on their pages, but this is not a very efficient or long term solution. Is there a better solution?
I have tried to use YouTube’s API, but no matter what I do, it seems always to pull in the flash player version of the player (which of course won’t work for iOS.) Am I missing something obvious here?
This blog post might help: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html
The suggestion is to use this code:
<iframe class="youtube-player" type="text/html" width="640" height="385"
src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>
The iframe will autodetect HTML5 capabilities and use them; if not, it uses Flash as fallback.

How to generate iframe embed code in jwplayer?

I am using jwplayer in my grails application. I want to generate iframe embed code so that I can us it in my other website and play.How can I generate iframe embed code from jwplayer ?
Can I have exact code that needs to be generated ? Any help will be good.
Thanks
89neuron
If jwplayer is working in your grails app, no reason iframe will affect its activities.
Something like
<iframe src="http://www.yourgrails.com"/>
in your reference page will suffice

Video embedding from any video sharing

I have to design a web app where if you paste the link of particular video page from any video sharing site like "Youtube", "Metacafe" etc it should embed that video in the page. In simple words, what I was asked to do is that I have to embed a video from any site in my page.
Thanx in advance. :)
You can study the embed codes generated by YouTube and MetaCafe etc~ and then code something to mimic how they do it~
It seems like the better solution would be to allow people to paste the embed code generated by the site itself though. Since the hosters' conventions change.
You could Try this:
<iframe height="500" width="500" scr="http://www.youtube.com/embed/videoidentificationnumber/"></iframe>
Dont do this:
<object scr="http://www.youtube.com/embed/videoidentificationnumber"></object>
You will need to make sure that when you click the submit button it gets the identification number from the end and putting it in the bit specified by videoidentificationnumber (I dont know how though).

Resources