Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.videojs.on('playlistcreated', () => {
if (_playlistWidget) {
_playlistWidget.dispose();
}
const plwOptions = _options.playlistWidget;
if (isObj(plwOptions)) {
if (_options.fluid) {
plwOptions.fluid = true;
}
if (_options.cloudinary.fontFace) {
plwOptions.fontFace = _options.cloudinary.fontFace;
}
_playlistWidget = new PlaylistWidget(this.videojs, plwOptions);
}
});
};
this.playlistWidget = (options) => {
if (!options && !_playlistWidget) {
return false;
}
if (!options && _playlistWidget) {
return _playlistWidget;
}
if (isObj(options)) {
_playlistWidget.options(options);
}
return _playlistWidget;
};
}