fregante / iphone-inline-video

📱 Make videos playable inline on the iPhone (prevents automatic fullscreen)
https://npm.im/iphone-inline-video
MIT License
2.05k stars 300 forks source link

[Deprecation] 'HTMLVideoElement.webkitDisplayingFullscreen' is deprecated. Please use 'Document.fullscreenElement' instead. #135

Closed binarykitchen closed 6 years ago

binarykitchen commented 6 years ago

thrown here

function preventWithPropOrFullscreen(el) {
    var isAllowed = el[IIVEvent];
    delete el[IIVEvent];
    return !el.webkitDisplayingFullscreen && !isAllowed; <------
}

happens when i call load() on the video element. using the devices feature under google chrome's dev console for emulating iphone 6. navigator.platform is MacIntel.

userAgent string is Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1

fregante commented 6 years ago

Does this happen on iOS 11? Is iphone-inline-video being forcefully enabled via everywhere:true?

binarykitchen commented 6 years ago

not really ... have corrected the above comments

fregante commented 6 years ago

Strange, I'm testing on a real device (BrowserStack) and document.fullscreenElement is not defined at all, ever

Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1
fregante commented 6 years ago

I read your first comment again. As specified in a console.warn:

https://github.com/bfred-it/iphone-inline-video/blob/04ff50b8258b758b47b0ddfaaec3c11c6b9d5eaf/index.js#L320-L322