async AvailableDRMs() {
    const availableDRMs = ["aes-128"];

    if(!window) {
      return availableDRMs;
    }

    if(typeof window.navigator.requestMediaKeySystemAccess !== "function") {
      return availableDRMs;
    }

    try {
      const config = [{
        initDataTypes: ["cenc"],
        audioCapabilities: [{
          contentType: "audio/mp4;codecs=\"mp4a.40.2\""
        }],
        videoCapabilities: [{
          contentType: "video/mp4;codecs=\"avc1.42E01E\""
        }]
      }];

      await navigator.requestMediaKeySystemAccess("com.widevine.alpha", config);

      availableDRMs.push("widevine");
    // eslint-disable-next-line no-empty
    } catch(e) {}

    return availableDRMs;
  }
/**
   * Determine available DRM types available in this browser environment.
   *
   * @methodGroup Media
   * @return {Promise<Array<string>>}
   */
Determine available DRM types available in this browser environment.
@methodGroup Media
@return {Promise>}
Determine available DRM types available in this browser environment . @methodGroup Media @return { Promise > }
async AvailableDRMs() {
    const availableDRMs = ["aes-128"];
    if(!window) {
      return availableDRMs;
    }
    if(typeof window.navigator.requestMediaKeySystemAccess !== "function") {
      return availableDRMs;
    }
    try {
      const config = [{
        initDataTypes: ["cenc"],
        audioCapabilities: [{
          contentType: "audio/mp4;codecs=\"mp4a.40.2\""
        }],
        videoCapabilities: [{
          contentType: "video/mp4;codecs=\"avc1.42E01E\""
        }]
      }];
      await navigator.requestMediaKeySystemAccess("com.widevine.alpha", config);
      availableDRMs.push("widevine");
    } catch(e) {}
    return availableDRMs;
  }
async AvailableDRMs ( ) { const availableDRMs = [ "aes-128" ] ; if ( ! window ) { return availableDRMs ; } if ( typeof window . navigator . requestMediaKeySystemAccess !== "function" ) { return availableDRMs ; } try { const config = [ { initDataTypes : [ "cenc" ] , audioCapabilities : [ { contentType : "audio/mp4;codecs=\"mp4a.40.2\"" } ] , videoCapabilities : [ { contentType : "video/mp4;codecs=\"avc1.42E01E\"" } ] } ] ; await navigator . requestMediaKeySystemAccess ( "com.widevine.alpha" , config ) ; availableDRMs . push ( "widevine" ) ; } catch ( e ) { } return availableDRMs ; }
Determine available DRM types available in this browser environment.
Determine available DRM types available in this browser environment .
// eslint-disable-next-line no-empty