const loader = new this.p2pMediaLoaderModule.Engine(p2pMediaLoaderConfig).createLoaderClass() as P2PMediaLoader
const p2pMediaLoader: P2PMediaLoaderPluginOptions = {
+ requiresAuth: commonOptions.requiresAuth,
+
redundancyUrlManager,
type: 'application/x-mpegURL',
startTime: commonOptions.startTime,
if (!(videojs as any).Html5Hlsjs) {
logger.warn('HLS.js does not seem to be supported. Try to fallback to built in HLS.')
+ let message: string
if (!player.canPlayType('application/vnd.apple.mpegurl')) {
- const message = 'Cannot fallback to built-in HLS'
+ message = 'Cannot fallback to built-in HLS'
+ } else if (options.requiresAuth) {
+ message = 'Video requires auth which is not compatible to build-in HLS player'
+ }
+
+ if (message) {
logger.warn(message)
player.ready(() => player.trigger('error', new Error(message)))