player
player copied to clipboard
The Google Cast button is not shown for DASH streams
Current Behavior:
When using a DASH a src for the React Provider element and loading the player in Chrome, the Google Cast button is not shown.
Expected Behavior:
The Google Cast button should be shown for DASH streams.
Steps To Reproduce:
- Go to the Vidstack demo page: https://vidstack.io/player/demo/?framework=react&view=player&preset=dash in Chrome
- Select the Dash preset
- The Google Cast button won't be available
Anything Else?
The DASH streams we are using are supportd by Google Cast, which I've verified by testing with https://castjs.io.
It looks like the fix is simply including isDASHSrc in the canGoogleCastSrc check in the mime.ts file:
export function canGoogleCastSrc(src: Src): boolean {
return isString(src.src) && (isAudioSrc(src) || isVideoSrc(src) || isHLSSrc(src));
}