This page covers data collection for the Mute player state. See Streams impacted by mute, Mute counts, and Mute total duration for the corresponding reporting metrics.
The mute player state tracks when the viewer mutes and unmutes audio. Fire a state-start event when the viewer mutes and a state-end event when the viewer unmutes. The backend computes three metrics from these events: streams impacted, count of state entries, and total time in state.
a.media.states.mute.set, a.media.states.mute.count, a.media.states.mute.timec_contextdata.a.media.states.mute.set, c_contextdata.a.media.states.mute.count, c_contextdata.a.media.states.mute.timeRecommended implementation types
Use sendEvent to send a media.statesUpdate event with the state added to statesStart:
| code language-javascript |
|---|
|
When the viewer unmutes, send another event with the state in statesEnd:
| code language-javascript |
|---|
|
Use tracker.trackPlayerStateStart() and tracker.trackPlayerStateEnd() with the MediaConstants.PlayerState.MUTE constant.
| code language-swift |
|---|
|
Use tracker.trackPlayerStateStart() and tracker.trackPlayerStateEnd() with the MediaConstants.PlayerState.MUTE constant.
| code language-kotlin |
|---|
|
Use sendMediaEvent to send a media.statesUpdate event with the state added to statesStart:
| code language-brightscript |
|---|
|
When the viewer unmutes, send another event with the state in statesEnd:
| code language-brightscript |
|---|
|
Call the statesUpdate endpoint with mute in statesStart (or statesEnd when the viewer unmutes):
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Use ADB.Media.createStateObject and the ADB.Media.PlayerState.Mute constant:
| code language-javascript |
|---|
|
Use ADBMobile.media.createStateObject with the "mute" string directly, as Chromecast does not have named PlayerState constants:
| code language-javascript |
|---|
|
Send a stateStart POST request when the viewer mutes, and a stateEnd POST when they unmute:
| code language-json |
|---|
|
See the Media Collection API events reference for the full request structure.