Esempio n. 1
0
 this.setControls = function (mode) {
     if (!isBoolean(mode)) {
         mode = !_model.get('controls');
     }
     _model.set('controls', mode);
     _programController.controls = mode;
 };
Esempio n. 2
0
        function _setFullscreen(state) {
            if (!isBoolean(state)) {
                state = !_model.get('fullscreen');
            }

            _model.set('fullscreen', state);
            if (_this._instreamAdapter && _this._instreamAdapter._adModel) {
                _this._instreamAdapter._adModel.set('fullscreen', state);
            }
        }
Esempio n. 3
0
        this.setControls = function (mode) {
            if (!_.isBoolean(mode)) {
                mode = !_model.get('controls');
            }
            _model.set('controls', mode);

            const provider = _model.getVideo();
            if (provider) {
                provider.setControls(mode);
            }
        };
Esempio n. 4
0
export function toggleClass(element, c, toggleTo) {
    const hasIt = hasClass(element, c);
    toggleTo = isBoolean(toggleTo) ? toggleTo : !hasIt;

    // short circuit if nothing to do
    if (toggleTo === hasIt) {
        return;
    }

    if (toggleTo) {
        addClass(element, c);
    } else {
        removeClass(element, c);
    }
}