States update endpoint
The statesUpdate
endpoint allows you to start or end the media player in a given state. The media player can be in multiple states simulataneously. You can start and end multiple player states in the same API call. The following states are available to start or end:
- Full screen: The media player is in a full screen state.
- Mute: The media player is muted.
- Closed captioning: The media has closed captioning enabled.
- Picture in picture: The media player is in PiP mode, typically shown on top of other content floating in a corner.
- In focus: The media player is in focus.
Usage of this endpoint requires an active session. Make sure that you call the sessionStart
endpoint first to obtain a valid session ID.
POST https://edge.adobedc.net/ee/va/v1/statesUpdate?configId={datastreamID}
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X POST "https://edge.adobedc.net/ee/va/v1/statesUpdate?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"xdm": {
"eventType": "media.statesUpdate",
"mediaCollection": {
"sessionID": "ffab5[...]45ec3",
"playhead": 0,
"statesStart": [
{
"name": "fullscreen"
},
{
"name": "mute"
}
],
"statesEnd": [
{
"name": "closedCaptioning"
}
]
},
"timestamp": "YYYY-08-20T22:41:40+00:00"
}
}
]
}'
If successfully processed, the API returns 204 No Content
.
This endpoint requires the following payload properties within the xdm
object:
eventType
media.statesUpdate
for this endpoint.mediaCollection
timestamp
The mediaCollection
object requires several properties. See Media Collection Details data type in the Experience Data Model guide for more information.
sessionID
sessionStart
endpoint.playhead
statesStart[]
name
property is required.statesEnd[]
name
property is required.Valid values for the name
property include fullscreen
, mute
, closedCaptioning
, pictureInPicture
, and inFocus
.