+ // FIXME: typings https://github.com/Microsoft/TypeScript/issues/14080
+ if (!(videojs as any).Html5Hlsjs) {
+ const message = 'HLS.js does not seem to be supported.'
+ console.warn(message)
+
+ player.ready(() => player.trigger('error', new Error(message)))
+ return
+ }
+
+ // FIXME: typings https://github.com/Microsoft/TypeScript/issues/14080
+ (videojs as any).Html5Hlsjs.addHook('beforeinitialize', (videojsPlayer: any, hlsjs: any) => {