State end
The state end event signals that the media player exited a tracked state such as full screen, mute, or closed captioning. Send it to close a state opened by State start. States can be started and ended in the same event call. A player can exit multiple states simultaneously.
Valid state names: fullscreen, mute, closedCaptioning, pictureInPicture, inFocus
- Prerequisites: Session start, State start
- Associated metric: Varies by state; see Track player states
Recommended implementation types
Call sendEvent with eventType: "media.statesUpdate" and the state name in statesEnd:
| code language-javascript |
|---|
|
States can be started and ended in the same call:
| code language-javascript |
|---|
|
Use trackPlayerStateEnd with a state object created from the appropriate MediaConstants.PlayerState constant.
| code language-swift |
|---|
|
Use trackPlayerStateEnd 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 statesEnd:
| code language-brightscript |
|---|
|
Call the statesUpdate endpoint with the state name in statesEnd:
| 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 stateEnd POST to the events endpoint:
| code language-json |
|---|
|