lbry-desktop/ui/component/viewers/videoViewer/internal/theater-mode.js
2021-01-08 08:27:41 -07:00

16 lines
437 B
JavaScript

// @flow
import type { Player } from './videojs';
export function addTheaterModeButton(player: Player, toggleVideoTheaterMode: () => void) {
var myButton = player.controlBar.addChild('button', {
text: __('Theater mode'),
clickHandler: () => {
toggleVideoTheaterMode();
},
});
// $FlowFixMe
myButton.addClass('vjs-button--theater-mode');
// $FlowFixMe
myButton.setAttribute('title', __('Theater mode'));
}