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 IHtmlMediaElement6

interface IHtmlMediaElement6
Extends IHtmlMediaElement5 The HtmlMediaElement6 object. Extension to IHtmlMediaElement5 adding methods to enable playback quality event delivery and tune PlaybackQualityMonitor detection parameters.

Methods

enablePlaybackQualityEvents()

void enablePlaybackQualityEvents()
Enables delivery of playback quality events (frame_drop, frame_freeze, audio_gap) through IHtmlMediaElementEventListener::onEvent with EventSource::HTML_MEDIA_ELEMENT. Events are NOT delivered by default; clients must call this to start receiving them.

disablePlaybackQualityEvents()

void disablePlaybackQualityEvents()
Disables delivery of playback quality events.

setFrameFreezeFactor()

void setFrameFreezeFactor(float freezeFactor)
Sets the multiplier applied to a frame’s expected duration to derive the frame-freeze threshold. A frame-freeze event is emitted when the observed inter-present gap exceeds freezeFactor × expectedFrameDuration.

Parameters

freezeFactor
float — Required The multiplier applied to the expected frame duration. Valid range: (1.0 , 5.0] 1.67 represents the default tuning Values > 2.0 report only longer stalls as frame freezes, Values close to 1.0 may report small delays as frame freezes

Throws


setAudioGapThresholdMs()

void setAudioGapThresholdMs(i64 thresholdMs)
Sets the minimum observed PTS gap, in milliseconds, between consecutive audio buffers that triggers an audio_gap event. Gaps smaller than this value are treated as expected jitter and suppressed. Default: 100.

Parameters

thresholdMs
i64 — Required threshold value in milliseconds.

Throws


Last modified on October 29, 2026