cloudinary-video-player
Version:
Cloudinary Video Player
32 lines (30 loc) • 935 B
JavaScript
const abrStrategies = {
fastStart: {
capLevelToPlayerSize: true,
ignoreDevicePixelRatio: true,
maxDevicePixelRatio: 2,
abrEwmaDefaultEstimate: 4194304,
abrEwmaDefaultEstimateMax: 4194304,
enableWorker: false,
startLevel: 0
},
balanced: {
capLevelToPlayerSize: true,
ignoreDevicePixelRatio: true,
maxDevicePixelRatio: 2,
abrEwmaDefaultEstimate: 4194304,
abrEwmaDefaultEstimateMax: 4194304,
enableWorker: false
},
highQuality: {
capLevelToPlayerSize: true,
ignoreDevicePixelRatio: false,
maxDevicePixelRatio: 2,
abrEwmaDefaultEstimate: 4194304,
abrEwmaDefaultEstimateMax: 4194304,
enableWorker: false
}
};
const ADAPTIVE_STREAMING_STRATEGY = Object.keys(abrStrategies);
const hdrSupported = window.matchMedia && window.matchMedia('(dynamic-range: high)').matches;
export { ADAPTIVE_STREAMING_STRATEGY as A, abrStrategies as a, hdrSupported as h };