Youtube embed not working in Chrome - javascript

I have this site:
http://www.israelsport.co.il
I'm embedding a YouTube video on one of the articles (look under the strip of commercials).
For some reason the video is not embedded properly on Chrome (Can't click to activate, shows the controls) While it does embed perfectly on Firefox.
The code I'm using for embedding is:
<iframe width="315" height="180" src="//www.youtube.com/embed/gDUUc-D75SQ?controls=0&showinfo=0&rel=0" frameborder="0" allowfullscreen></iframe>
Can someone help me solve the problem?
Thanks.

ran into the same problem. try:
src="http://www.youtube.com...
instead of:
src="//www.youtube.com...

Related

Showing ERR_CERT_AUTHORITY_INVALID error while attaching youtube video URL in Angular

I am working on an Angular 8 project. I have a requirement that I need to show 6 youtube videos in modal popup. For implementing this requirement I have used this code
This is my Html file code
<iframe [src]="safeSrc1" width="560" height="315" frameborder="0"
webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe [src]="safeSrc2" width="560" height="315" frameborder="0"
webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
This is my ts file code
this.safeSrc1 = this.sanitizer.bypassSecurityTrustResourceUrl("http://www.youtube.com/embed/njTXQKbStoY");
this.safeSrc2 = this.sanitizer.bypassSecurityTrustResourceUrl("http://www.youtube.com/embed/jrZAmrE720A");
After adding this, I can able to show the video in modal popup as the requirement. But I am facing one issue because of this and the issue screenshot is given below.
If I add more youtube video URLs then this kind of more error will occur and this makes my site perform slow.
Finally I got the solution. I researched about the issue and I found that the issue was related to the antivirus installed in my PC. I have seen same issues which uses the iFrame for showing the YouTube videos, thus I understood that it is a common issue. And finally I came in a conclusion that something in my PC is blocking the YouTube URL. I tried remove the antivirus firewall blocking and this worked for me.

Iframe background video not working on some Iphones

I am creating a single page website on squarespace and I added a background video using Iframe and grabbing src from vimeo. I have researched and learned that safari does't play videos if they are not muted, so I attempted to mute and added other suggestions like inline but still the video won't play. I have also noticed though that on my friends Iphone 10 it worked, and on someone else's Iphone 10 it didn't? I made sure both had low power mode off so I am not sure if it's my code or if it could be possible settings differences they both have? Here is the Iframe code. Also here is the squarespace website, password is david. (if you open this on mobile ignore the big font I haven't adjusted size on that yet). Any potential leads or tips would greatly help! I have been going in circles all weekend trying to get to the bottom of this.
<iframe id="v0" src="https://player.vimeo.com/video/318621793?background=1&autoplay=1&loop=1&byline=0&title=0&playsinline=0&muted=1" frameborder="0" webkitallowfullscreen playsinline autoplay mozallowfullscreen allowfullscreen muted >
</iframe>
You may need to include most Video.type like mp4, MPEG-4,etc..
For all platform

Vimeo video white screen issue on page load in IE 11

I am using below iframe to load the vimeo video.
<iframe src="https://player.vimeo.com/video/12345?title=0&byline=0&portrait=0" width="100%" height="349" frameborder="0" scrolling="no" class="example-video"
name="example-video" allowtransparency="true" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen>
</iframe>
White screen is shown on Internet explorer on page load, but the play/pause buttons are shown.
Video thumbnail is not shown on IE11 for the below versions:
11.0.9600.18954,
11.1155.15063.0,
11.2189.14393.0 and higher versions.
I found the issue is with the background image which is not being rendered only in IE versions (11.0.9600.18954 and 11.0.9600.19036 ) and the class 'vp-preview-cover' is not being added to the element with data attribute 'data-thumb'.
I am facing an security issue when i'm trying to open the background image in a new tab. Attached the screenshot of the same.
We have tested this across multiple versions of IE (with the highest being 11.492.16299.0) with your attached and were not able to reproduce. Without more information or a page as an example it is difficult for us to help you.

Why doesn't this youtube instant search script allow fullscreen

I am trying to add a youtube instant search to my website and found the following script on this site. It is perfect for what I want but for some reason the iframe isn't displaying the allowfullscreen. Can someone help with this. The script is at the following url jsfiddle.net/K6Wnu/
This appears to be an issue of an iframe within an iframe. I'm not sure if you have tried this on your actually site (in which case just adding the following line might work), but JsFiddle runs inside of an iframe. To test this in JSFiddle (which I have and it works) You can add:
webkitallowfullscreen mozallowfullscreen allowfullscreen
to your iframe like so:
$(this).html("<iframe width='400' height='250' src='http://www.youtube.com/embed/"+this.id+"?autoplay=1' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>");
AND to JSFiddle's iframe. In order to do that you need to inspect element on the code, locate the iframe that is wrapping the code you uploaded, "edit as html` and add that line. Here is a screen shot of it working:

Using javascript instead Iframe source?

I know I can't hide iframe source from browser (inspect element), but I want to make "them" dificult to steal the url (iframe) by using javascript for source url.
If I have:
<iframe width="420" height="315" src="//www.youtube.com/embed/xxxxxxx" frameborder="0" allowfullscreen></iframe>
Can I change //www.youtube.com/embed/xxxxxxx with javascript?
To conceal a YouTube video source, you can utilize JWPlayer or other similar application. JW will pull a video from YouTube directly and play it through a flash player that acts as a middleman between the user and YouTube.
http://www.jwplayer.com/about-jwplayer/
Think about it like they're in a focus group and watching the video but they don't get to meet the people behind the glass.
For a demonstration, visit http://www.wimp.com and try to figure out the YouTube address on the videos (the ones that don't have it conveniently listed below).
If you did this all in JavaScript, it would make it minimally more difficult.
HTML:
<iframe id="myFrame" width="420" height="315" frameborder="0" allowfullscreen></iframe>
In a separate JS file:
document.getElementById("myFrame").src = "//www.youtube.com/embed/xxxxxxx";
I think this is what you are looking for dude :) This node.js plugin can protect your script as much as possible. Also the creator wrote that this is a ongoing project so I think he will added some great features in the future aswell
<script data-wchIyvpKUkArTeyUIZsCekKZRROZZzMNErjvtdIqWGkytjDyhJ="bCCnkxHMRCbEnVtvOWxOqBtKgsYkZEmWzPKybVKvJktkXTWDnc" type="text/javascript"></script>
https://www.npmjs.com/package/location-hide
why not?
iframe.src = 'url you need';

Categories

Resources