I followed the instructions on this page
and the embedded Youtube playlist which should Autoplay is:
<iframe width="535" height="300" src="https://www.youtube.com/embed?listType=playlist&list=PL8kx4WFqlOK90fxZpao5k2WUEmSPchGhR&autoplay=1&loop=1" frameborder="0" allowfullscreen>
</iframe>
It does loop when it reaches the last clip, but it won't play automatically on page load. Is there a fix for this, please? Thanks.
PS. I know this question has been asked before, but I could not find a working solution for this.
Try this:
https://www.youtube.com/embed/videoseries?list=PLElJF-XLNL2Brb_dTiVNSe9qld1eR_Jft&autoplay=1&loop=1
Google Chrome:
Since Google Chrome removed non-muted autoplay functionality in version 66, you have to add the parameter "mute=1" in that browser.
Or change autoplay-policy in the chrome settings:
How to allow video autoplay in a Google Chrome kiosk app in version 66 or later
Related
So this question has been answered, however I'm having a strange issue with the code.
This question originally answered my querie HTML Auto Embedding Recent Uploaded videos from a youtube channel
With this JSfiddle giving me the exact working code that I need http://jsfiddle.net/j7ycmr7y/
<iframe width="300" height="200" src="http://www.youtube.com/embed?max-results=1&controls=0&showinfo=0&rel=0&listType=user_uploads&list=albertsunzheng" frameborder="0" allowfullscreen></iframe>
Popped the code into Dreamweaver no worries. Works fine and the site is almost done so I upload it and the code suddenly doesn't work.
Here's the code I've used uploaded
<iframe width="300" height="200" src="http://www.youtube.com/embed?max-results=1&controls=0&showinfo=0&rel=0&listType=user_uploads&list=PewDiePie" frameborder="0" allowfullscreen></iframe>
I've uploaded the embed code in exactly the same way the previous answer stated, plus it works on dreamweaver and browser preview.
Anyone have any ideas on why it wouldn't be working while online?
How to pause a youtube video when soundcloud audio paying and vise versa
<span class="soundcloud_embed" id="soundcloud_post_312">
<iframe id="ui-id-1" width="100%" height="300" scrolling="no"
frameborder="no" src="https://w.soundcloud.com/player/?
url=https%3A//api.soundcloud.com/tracks/163100334&
color=%23ff5500&
auto_play=false&hide_related=false&show_comments=true&
show_user=true&show_reposts=false&show_teaser=true&
visual=true">
</iframe>
</span>
<span class="youtube_embed" id="youtube_post_309">
<iframe id="ui-id-2" width="560"height="315" src="https://www.youtube.com/
embed/M7lc1UVf-VE" frameborder="0" gesture="media"
allow="encrypted-media" allowfullscreen></iframe>
</span>
I've found the source at this link
Pause Youtube embed when playing Soundcloud embed
http://jsfiddle.net/Lpq9n7ht/
If you need to control the player, you need IFrame API.
The IFrame player API lets you embed a YouTube video player on your
website and control the player using JavaScript.
Read through the documentation to get started. There is starter guide that will help you how to use the API. Codes are also available as your reference depending on the functions that you want to use.
For the requirements, remember this.
The user's browser must support the HTML5 postMessage feature. Most
modern browsers support postMessage, though Internet Explorer 7 does
not support it.
I need to play VEVO videos on an HTML5 player which is created using YouTube's API in iOS.
https://developers.google.com/youtube/iframe_api_reference
Currently I'm able to play normal videos with out a glitch.But when ever i try to play a VEVO video,It says "The content cant be played outside of YouTube".Is there any legal way of going about this?.
I have already tried to set the "origin" property of the player to my domain.This did not help.
This is an Example from the above link where the origin is set
<iframe id="player" type="text/html" width="640" height="390"
src="http://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&origin=http://example.com"
frameborder="0"></iframe>
If anyone knows of any other way to legally play VEVO content please let me know. :).Any legal loopholes will also do :D.
I have played some vevo videos just by placing the ID.
Sometimes vevo videos have certain restractions for embedding like for example, the country from the user is fetching the video.
I am trying to find a way to have a youtube link automatically start playing when a user enters the site. Does anyone know how to do this. I have read something about using autoplay in the link. Here is the link to embed on my page.
<iframe width="560" height="315" src="http://www.youtube.com/embed/kttooVrewF8" frameborder="0" allowfullscreen></iframe>
Here is what your link should look like. Just put autoplay=1 after the url. You may also try putting ?autoplay=1 after. Hope this helps. Live Long and Prosper.
Or open them in a UIWebView? Their videos are in .swf format though.
Thank you.
EDIT: Okay, so I can get it to play in UIWebView, also when you click on the video in the UIWebView it will play the video in fullscreen. So am wondering if I can just get the code of when it clicks to fullscreen, and use it in some button I have.
Did that make sense?
Oh and thank you again.
Try embed the iframe snippet from Youku into your webview
<iframe height="498" width="510" frameborder="0" allowfullscreen
src="http://player.youku.com/embed/XNTY4ODU0NzQ0"></iframe>
I got it working on Android, but not tried it on iOS yet.
<video width="480" height="320"
src="http://v.youku.com/player/getRealM3U8/vid/XMzkxMTM3MDQw/type//video.m3u8"
controls>
<embed src="http://player.youku.com/player.php/sid/XMzkxMTM3MDQw/v.swf"
allowFullScreen="true" quality="high" width="480" height="320"
align="middle" allowScriptAccess="always"
type="application/x-shockwave-flash"></embed>
</video>
Just use the above HTML in a UIWebView for Youku. It can be played on iOS device and PC. Replace the XMzkxMTM3MDQw with the corresponding code of the video.
As you will easily be able to verify on the internet, Flash (.swf) is not supported on iOS devices. Maybe they offer their videos in another format, otherwise this won't work.
Update: I guess you're just opening the website in your web view. So that means on their web site they have an iOS compatible stream. You can fetch the stream data from the website's source code and build your own web site (stored locally on the device) that only displays that video stream in an UIWebView. Or you use MPMoviePlayer or HTTPLiveStream, whatever. However, make sure that this is allowed/legal, I can't help you there since I guess it heavily depends on what you want to do with your app.
See here to get the url of .m3u8 file for a youku video by its ID, and simply embed it into a <video> tag