Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IW3CMedia

interface IW3CMedia
Extends com.amazon.apmf.IStandard Module : /com.amazon.kepler.w3cmedia@IW3CMedia Base Interface to access W3CMedia APIs.

Methods

makeContentProtectionInitData()

IContentProtectionInitData* makeContentProtectionInitData(u8[] initDataBuffer, ContentProtectionInitDataType initDataType)
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.

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()

IConfigBuilder* makeConfigBuilder()
Creates a new instance of IConfigBuilder object.

Returns

IConfigBuilder* a new instance of IConfigBuilder object.

makeHtmlMediaElement()

IHtmlMediaElement* makeHtmlMediaElement(IConfig* config)
Create a HtmlMediaElement object instance.

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()

ISourceBufferConfigBuilder* makeSourceBufferConfigBuilder()
Creates a new instance of ISourceBufferConfigBuilder object.

Returns

ISourceBufferConfigBuilder* a new instance of ISourceBufferConfigBuilder object.

makeMediaSource()

IMediaSource* makeMediaSource(IHtmlMediaElement* mediaElement)
Creates an instance of MediaSource object. For further details see https://www.w3.org/TR/2016/REC-media-source-20161117/

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()

IMediaSampleSource* makeMediaSampleSource(IHtmlMediaElement* mediaElement)
Creates a new instance of MediaSampleSource object.

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()

IMediaKeySystemMediaCapability* makeKeySystemMediaCapability(string mimeType, MediaRobustness robustness)
Creates a MediaKeySystemMediaCapability object to be passed to KeySystemConfiguration object.

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()

IMediaKeySystemConfigurationBuilder* makeMediaKeySystemConfigurationBuilder()
Creates a new instance of IMediaKeySystemConfigurationBuilder object.

Returns

IMediaKeySystemConfigurationBuilder* a new instance of IMediaKeySystemConfigurationBuilder object.

requestMediaKeySystemAccess()

com.amazon.apmf.ISubscription* requestMediaKeySystemAccess(string keySystem, IMediaKeySystemConfiguration*[] configurationList, IMediaKeySystemAccessRequestListener* onMediaKeySystemAccessRequestCompletedListener)
Creates a IMediaKeySystemAccess object instance. For further details see https://www.w3.org/TR/encrypted-media/#navigator-extension:-requestmediakeysystemaccess()

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()

IEncryptionInfo* makeEncryptionInfo()
Creates a new instance of EncryptionInfo object.

Returns

IEncryptionInfo* a new instance of EncryptionInfo object.

makeAudioParams()

IAudioParams* makeAudioParams(string mimeType)
Creates a new instance of IAudioParams object.

Parameters

mimeType
string — Required The mime type of audio.

Returns

IAudioParams* a new instance of IAudioParams object.

makeVideoParams()

IVideoParams* makeVideoParams(string mimeType)
Creates a new instance of IVideoParams object.

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()

IMediaSample* makeMediaSample(u8[] mediaSampleDataBuffer)
Creates a new instance of IMediaSample object.

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()

IMediaSampleSourceTrack* makeMediaSampleSourceTrackForAudio(IAudioParams* audioParams)
Creates a new instance of MediaSampleSourceTrack object for audio.

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()

IMediaSampleSourceTrack* makeMediaSampleSourceTrackForVideo(IVideoParams* videoParams)
Creates a new instance of MediaSampleSourceTrack object for video.

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.
Last modified on October 29, 2026