Class: ExternalMediaItemElement
A media item web component that allows to define external media items via inline JSON. It can be placed inside the integration element as a child. For more complex use cases, see MediaItemElement.
Tagname
external-media-item
Slot
- Slot for inline JSON of type
application/external-media-item+json
Examples
This only works when no playlist-id is assigned to glomex-integration
<glomex-integration
integration-id="REPLACE_WITH_INTEGRATION_ID"
>
<external-media-item>
<script type="application/external-media-item+json">
{
"id": "SOME_ID",
"sources": [
{
"src": "SOME_VIDEO_URL",
"mimetype": "video/mp4"
}
],
"duration": 120,
"poster": "POSTER_URL",
"title": "VIDEO_TITLE"
}
</script>
</external-media-item>
</glomex-integration>You can also pass an array of MediaItem objects to define a playlist.
<glomex-integration
integration-id="REPLACE_WITH_INTEGRATION_ID"
>
<external-media-item>
<script type="application/external-media-item+json">
[
{
"id": "VIDEO_1",
"sources": [{ "src": "VIDEO_1_URL", "mimetype": "video/mp4" }],
"duration": 120,
"poster": "POSTER_1_URL",
"title": "First Video"
},
{
"id": "VIDEO_2",
"sources": [{ "src": "VIDEO_2_URL", "mimetype": "video/mp4" }],
"duration": 180,
"poster": "POSTER_2_URL",
"title": "Second Video"
}
]
</script>
</external-media-item>
</glomex-integration>Extends
Constructors
Constructor
new ExternalMediaItemElement():
ExternalMediaItemElement
Returns
ExternalMediaItemElement
Inherited from
MediaItemElement.constructor
Properties
id
id:
string
The content ID used by the provider to look up the media item. For glomex, this can be a media ID or a playlist ID. For Joyn, this is a Joyn media ID.
Attribute
id
Inherited from
environment?
optionalenvironment:"stage"|"prod"='prod'
The environment to use for the provider.
Attribute
environment
Default Value
'prod'Inherited from
Last updated on