Skip to content

Commit

Permalink
Fix isSupported check in browser missing SourceBuffer global
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Walch committed Jan 3, 2020
1 parent 908507f commit ff6320b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/is-supported.ts
Expand Up @@ -5,7 +5,7 @@ export function isSupported (): boolean {
if (!mediaSource) {
return false;
}
const sourceBuffer = SourceBuffer || (window as any).WebKitSourceBuffer;
const sourceBuffer = (self as any).SourceBuffer || (self as any).WebKitSourceBuffer as SourceBuffer;
const isTypeSupported = mediaSource &&
typeof mediaSource.isTypeSupported === 'function' &&
mediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"');
Expand Down

0 comments on commit ff6320b

Please sign in to comment.