0

I am embedding videos from Google drive on a site and the videos appear fine in Chrome & Firefox. In IE 11 and Edge it's a no go. I am assuming this is a privacy setting in the browser, although I'm not sure which. Also, if it is a privacy setting this obviously will not work as I can't go into every user's settings for them! Solutions or work-arounds?

here is the iframe code I am using...

<style>
  .embed-container { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    max-width: 100%; 
  } 
  .embed-container iframe, .embed-container object, .embed-container embed { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border:none;
  }
</style>
<div class="embed-container">
    <iframe src="https://drive.google.com/file/d/0B8az0_GAjTu8WWZ4Q2RxX1RoZWc/preview"></iframe>
</div>
Sandra Willford
  • 3,459
  • 11
  • 49
  • 96
  • this is working fine for me in IE9 < , Edge and all browser. check this js fiddle https://jsfiddle.net/8Ltwket0/ – Sachin Kadam Dec 29 '16 at 16:46
  • screenshot: https://s3.amazonaws.com/uploads.hipchat.com/212760/4474881/gneqdvyWZw4VZpm/fiddle.jpg – Sandra Willford Dec 29 '16 at 16:53
  • It's throwing "No Access-Control-Allow-Origin' header is present on the requested resource" error. Please refer to below question for more information. http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource Please check your browser settings also. – Sachin Kadam Dec 29 '16 at 17:00

1 Answers1

0

Check your compatibility view settings in IE. It works for me in IE when compatibility mode is turned off but when compatibility mode is turned on, it doesn't work. If that's the problem, you can either continue with compatibility mode turned off or you can also place the follow snippet of code in the head tag of your HTML to override user's compatibility view settings.

<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
Sina
  • 359
  • 4
  • 9