UNPKG

@svta/common-media-library

Version:
21 lines 644 B
/** * Attempts to get key system access using requestMediaKeySystemAccess from EME. * * @param requests - An array of key system access requests. * @returns MediaKeySystemAccess object if successful, or null if no system is supported. * * @group DRM * @beta */ export async function getKeySystemAccess(requests) { for (const { keySystem, configurations } of requests) { try { return await navigator.requestMediaKeySystemAccess(keySystem, configurations); } catch { // legacy approach could be used here } } return null; } //# sourceMappingURL=getKeySystemAccess.js.map