File tree Expand file tree Collapse file tree
packages/vidstack/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { canGoogleCastSrc } from './mime' ;
2+
3+ describe ( canGoogleCastSrc . name , function ( ) {
4+ it ( 'accepts DASH sources by type' , function ( ) {
5+ expect (
6+ canGoogleCastSrc ( {
7+ src : 'https://example.com/manifest' ,
8+ type : 'application/dash+xml' ,
9+ } ) ,
10+ ) . to . equal ( true ) ;
11+ } ) ;
12+
13+ it ( 'accepts DASH sources by extension' , function ( ) {
14+ expect (
15+ canGoogleCastSrc ( {
16+ src : 'https://example.com/manifest.mpd' ,
17+ type : '' ,
18+ } ) ,
19+ ) . to . equal ( true ) ;
20+ } ) ;
21+ } ) ;
Original file line number Diff line number Diff line change @@ -81,7 +81,9 @@ export function isDASHSrc({ src, type }: Src): boolean {
8181}
8282
8383export function canGoogleCastSrc ( src : Src ) : boolean {
84- return isString ( src . src ) && ( isAudioSrc ( src ) || isVideoSrc ( src ) || isHLSSrc ( src ) ) ;
84+ return (
85+ isString ( src . src ) && ( isAudioSrc ( src ) || isVideoSrc ( src ) || isHLSSrc ( src ) || isDASHSrc ( src ) )
86+ ) ;
8587}
8688
8789export function isMediaStream ( src : unknown ) : src is MediaStream {
You can’t perform that action at this time.
0 commit comments