{"action":"closed","issue":{"url":"https://api.github.com/repos/johndyer/mediaelement/issues/1484","repository_url":"https://api.github.com/repos/johndyer/mediaelement","labels_url":"https://api.github.com/repos/johndyer/mediaelement/issues/1484/labels{/name}","comments_url":"https://api.github.com/repos/johndyer/mediaelement/issues/1484/comments","events_url":"https://api.github.com/repos/johndyer/mediaelement/issues/1484/events","html_url":"https://github.com/johndyer/mediaelement/issues/1484","id":72640617,"number":1484,"title":"MediaElement (version 2.16.4) iframe fullscreen video issue - firefox, IE11","user":{"login":"jalam1","id":6790381,"avatar_url":"https://avatars.githubusercontent.com/u/6790381?v=3","gravatar_id":"","url":"https://api.github.com/users/jalam1","html_url":"https://github.com/jalam1","followers_url":"https://api.github.com/users/jalam1/followers","following_url":"https://api.github.com/users/jalam1/following{/other_user}","gists_url":"https://api.github.com/users/jalam1/gists{/gist_id}","starred_url":"https://api.github.com/users/jalam1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalam1/subscriptions","organizations_url":"https://api.github.com/users/jalam1/orgs","repos_url":"https://api.github.com/users/jalam1/repos","events_url":"https://api.github.com/users/jalam1/events{/privacy}","received_events_url":"https://api.github.com/users/jalam1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-05-02T12:36:42Z","updated_at":"2016-08-26T03:46:23Z","closed_at":"2016-08-26T03:46:23Z","body":"I'm using mediaelement.js version 2.16.4 to load video in an iframe created by thickbox.js. When I try to click fullscreen button in firefox-37.0.2/IE-11 the video goes to fullscreen but immediately goes back to smaller size of the iframe. If I don't initialize mediaelement and only the HTML5 tag then the fullscreen works fine in an iframe. So, it has to do something with the mediaelement player. This doesn't happen in Chrome! I have \"webkitallowfullscreen mozallowfullscreen allowfullscreen\" in the iframe.\r\n\r\nStackoverflow : http://stackoverflow.com/questions/29969335/mediaelement-version-2-16-4-iframe-fullscreen-video-issue-firefox-ie11\r\n\r\nI found the issue of fullscreen in firefox/IE. It's the following code in mediaelement-and-player.js where there is a manual exit from fullscreen. For me the 'zoomMultiplier' variable is 1.25 which is causing the problem.\r\n\r\n\r\nif (t.isInIframe) {\r\n                    // sometimes exiting from fullscreen doesn't work\r\n                    // notably in Chrome <iframe>. Fixed in version 17\r\n                    setTimeout(function checkFullscreen() {\r\n\r\n                        if (t.isNativeFullScreen) {\r\n                            var zoomMultiplier = window[\"devicePixelRatio\"] || 1;\r\n                            // Use a percent error margin since devicePixelRatio is a float and not exact.\r\n                            var percentErrorMargin = 0.002; // 0.2%\r\n                            var windowWidth = zoomMultiplier * $(window).width();\r\n                            var screenWidth = screen.width;\r\n                            var absDiff = Math.abs(screenWidth - windowWidth);\r\n                            var marginError = screenWidth * percentErrorMargin;\r\n\r\n                            // check if the video is suddenly not really fullscreen\r\n                            if (absDiff > marginError) {\r\n                                // manually exit\r\n                                t.exitFullScreen();\r\n                            } else {\r\n                                // test again\r\n                                setTimeout(checkFullscreen, 500);\r\n                            }\r\n                        }\r\n\r\n\r\n                    }, 500);\r\n                }\r\n"}}
{"actor":{"display_login":"ron666"}}