Class HttpMediaDrmCallback

    • Constructor Detail

      • HttpMediaDrmCallback

        public HttpMediaDrmCallback​(@Nullable
                                    String defaultLicenseUrl,
                                    HttpDataSource.Factory dataSourceFactory)
        Parameters:
        defaultLicenseUrl - The default license URL. Used for key requests that do not specify their own license URL. May be null if it's known that all key requests will specify their own URLs.
        dataSourceFactory - A factory from which to obtain HttpDataSource instances.
      • HttpMediaDrmCallback

        public HttpMediaDrmCallback​(@Nullable
                                    String defaultLicenseUrl,
                                    boolean forceDefaultLicenseUrl,
                                    HttpDataSource.Factory dataSourceFactory)
        Parameters:
        defaultLicenseUrl - The default license URL. Used for key requests that do not specify their own license URL, or for all key requests if forceDefaultLicenseUrl is set to true. May be null if forceDefaultLicenseUrl is false and if it's known that all key requests will specify their own URLs.
        forceDefaultLicenseUrl - Whether to force use of defaultLicenseUrl for key requests that include their own license URL.
        dataSourceFactory - A factory from which to obtain HttpDataSource instances.
    • Method Detail

      • setKeyRequestProperty

        public void setKeyRequestProperty​(String name,
                                          String value)
        Sets a header for key requests made by the callback.
        Parameters:
        name - The name of the header field.
        value - The value of the field.
      • clearKeyRequestProperty

        public void clearKeyRequestProperty​(String name)
        Clears a header for key requests made by the callback.
        Parameters:
        name - The name of the header field.
      • clearAllKeyRequestProperties

        public void clearAllKeyRequestProperties()
        Clears all headers for key requests made by the callback.