async BitmovinPlayoutOptions({objectId, versionHash, protocols=["dash", "hls"], drms=[]}) {
    if(!objectId) {
      objectId = this.utils.DecodeVersionHash(versionHash).objectId;
    }

    const playoutOptions = await this.PlayoutOptions({objectId, versionHash, protocols, drms, hlsjsProfile: false});
    let config = {
      drm: {}
    };

    Object.keys(playoutOptions).forEach(protocol => {
      const option = playoutOptions[protocol];
      config[protocol] = option.playoutUrl;

      if(option.drms) {
        Object.keys(option.drms).forEach(drm => {
          // No license URL specified
          if(!option.drms[drm].licenseServers || option.drms[drm].licenseServers.length === 0) { return; }

          // Opt for https urls
          const filterHTTPS = uri => uri.toLowerCase().startsWith("https");
          let licenseUrls = option.drms[drm].licenseServers;
          if(licenseUrls.find(filterHTTPS)) {
            licenseUrls = licenseUrls.filter(filterHTTPS);
          }

          // Choose a random license server from the available list
          const licenseUrl = licenseUrls.sort(() => 0.5 - Math.random())[0];

          if(!config.drm[drm]) {
            config.drm[drm] = {
              LA_URL: licenseUrl,
              headers: {
                Authorization: `Bearer ${this.authClient.channelContentTokens[objectId]}`
              }
            };
          }
        });
      }
    });

    return config;
  }
/**
   * Retrieve playout options in BitMovin player format for the specified content that satisfy
   * the given protocol and DRM requirements
   *
   * If only objectId is specified, latest version will be played. To retrieve playout options for
   * a specific version of the content, provide the versionHash parameter (in which case objectId is unnecessary)
   *
   * @methodGroup Media
   * @namedParams
   * @param {string=} objectId - Id of the content
   * @param {string} versionHash - Version hash of the content
   * @param {Array<string>=} protocols=["dash", "hls"] - Acceptable playout protocols
   * @param {Array<string>=} drms=[] - Acceptable DRM formats
   */
Retrieve playout options in BitMovin player format for the specified content that satisfy
the given protocol and DRM requirements

If only objectId is specified, latest version will be played. To retrieve playout options for
a specific version of the content, provide the versionHash parameter (in which case objectId is unnecessary)


Retrieve playout options in BitMovin player format for the specified content that satisfy the given protocol and DRM requirements If only objectId is specified latest version will be played . To retrieve playout options for a specific version of the content provide the versionHash parameter ( in which case objectId is unnecessary )
async BitmovinPlayoutOptions({objectId, versionHash, protocols=["dash", "hls"], drms=[]}) {
    if(!objectId) {
      objectId = this.utils.DecodeVersionHash(versionHash).objectId;
    }
    const playoutOptions = await this.PlayoutOptions({objectId, versionHash, protocols, drms, hlsjsProfile: false});
    let config = {
      drm: {}
    };
    Object.keys(playoutOptions).forEach(protocol => {
      const option = playoutOptions[protocol];
      config[protocol] = option.playoutUrl;
      if(option.drms) {
        Object.keys(option.drms).forEach(drm => {
          if(!option.drms[drm].licenseServers || option.drms[drm].licenseServers.length === 0) { return; }
          const filterHTTPS = uri => uri.toLowerCase().startsWith("https");
          let licenseUrls = option.drms[drm].licenseServers;
          if(licenseUrls.find(filterHTTPS)) {
            licenseUrls = licenseUrls.filter(filterHTTPS);
          }
          const licenseUrl = licenseUrls.sort(() => 0.5 - Math.random())[0];
          if(!config.drm[drm]) {
            config.drm[drm] = {
              LA_URL: licenseUrl,
              headers: {
                Authorization: `Bearer ${this.authClient.channelContentTokens[objectId]}`
              }
            };
          }
        });
      }
    });
    return config;
  }
async BitmovinPlayoutOptions ( { objectId , versionHash , protocols = [ "dash" , "hls" ] , drms = [ ] } ) { if ( ! objectId ) { objectId = this . utils . DecodeVersionHash ( versionHash ) . objectId ; } const playoutOptions = await this . PlayoutOptions ( { objectId , versionHash , protocols , drms , hlsjsProfile : false } ) ; let config = { drm : { } } ; Object . keys ( playoutOptions ) . forEach ( protocol => { const option = playoutOptions [ protocol ] ; config [ protocol ] = option . playoutUrl ; if ( option . drms ) { Object . keys ( option . drms ) . forEach ( drm => { if ( ! option . drms [ drm ] . licenseServers || option . drms [ drm ] . licenseServers . length === 0 ) { return ; } const filterHTTPS = uri => uri . toLowerCase ( ) . startsWith ( "https" ) ; let licenseUrls = option . drms [ drm ] . licenseServers ; if ( licenseUrls . find ( filterHTTPS ) ) { licenseUrls = licenseUrls . filter ( filterHTTPS ) ; } const licenseUrl = licenseUrls . sort ( ( ) => 0.5 - Math . random ( ) ) [ 0 ] ; if ( ! config . drm [ drm ] ) { config . drm [ drm ] = { LA_URL : licenseUrl , headers : { Authorization : ` ${ this . authClient . channelContentTokens [ objectId ] } ` } } ; } } ) ; } } ) ; return config ; }
Retrieve playout options in BitMovin player format for the specified content that satisfy
 the given protocol and DRM requirements
Retrieve playout options in BitMovin player format for the specified content that satisfy the given protocol and DRM requirements
// No license URL specified // Opt for https urls // Choose a random license server from the available list