Allow fullscreen in iframe

This commit is contained in:
Sam Potts
2018-03-27 21:13:22 +11:00
parent 1a032ea498
commit d96957d086
15 changed files with 1867 additions and 1098 deletions

24
dist/plyr.js vendored
View File

@ -1078,16 +1078,6 @@ var utils = {
},
// Determine if we're in an iframe
inFrame: function inFrame() {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
},
// Wrap an element
wrap: function wrap(elements, wrapper) {
// Convert `elements` to an array, if necessary.
@ -1833,7 +1823,6 @@ var utils = {
// Plyr support checks
// ==========================================================================
// Check for feature support
var support = {
// Basic support
audio: 'canPlayType' in document.createElement('audio'),
@ -2199,9 +2188,7 @@ var Fullscreen = function () {
// Determine if fullscreen is enabled
get: function get$$1() {
var fallback = this.player.config.fullscreen.fallback && !utils.inFrame();
return (Fullscreen.native || fallback) && this.player.config.fullscreen.enabled && this.player.supported.ui && this.player.isVideo;
return (Fullscreen.native || this.player.config.fullscreen.fallback) && this.player.config.fullscreen.enabled && this.player.supported.ui && this.player.isVideo;
}
// Get active state
@ -2882,7 +2869,6 @@ var ui = {
// Plyr controls
// ==========================================================================
// Sniff out the browser
var browser$2 = utils.getBrowser();
var controls = {
@ -4080,7 +4066,6 @@ var controls = {
// Plyr Event Listeners
// ==========================================================================
// Sniff out the browser
var browser$1 = utils.getBrowser();
var Listeners = function () {
@ -6161,7 +6146,6 @@ var vimeo = {
// Plyr Media
// ==========================================================================
// Sniff out the browser
var browser$3 = utils.getBrowser();
var media = {
@ -6406,12 +6390,6 @@ var source = {
// License: The MIT License (MIT)
// ==========================================================================
// Private properties
// TODO: Use a WeakMap for private globals
// const globals = new WeakMap();
// Plyr instance
var Plyr = function () {
function Plyr(target, options) {
var _this = this;

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2677
dist/plyr.polyfilled.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long