Interface IW3CMedia
interface IW3CMedia
Extends com.amazon.apmf.IStandard
Module : /com.amazon.kepler.w3cmedia@IW3CMedia
Base Interface to access W3CMedia APIs.
Methods
makeContentProtectionInitData()
Create content protection init data based on pssh data and data type this data will be passed to CDM to generate license request for content decryption key.IContentProtectionInitData*makeContentProtectionInitData(u8[]initDataBuffer,ContentProtectionInitDataTypeinitDataType)
Parameters
initDataBuffer
u8[] — Required
Content protection pssh data of type
ContentProtectionInitDataBuffer.
initDataType
ContentProtectionInitDataType — Required
The encryption type of pssh data
Returns
IContentProtectionInitData*
a new instance of IContentProtectionInitData object.
makeConfigBuilder()
Creates a new instance of IConfigBuilder object.IConfigBuilder*makeConfigBuilder()
Returns
IConfigBuilder*
a new instance of IConfigBuilder object.
makeHtmlMediaElement()
Create a HtmlMediaElement object instance.IHtmlMediaElement*makeHtmlMediaElement(IConfig*config)
Parameters
config
IConfig* — Required
The parameters used to configure the IHtmlMediaElement object
instance.
Returns
IHtmlMediaElement*
the newly created IHtmlMediaElement object
instance.
The implementation is updated to return an object of a subclass IHtmlMediaElement3.
IStandard::tryQueryInterface on returned IHtmlMediaElement object would provide
handle to IHtmlMediaElement3 object if implemented or NULL if its not implemented.
makeSourceBufferConfigBuilder()
Creates a new instance of ISourceBufferConfigBuilder object.ISourceBufferConfigBuilder*makeSourceBufferConfigBuilder()
Returns
ISourceBufferConfigBuilder*
a new instance of ISourceBufferConfigBuilder object.
makeMediaSource()
Creates an instance of MediaSource object. For further details see https://www.w3.org/TR/2016/REC-media-source-20161117/IMediaSource*makeMediaSource(IHtmlMediaElement*mediaElement)
Parameters
mediaElement
IHtmlMediaElement* — Required
IHtmlMediaElement instance for the MediaSource
return a new instance of IMediaSource object
Returns
IMediaSource*
MediaSource object instance.
This API is only supported in PlayerMode::MSE player mode.
This interface is now updated to create and return IMediaSource
extension IMediaSource2.
makeMediaSampleSource()
Creates a new instance of MediaSampleSource object.IMediaSampleSource*makeMediaSampleSource(IHtmlMediaElement*mediaElement)
Parameters
mediaElement
IHtmlMediaElement* — Required
IHtmlMediaElement instance for the MediaSampleSource
Returns
IMediaSampleSource*
the new instance of IMediaSampleSource object.
getMaxKeysPerSession()
i32 getMaxKeysPerSession()
Gets the maximum number of keys per session.
Returns
i32
the maximum number of keys per session.
makeKeySystemMediaCapability()
Creates a MediaKeySystemMediaCapability object to be passed to KeySystemConfiguration object.IMediaKeySystemMediaCapability*makeKeySystemMediaCapability(stringmimeType,MediaRobustnessrobustness)
Parameters
mimeType
string — Required
Mimetype of the media signalled by client application.
robustness
MediaRobustness — Required
The MediaRobustness value.
Returns
IMediaKeySystemMediaCapability*
the new instance of IMediaKeySystemMediaCapability.
makeMediaKeySystemConfigurationBuilder()
Creates a new instance of IMediaKeySystemConfigurationBuilder object.IMediaKeySystemConfigurationBuilder*makeMediaKeySystemConfigurationBuilder()
Returns
IMediaKeySystemConfigurationBuilder*
a new instance of IMediaKeySystemConfigurationBuilder object.
requestMediaKeySystemAccess()
Creates a IMediaKeySystemAccess object instance. For further details see https://www.w3.org/TR/encrypted-media/#navigator-extension:-requestmediakeysystemaccess()com.amazon.apmf.ISubscription*requestMediaKeySystemAccess(stringkeySystem,IMediaKeySystemConfiguration*[]configurationList,IMediaKeySystemAccessRequestListener*onMediaKeySystemAccessRequestCompletedListener)
Parameters
keySystem
string — Required
Name of DRM scheme desired to be initialized.
configurationList
IMediaKeySystemConfiguration*[] — Required
List of MediaKeySystemConfiguration.
onMediaKeySystemAccessRequestCompletedListener
IMediaKeySystemAccessRequestListener* — Required
Callback to get the
MediaKeySystemAccess instance.
Returns
com.amazon.apmf.ISubscription*
ISubscription object instance
makeEncryptionInfo()
Creates a new instance of EncryptionInfo object.IEncryptionInfo*makeEncryptionInfo()
Returns
IEncryptionInfo*
a new instance of EncryptionInfo object.
makeAudioParams()
Creates a new instance of IAudioParams object.IAudioParams*makeAudioParams(stringmimeType)
Parameters
mimeType
string — Required
The mime type of audio.
Returns
IAudioParams*
a new instance of IAudioParams object.
makeVideoParams()
Creates a new instance of IVideoParams object.IVideoParams*makeVideoParams(stringmimeType)
Parameters
mimeType
string — Required
The mime type of video.
This interface is now updated to create and return IVideoParams
extension IVideoParams2.
Returns
IVideoParams*
a new instance of IVideoParams object.
makeMediaSample()
Creates a new instance of IMediaSample object.IMediaSample*makeMediaSample(u8[]mediaSampleDataBuffer)
Parameters
mediaSampleDataBuffer
u8[] — Required
The encoded media sample data buffer.
MediaSample object instance will hold on to this pointer through out its lifetime.
Returns
IMediaSample*
a new instance of IMediaSample object.
makeMediaSampleSourceTrackForAudio()
Creates a new instance of MediaSampleSourceTrack object for audio.IMediaSampleSourceTrack*makeMediaSampleSourceTrackForAudio(IAudioParams*audioParams)
Parameters
audioParams
IAudioParams* — Required
The Audio Params object instance.
Returns
IMediaSampleSourceTrack*
the new instance of IMediaSampleSourceTrack object.
This interface is now updated to create and return IMediaSampleSourceTrack
extension IMediaSampleSourceTrack3.
makeMediaSampleSourceTrackForVideo()
Creates a new instance of MediaSampleSourceTrack object for video.IMediaSampleSourceTrack*makeMediaSampleSourceTrackForVideo(IVideoParams*videoParams)
Parameters
videoParams
IVideoParams* — Required
The Video Params object instance.
Returns
IMediaSampleSourceTrack*
returns the new instance of IMediaSampleSourceTrack object.
This interface is now updated to create and return IMediaSampleSourceTrack
extension IMediaSampleSourceTrack2.

