Improve plugins format

This commit is contained in:
Rafael 2022-04-07 12:20:47 -03:00 committed by Thomas Zarebczan
parent b0f091a589
commit dff64f5a47

View file

@ -61,9 +61,7 @@ const onPlayerReady = (player, options) => {
!player.el_.ownerDocument.querySelector('.bc-iframe')
) {
player.tech_.el_.setAttribute('playsinline', 'playsinline');
player.tech_.supportsFullScreen = function () {
return false;
};
player.tech_.supportsFullScreen = () => false;
}
const controlBar = player.getChild('ControlBar');
@ -150,14 +148,12 @@ const onPlayerReady = (player, options) => {
* Whether to disable when the video ends (e.g., if there is an endscreen)
* Never shows if the endscreen plugin is present
*/
const mobileUi = function (options) {
function mobileUi(options) {
// if (videojs.browser.IS_ANDROID || videojs.browser.IS_IOS) {
if (videojs.browser.IS_ANDROID) {
this.ready(() => {
onPlayerReady(this, videojs.mergeOptions(defaults, options));
});
this.ready(() => onPlayerReady(this, videojs.mergeOptions(defaults, options)));
}
};
}
// Register the plugin with video.js.
registerPlugin('mobileUi', mobileUi);