lbry-desktop/ui/component/viewers/videoViewer/internal/theater-mode.js

17 lines
437 B
JavaScript
Raw Permalink Normal View History

2021-01-08 16:21:27 +01:00
// @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'));
}