Shim AudioTrack type removed in TS3.9 (#43362)

AudioTrack isn't standard (only supported in IE and Safari), and is
removed from the DOM lib in TS 3.9: microsoft/TSJS-lib-generator#802

This PR puts a copy of the type called VideojsAudioTrack in instead.
That should be compatible with the DOM version for older Typescripts,
since it's copied directly from the old source.
This commit is contained in:
Nathan Shively-Sanders 2020-03-24 14:14:04 -07:00 committed by GitHub
parent 06226800b0
commit eea1cfb40e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -608,8 +608,17 @@ declare namespace videojs {
new(player: Player, options?: AudioTrackMenuItemOptions): AudioTrackMenuItem;
};
interface VideojsAudioTrack {
enabled: boolean;
readonly id: string;
kind: string;
readonly label: string;
language: string;
readonly sourceBuffer: SourceBuffer | null;
}
interface AudioTrackMenuItemOptions extends MenuItemOptions {
track?: AudioTrack;
track?: VideojsAudioTrack;
}
/**