UNPKG

nsplayer

Version:

NSPlayer, a player which supports quality list of dash and hls

18 lines (17 loc) 807 B
import { Source } from '../types'; import { QualityLevel, SourceWithMimeType } from '../coreplayer'; export declare type SourcePolicy = (sources: Source[]) => SourceWithMimeType | undefined; export interface SourceMap { dash: SourceWithMimeType[]; hls: SourceWithMimeType[]; mp4: SourceWithMimeType[]; } export declare function supportMediaSource(): boolean; /** * 通过可播放资源,以及当前浏览器环境,推算出使用的资源 * @param sources 所有可播放的资源列表 */ export declare const DefaultSourcePolicy: SourcePolicy; export declare function isSourceEqual(s1: Source, s2: Source): boolean; export declare function areSourcesEqual(s1: Source[], s2: Source[]): boolean; export declare function isLevelMatch(source: QualityLevel, target: QualityLevel): boolean;