You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can create custom media session attributes when initializing a new media session by including the custom media session attributes object directly in the MediaSession() builder:
90
+
91
+
```javascript
92
+
{
93
+
"my_session_attribute":"My Session Attribute"// Example key/value pair for a custom media session attribute
94
+
}
95
+
```
96
+
97
+
Custom media session attributes are automatically propagated to all media events logged during the session in addition to the media session summary event. Since custom session attributes are propagated to any event (a media event, advertising event, or a custom events) that is logged during the session, you don’t need to set these attributes again when you trigger the start of a media session.
98
+
99
+
#### Custom media session attribute limits
100
+
101
+
* 100 key/value pairs per media session
102
+
* Keys must be strings and cannot exceed 255 characters
103
+
* Values may be strings, numbers, booleans, or dates, and cannot exceed 4096 characters
104
+
84
105
### Logging Playhead Position
85
106
86
107
Most of our partner integrations require that a media player frequently trigger a _timeline update_ or _heartbeat_ event. Our API provides two different methods of updating the playhead position based on your needs.
0 commit comments