HTML5 cc_load_policy=1 What am I doing wrong? - youtube-api

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?

Related

VideoJS: not working on ipad

While trying to embed html5 <video> tag in my salesforce web Page, I came across a wonderful library called "Videojs" (http://videojs.com/getting-started/). It served most of the purpose, however when I tried to play a video on Ipad, it failed. Then I came across this link (VideoJS: not working on IOS), which says to try to use videojs's default movie as there possibly could be encoding issue. When I did as per the suggestion, I came with a very interesting scenario. As When I fed the url(http://vjs.zencdn.net/v/oceans.mp4) directly as:
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4" />
it worked fine both in windows and in ios. But when I downloaded the same video and saved it to Salesforce CRM Content libraries and gave the src path as:
<source src="/sfc/servlet.shepherd/version/download/id" type="video/mp4" />
it worked in windows desktop browsers but not on ipad(version 9.2). I couldn't understand the issue.
Thanks for any help/ideas/suggestions.
I am googling mostly encoding issue for mp4 file or hugesize file,so use handbreak (https://handbrake.fr/). solve the problem

Icecast Live Stream Audio to iPhone

I have a very similar question to Play a Shoutcast Stream on iPhone with HTML5, but with a few differences...
I have an Icecast server running on Ubuntu 14.04 LTS, streaming an mp3. The setup follows Icecast's documentation exactly, is linked from an <audio> HTML5 tag on a website running on AWS EC2 and works in my desktop / laptop browser.
However, when I try to load the same website in iOS, on either my iPhone or my iPad, the HTML5 audio player loads, shows "Loading..." for several minutes, then either displays nothing or "Error".
The HTML5 code is as follows:
<audio controls>
<source src="http://xx.xx.xx.xx:8000/example1.mp3" type="audio/mpeg" />
</audio>
Suggestions or ideas as to why this doesn't work in iOS?
I finally got this resolved, but realized I never posted an answer.
I had to set the <audio> src value to the streaming mount point found in my icecast.xml file.
So, in my icecast.xml file, I have:
<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
<bind-address>123.456.789.012</bind-address>
<shoutcast-mount>/stream</shoutcast-mount>
</listen-socket>
Thus, my HTML5 <audio> tag became:
For good measure, I also included the mime_type of audio/mpeg and controls to the <audio> tag, though these are not required.

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.

You tube video can not display in the web site

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

How do I go about embedding a youtube chromeless player without adding controls?

I am creating an online experiment. It involves participants watching a video then answering a questionnaire. I would like to embed a chromeless youtube video which plays automatically on page load, does not have controls for participants to play around with, and loads the next page once the video finishes.
Now the autoplay/forward to next page functions are secondary and I'm not too concerned if I can't get them working. However I am very interested in how to embed a chromeless player. I have gone to the google playground but this code already has the controls attached. I am not very experienced at coding so I do not know what to remove from the code for none of the custom controls on the left to be displayed. Is anyone able to help me?
Thanks, Wil
When you embed the video, you can use the parameter controls=0 which will remove the buttons and make it appear chromeless.
ie the code in your embed section would include http://www.youtube.com/embed/NxLBVAq-4dg?rel=0&controls=0"
You may want to look at http://code.google.com/apis/youtube/youtube_player_demo.html it allows you configure your player so that you can embed it chrome-less on your pages.
It should be a simple copy and paste.
Yes, surprisingly, I did'nt find any Youtube page with sample code for their chromeless plugin.
But there is a lot of of jquery plugin which use the chromeless plugin. You'l find a good tutorial here :
http://tutorialzine.com/2010/07/youtube-api-custom-player-jquery-css/
You can use SWF objects to embed your chromeless player.
You must add this js library in your html:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
then in your main js file you call the embedSWF method:
var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/FeJkDewhTEw?enablejsapi=1&playerapiid=ytplayer&version=3&controls=0&showinfo=0",
"ytapiplayer", "425", "356", "8", null, null, params, atts);
If you don't want any controls or info, just set controls=0 and showinfo=0 in the url
See: https://developers.google.com/youtube/js_api_reference#GettingStarted
JW player http://www.longtailvideo.com/players will play youtube videos without the youtube branding, I think.

Resources