State start
The state start event signals that the media player entered a tracked state such as full screen, mute, or closed captioning. A player can be in multiple states simultaneously, and states can be started and ended in the same event call. Close each state with a State end event.
Valid state names: fullscreen, mute, closedCaptioning, pictureInPicture, inFocus
- Prerequisites: Session start
- Associated metric: Varies by state; see Track player states
Recommended implementation types
Call sendEvent with eventType: "media.statesUpdate" and the state name in statesStart:
| code language-javascript |
|---|
|
Multiple states can be started in the same call:
| code language-javascript |
|---|
|
Use trackPlayerStateStart with a state object created from the appropriate MediaConstants.PlayerState constant.
| code language-swift |
|---|
|
Use trackPlayerStateStart with a state object created from the appropriate MediaConstants.PlayerState constant.
| code language-kotlin |
|---|
|
Call sendMediaEvent with eventType: "media.statesUpdate" and the state name in statesStart:
| code language-brightscript |
|---|
|
Call the statesUpdate endpoint with the state name in statesStart:
| code language-sh |
|---|
|
Legacy implementation types (Analytics-only)
Use ADB.Media.createStateObject with the appropriate ADB.Media.PlayerState constant:
| code language-javascript |
|---|
|
Use ADBMobile.media.createStateObject with the appropriate ADBMobile.media.PlayerState constant:
| code language-javascript |
|---|
|
Send a stateStart POST to the events endpoint:
| code language-json |
|---|
|