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 IHtmlMediaElement3

interface IHtmlMediaElement3
Extends IHtmlMediaElement2 The HtmlMediaElement3 object. Extension to HtmlMediaElement2 adding new method to get audio effect session ID and set playback range.

Methods

getAudioEffectSessionId()

i32 getAudioEffectSessionId()
Get audio effect session ID corresponding to IAudioStreamPlayback2 instance created by HtmlMediaElement. This API should be called when client have audio effect as per the [IAudioEffect]. See [IAudioEffect] documentation for more details. While calling this API, client must ensure at least one “canplay” event is received. See https://html.spec.whatwg.org/multipage/media.html#event-media-canplay for more details.

Returns

i32 audio effect session ID

setPlaybackRangeSecs()

void setPlaybackRangeSecs(double startPosition, double stopPosition)
Sets the start position and stop position of media playback for this MediaElement instance. This is particularly useful for gapless playback. This is currently only supported for URL mode. start position must be less than stop position. This API must be called after calling setSource(string) API.

Parameters

startPosition
double — Required start position in seconds
stopPosition
double — Required stop position in seconds

setVolumeLevelWithFade()

void setVolumeLevelWithFade(double volumeLevel, u32 fadeDuration, com.amazon.kepler.audio.AudioFadeType fadeType)
Sets the volume level of audio stream in the range 0.0 to 1.0 with Audio fade effect

Parameters

volumeLevel
double — Required The target audio volume level in the range 0.0 to 1.0
fadeDuration
u32 — Required duration of the audio fade effect in milliseconds. If the value is is 0, target volume is immediately applied without fading. A larger than 2000 ms value will be capped to 2000 ms
fadeType
com.amazon.kepler.audio.AudioFadeType — Required AudioFadeType effect to be used duing volume level change

Throws


Last modified on October 29, 2026