I've checked all the questions and answers in stackoverflow but I can solve my problem.
I'm trying to embed a youtube video in my website(on desktop, static) but it only shows me the video that is in the w3cschool example or doesn't show me anything(not even a blank box).
This is my code but for some reason it's not showing the video I choose on Youtube and yes I did use the embedded code from youtube.
<iframe width="300" height="300" src="//www.youtube.com/embed/yiboIS-f27Q?rel=0?html5=1" frameborder="0" allowfullscreen></iframe>
Does anyone know why?
Found the solution.
I just had to add http: in front of // in the youtube url.
Answer found from the answer of Nick R in the question
Youtube embeded video not working in all my browsers: FireFox, IE and Chrome
Related
I know this question may have been asked before, but no good answers were found while I was searching.
I have a website where I want to add a YouTube video. The goal is to have an autoplaying video with sound on. A lot of users recommended using the html tag iframe to embed it, which seemed to work perfectly with autoplaying except for the sound.
Does anyone know a better solution to this? Would it be better to just upload the video to the server and use the video tag?
<iframe
width="100%"
height="100%"
src="https://youtube.com/embed/h4gr8eH7D?autoplay=1&controls=0&showinfo=0&autohide=1&mute=1&playlist=h4gr8eH7D&loop=1"
allow="autoplay"
></iframe>
Supposedly they updated using autoplay=1 to where it had to have mute=1 which makes autoplay work, but with no sound. I saw somewhere someone had used mute=2 to have the audio working, but that didn't work for me either.
The new versions of Chrome prevent any audio from running on a webpage until the user interacts with the page. You CANNOT auto-play a video in a chrome browser unless it's muted and this also applies to videos which you upload to your server. If you'll make the user interact with your page before playing audio, you'll be able to play it.
See also How to make audio autoplay on chrome.
Hello dear Stackoverflow people!
I have tried to build myself a website, there us just one thing i can't figure out and im hoping you way more experienced people could help me.
The embedded Youtube video, which is meant to serve as a background for the logo works well with FireFox and Google chrome. Just in Safari, the video skips straight to the end and the other recommended videos as soon as the page has loaded. If i open just the youtube.com/embed/ link, it works fine. Is there any way for me to resolve this?
I am not an expert concerning html5 / javascript and i have no idea why it behaves so differently in the different browsers.
I have tried to open the embed link on its own, it works when doing that.
I have also tried looking into the developer menu in safari, but there are no errors.
Sometimes, it loads wrong and if i change the tab for a few minutes and reopen the tab it gets rendered again(?) and then it works; it just never works when you load the page initially
<iframe id="videobgframe-1936929286" class="videobgframe" style="min-height: 708.1875px; min-width: 956.4444444444443px;" frameborder="0" allowfullscreen="1" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" width="640" height="360" src="https://www.youtube.com/embed/XzTCntGgNJU?modestbranding=1&autoplay=1&controls=0&wmode=transparent&hd=1&rel=0&autohide=1&showinfo=0&origin=https%3A%2F%2Fwww.ajgapps.com&loop=1&playlist=XzTCntGgNJU&enablejsapi=1&widgetid=1"></iframe>
The expected/desired result is the website behaving just like it does in google chrome and firefox right now, starting to autoplay the video as the logo background when the page has loaded, hiding controls, looping the video and ideally also hiding the recommended videos.
To anyone wondering, I have figured it out finally.
Safari blocks all autoplaying media by default, exempting certain big websites like Youtube or Netflix.
So there is no way around this, if you want to use a video. I will try to use a different media format like a gif maybe...
I am very ignorant in this area. I wanted to embed a video in my website. I just went on w3schools and copy-pasted the example code.
<iframe width="420" height="315"
src="http://www.youtube.com/embed/XGSy3_Czz8k?autoplay=1">
</iframe>
Why does the video than not show in the website? I am using Google Chrome.
EDIT:
The problem was that I was using the real youtube address instead the URL for embedding.
it's actually works perfectly, checkout the other code, may be the iframe is hidden by any other controls
I am attempting to find the embed code for the video on this site:
http://beyondbinaries1.blogspot.com/2007/12/family-stone-dinner-scene.html
I would like to place it into a PowerPoint slide.
I have opened up Chrome Developer to take a better look at the coding behind it, and this is the coding that I get:
<embed src="//www.youtube.com/get_player" type="application/x-shockwave-flash" width="320" height="266" bgcolor="#FFFFFF" flashvars="flvurl=http://redirector.googlevideo.com/videoplayback?id%3D4c781227fbfdc727%26itag%3D5%26source%3Dblogger%26app%3Dblogger%26cmo%3Dsensitive_content%253Dyes%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1451749858%26sparams%3Did,itag,source,ip,ipbits,expire%26signature%3D93CE2FD2A65DB68E8F19A0A60B8DCCD85E8E00C3.76ECE06C0E2070E55D3FB6C98A830F69A87EFFF6%26key%3Dck2&iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D4c781227fbfdc727%26offsetms%3D5000%26itag%3Dw160%26sigh%3DqZuEv17IBU1O_mOsOoReqcCPqcw&autoplay=0&ps=blogger" allowfullscreen="true">
I have done a little more research and see it is because the video was uploaded by the user and with Google also being YouTube, it appears as a YouTube video even though it was not actually uploaded to YouTube. Source
I think you can't
because this is not a youtube video, this video was uploaded to blogger and not youtube it appears as a youtube video because blogger is using youtube's player
but you can download or embed it from this link
http://r5---sn-4g5edn7s.googlevideo.com/videoplayback?id=4c781227fbfdc727&itag=5&source=blogger&app=blogger&ip=197.35.108.154&ipbits=0&expire=1453742996&sparams=expire,hvs,id,ip,ipbits,itag,mm,mn,ms,mv,nh,pl,source&signature=3DA7E51997E4A0B49B89E6D2260FBFB6A2A08CF6.6E3390B07BF6AE9D26668D9B8B4715ACBEAB54B6&key=cms1&pl=19&redirect_counter=1&req_id=c22a9cedcfa8a3ee&cms_redirect=yes&hvs=yes&mm=34&mn=sn-4g5edn7s&ms=ltu&mt=1451596516&mv=m&nh=IgpwcjAyLmZyYTAzKgkxMjcuMC4wLjE
I have been looking for a way of embedding youtube videos into my site. The website is made of html and the youtube videos should auto-update as I would like to display all the videos on the current account? I know theres ways of embedding one video or playlists but Im not quite sure how to go about embedding everything on a users channel? Any Tips?
Just use the following as the src of an iframe:
http://www.youtube.com/embed/?listType=user_uploads&list=*USERNAME*
For example:
<iframe id="ytplayer" width="640" height="360"
src="http://www.youtube.com/embed/?listType=user_uploads&list=apple"
frameborder="0" allowfullscreen>
You can get info on the parammeters of the player on this link: https://developers.google.com/youtube/player_parameters#Manual_IFrame_Embeds
Scroll a little and you will see the url for user videos.