1

I am trying to embed a video into html via iframe

<iframe width="100%" height="351" scrolling="no" frameborder="0"   src="http://finance.yahoo.com/video/playlist/cnbc-big-data/best-worst-housing-markets-132811012.html?format=embed&player_autoplay=false"></iframe>

This video works fine in Firefox. However, when I am trying to view the iframe embedded video in IE11 it does not work and instead gives me the message "You need Adobe Flash to play this video" -- this does work in IE11 if viewing from the original link though.

I cant seem to understand why this isn't working, I am hoping someone could help me with a solution!

Thanks

cgatian
  • 22,047
  • 9
  • 56
  • 76
Michael Ramirez
  • 237
  • 5
  • 21
  • Did you make sure you installed Adobe Flash for IE? And have the plugin running?? – Charlie74 Nov 28 '13 at 14:07
  • 1
    Also, I believe IE10 and IE11 do not support flash when using it through the "metro" interface... you need to use the desktop versions of the browsers to view flash. – Charlie74 Nov 28 '13 at 14:08
  • Well as I said in my original post the video does work as a flash plugin on the original source -- its just when trying to add this as a embedded video via iframe that it doesn't work... I am using windows 7 not 8. – Michael Ramirez Nov 28 '13 at 14:13
  • http://stackoverflow.com/questions/17199683/youtube-iframe-embed-code-not-working-in-ie7-or-in-ie-compatability-mode for IE7 .May also work for IE11 – Zword Nov 28 '13 at 14:15
  • I'd also like to point out YouTube embedded video iframe works perfectly fine. Just the yahoo link which doesn't want to work in IE11 --- works fine in FireFox and Safari though. – Michael Ramirez Nov 28 '13 at 14:19

1 Answers1

2

It looks like when you embed the video into an iframe the source (Yahoo) incorrectly determines the browser type of the embedded frame in IE11. Looking through the Yahoo source they do some browser checking and even attempt to add a video tag into the markup. If these all fail the code says to use default, which is set to flash.

http://yep.video.yahoo.com/js/3/videoplayer-min.js?lang=en-US  


getRendererType: function (al) {
        var am = "html";
        if (f.Lang.isString(al.mobile) || f.Lang.isNumber(al.ios) || al.android > 0) {
            return am;
        }
        if ((navigator && navigator.userAgent) && ((navigator.userAgent.indexOf("MSAppHost") >= 0) || (/.+MSIE 10.+Windows NT.+WebView/i.test(navigator.userAgent)))) {
            return am;
        }
        if (this._fallBackTOHTML5(al)) {
            return am;
        }

        function Y() {
            return !!document.createElement("video").canPlayType;
        }
        if (this._preferHTML5 && Y()) {
            return am;
        }
        return this._defaultRenderer;

However changing the browser agent back to IE10, the render type is successful and the video displays.

IE10 Render

While its just a guess, but I bet the new user agent strings IE11 uses is somehow telling this video component control to incorrectly render. Unfortunately, there's just so much code in the video player its really hard to unravel.

Update: I've tried modifying the navigator.userAgent string to appear as IE10 without any luck Sample

Update2: I don't think it's a user agent string. It must be something with adding the video tag inside an Iframe in IE11. Modifying the user agent does fix it. Maybe it's a bit of both.

Sadly, I think you will just have to wait for them to fix the video control.

cgatian
  • 22,047
  • 9
  • 56
  • 76
  • Wasn't much help... Perhaps someone will see my progress and can think of something else to try. – cgatian Nov 28 '13 at 15:42