videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.53k stars 425 forks source link

Airplay not working with overrideNative : true #1358

Closed damanV5 closed 1 year ago

damanV5 commented 1 year ago

I am using @silvermine/airplay library for casting. I am facing issue while connecting to airplay. It immediately disconnects if I am casting with overrideNative flag set to true.

I have set the overrideNative:true as without this I am unable to get the 'vhs' inside the tech Object present in player instance, which is required to get the available rendition.

videojs version: 7.20.3 silvermine/airplay version: 1.1.0 Configuration:

html5: {
        vhs: {
          overrideNative: false
        },
mister-ben commented 1 year ago

I suspect Airplay itself doesn't support a video is played by media source extensions (including VHS) rather than natively.

gkatsev commented 1 year ago

airplay doesn't support MSE, however, an airplay plugin could handle it by say creating a new video element with the original m3u8 and passing the airplay request onto it, or swapping from MSE playback to native m3u8 playback.

damanV5 commented 1 year ago

@gkatsev Got it . Can we set overrideNative flag permanently to false in case of Safari browsers?

Let me know if I can raise a PR for this.

gkatsev commented 1 year ago

The default is to not overrideNative on safari browsers. you can also set it to something like !videojs.browser.IS_ANY_SAFARI

damanV5 commented 1 year ago

Got it. So, in this case airplay-plugin should be able to handle this even if we are passing the flag as true.

gkatsev commented 1 year ago

Definitely possible for it to handle it, though, it's a workaround.

damanV5 commented 1 year ago

Okay, Thankyou.