Closed pliu6 closed 4 years ago
pictureInPictureEnabled
is undefined
if Picture-in-Picture Web API is not available.
See https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture#feature-support
if (!('pictureInPictureEnabled' in document)) {
console.log('The Picture-in-Picture Web API is not available.');
}
else if (!document.pictureInPictureEnabled) {
console.log('The Picture-in-Picture Web API is disabled.');
}
https://github.com/w3c/picture-in-picture/blob/4db5e801275ce740f31a3ab7615969a28894bba3/index.bs#L394