Youtube without javascript and plugins - javascript

I'd like to use Youtube and watch videos completely without javascript and plugins. Is it possible to do this just by using HTML5 or something like this?

More at:
W3Schools
<iframe width="420" height="315"
src="https://www.youtube.com/embed/tgbNymZ7vqY">
</iframe>

Related

What is the best way to add a video upload button to my website?

What combination of services can I use to add a video upload button to my website so I can them embed them on said website.
For uploading a video you need to find a service that suits you (YouTube, Vimeo...). This will involve some research and reading through the documentations.
Embedding the video to the website you can use the iframe tag
<iframe width="560" height="315" src="your video url" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Youtube Video Embed iframe shows the wrong video

I am making a website and I have to show a video on its homepage. The video exists on youtube and I need to embed it on my website.
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/spPdelVEs_k?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</html>
Unfortunately my webpage shows a completely different video. It shows this one.
https://www.youtube.com/watch?v=7sNL0T93ItM
Does the URL convert to something different? Help me solve this problem.
Your code is fine. You just need to clear the cookies on your browser and then it should load fine for you.
This is the video your code goes to:
https://www.youtube.com/watch?v=spPdelVEs_k

Storing Youtube video URL in firebase, and then inserting URL in <iframe> does not display video

I stored a few youtube URLs in Firebase, and I want to insert them in the html like so:
<iframe width="560" height="315" src="{{main.vid}}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
However, when running the code it only displays a blank. I am using the correct URL when clicking share and then embed on Youtube.
When I replace the Firebase data URL with the normal one like so:
<iframe width="560" height="315" src="https://www.youtube.com/embed/6CulBuMCLg0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
it works fine. Any help?
It looks like you are using Angular or something similar.
Angular sanitizes URLs before string interpolation for security reasons.
You need to bypass the sanitizer. A possible solution is a custom pipe.

Embed Youtube with Captions on by default not working

I'm trying to embed a Youtube movie, and would like Captions to be on by default.
From https://developers.google.com/youtube/player_parameters#cc_load_policy I understand I should use cc_load_policy=1.
I use the code html code below but it doesn't seem to work. That is, it loads with the captions off (you can manually turn captions on, so the video does have captions). What am I doing wrong?
I've tried the following two options:
<iframe src="https://www.youtube-nocookie.com/embed/xxxxxx?rel=0&&showinfo=0&cc_load_policy=1" frameborder="0" allowfullscreen></iframe>
<iframe src="https://www.youtube-nocookie.com/embed/xxxxxx?rel=0&&showinfo=0" cc_load_policy="1" frameborder="0" allowfullscreen></iframe>
Try adding cc_lang_pref , you wouldn't find in the official docs. but it's required
cc_load_policy=1&cc_lang_pref=en
You can change pref. language as per the locale representation of the language you have put in the video caption

How to write HTML for embedding Flash content

I am having a URL of some MSN video as http://video.in.msn.com/watch/video/the-help-theatrical-trailer/fcvrtnl7,
I would like to create a HTML document in such a fashion so that if I load that HTML document then, only that running flash content present in the link mentioned below should come. I have created a HTML doc but when I load that, I am able to see only Flash player on my page , it is not playing any video content in that.
Below mentioned is the HTML code. Please advice am I missing execution of any Javascript, if yes then how to identify which is the required Javascript to get the video loaded in the flash player.
<html>
<body topmargin="0" leftmargin="0">
<embed
type="application/x-shockwave-flash"
src="http://img.widgets.video.s-msn.com/v/5407.02/fl/player/current/player.swf"
width="800" height="450" "autoplay=false"
type="application/x-shockwave-flash"
id="rich_embed_460916691"
data="http://img.widgets.video.s-msn.com/v/5407.02/fl/player/current/player.swf"
PARAM=""
bgcolor="#000000"
allowScriptAccess="always"
quality="high"
wmode="window"
allowFullScreen="true"
flashvars="playlistmin=11&ps=10&mode=destination&ifs=true&playAdBeforeFirstVid=true&endslateTime=1&slateAd=true&pl=false&adaptiveBuffering=false&hideShare=false&hideInfo=true&hideSearch=true&hideMoreVideos=true&hidePlaylist=true&rst=v5&mkt=en-in&fr=dest_en-in&reportingType=dest&brand=v5%5e800x450&adEventTimeout=15&adFull=Web&adPartial=Partial&adModelType=MSN&adDivs=ux1_2_1_300x60ad_msn%2c300%2c60%3bplayer1000x650ad%2c1000%2c650%3bplayer1380x1024ad_temp%2c1380%2c1024%3bplayer1380x650ad%2c1380%2c650&timePlaying=60&videosPlayed=1&ad=true&vc=catalog.video.msn.com&vce=edge1.catalog.video.msn.com%2cedge2.catalog.video.msn.com%2cedge3.catalog.video.msn.com%2cedge4.catalog.video.msn.com&vci=img1.catalog.video.msn.com%2cimg2.catalog.video.msn.com%2cimg3.catalog.video.msn.com%2cimg4.catalog.video.msn.com&msnlink=true&linkOverride2=http%3a%2f%2fvideo.in.msn.com%2f%3fmkt%3den-in%26vid%3d%7b0%7d%26from%3d&linkBack=http%3a%2f%2fvideo.in.msn.com%2f&ap=true&widgetId=ux1_2_1_1_5&rv=true&rvp=false&versionPath=%2fv%2f5407.02%2f&qualityOverride=LO"
/>
</body>
</html>
On the page you refer to there is a 'Share' button.
If you click it, it gives you the code you can copy and paste:
<iframe
width="432"
height="243"
frameborder="0"
marginwidth="0"
marginheight='0'
scrolling="no"
src="http://hub.video.msn.com/embed/b7dad6f8-9355-4ccc-8b1b-d6eea6f28764/?vars=bWt0PWVuLWluJmJyYW5kPXY1JTVlODAweDQ1MCZsaW5rb3ZlcnJpZGUyPWh0dHAlM2ElMmYlMmZ2aWRlby5pbi5tc24uY29tJTJmJTNmbWt0JTNkZW4taW4lMjZ2aWQlM2QlN2IwJTdkJTI2ZnJvbSUzZCZsaW5rYmFjaz1odHRwJTNhJTJmJTJmdmlkZW8uaW4ubXNuLmNvbSUyZiZjb25maWdDc2lkPU1TTlZpZGVvJmNvbmZpZ05hbWU9c3luZGljYXRpb25wbGF5ZXImc3luZGljYXRpb249dGFnJnBsYXllci5mcj1zaGFyZWVtYmVkLXN5bmRpY2F0aW9u">
Video: The Help: Theatrical trailer
</iframe>
As #GabrielTheron suggested it is an iframe.
I'm no expert here, but perhaps an iframe might be easier/better to use?
I know it's quite a common way to use external content in a webpage (especially Flash content).

Categories