I used the default YouTube iFrame for my website. My users have said that upon entering the web app, it redirects them to youtube. I find this annoying for me and for my users.
Is there any way I can stop this from happening?
Here is the code that is causing the YouTube app to open:
<iframe width="560" height="315" src="https://www.youtube.com/embed/wCtedSNYBLc?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
The site this is on can be found here.
You can use "playsinline" parameter to play the video inline instead.
Related
I am testing out some simple HTML5 code in order to play embedded YouTube videos in a browser. However, some videos (almost exclusively music videos) will not play in the browser. Instead, a error message stating "This video is unavailable appears" (as shown here).
This is the HTML code used to display the video:
<iframe width="560" height="315" src="https://www.youtube.com/embed/oGpFcHTxjZs" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
which is the exact code generated by YouTube when selecting their "Embed" option.
The iframe tag does work for some videos, however, as shown here:
<iframe width="560" height="315" src="https://www.youtube.com/embed/jxvPjuREDpE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
What is strange is that all types of embedded videos seem to work in an environment such as jsfiddle, but not when loading a separate HTML file into a browser.
A similar issue was asked here: "This video is unavailable" when putting music videos in iFrame , but is only resolved by running an http server, which is a completely new topic to me.
Does anyone know of an HTML/javscript fix to this issue? Thanks in advance.
I recently came across this as well. An interesting thing that I noticed is that the video becomes unavailable if the origin is not http(s).
So try this: create a local file server or upload the html file to somewhere and if you access the file from http protocol, the video will play.
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 want to put a video on my website using the embed option on youtube.It shows up but when i try to play it appears a text saiyng that the video is restricted on some websites and gives me the option to watch on youtube . I saw that i need to accept some terms of conditions and that includes the youtube API from what i saw .
Is there another way to put a video on a website without the API ? Also i should mention that the website is not on a server.
I'm using this iframe to show the video :
<iframe width="560" height="315" src="https://www.youtube.com/embed/dgV1n57ejCY" frameborder="0" allowfullscreen></iframe>
I have the following video iFrame embed code on a page on my website (mywebsite.com/page2) - it plays a video that is hosted on an external site (http://wistia.com). I want to be able to send email clients a link to my video on my page (mywebsite.com/page2/mywebsitevideolink) - not a link to the external website, a link that opens up mywebsite.com/page2 and displays the video on my page that you would have to scroll down to see and starts playing it. How can this be accomplished? Thanks.
<p class="rtecenter"><iframe allowfullscreen=""
allowtransparency="true" class="wistia_embed" frameborder="0"
height="480" mozallowfullscreen="" msallowfullscreen=""
name="wistia_embed" oallowfullscreen="" scrolling="no"
src="//fast.wistia.net/embed/iframe/myvideo" webkitallowfullscreen=""
width="640"></iframe></p> "
Modify your p tag to <p class="rtecenter" id="video">and then your link is http://mywebsite.com/page2#video
Hope that this'll help you.
You can also set up a file which displays when you type /page2/mywebsitevideolink and redirects to /page2#video
If you want to link to a certain part of your page, just use an anchor link.
<div name="videopart">
VIDEO HERE
</div>
And for the link: http://yoursite.com/video.html#videopart
And for the player to autoplay, if you are using your video hosting's player, look in teir documentation for how to autoplay. If your just using the html tag, and the word autoplay in the beginning tag.
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.