Class: ExternalMediaItemElement
A media item web component that allows to define an external media item. It can be placed inside the integration element. For more complex use cases, see MediaItemElement.
Tagname
glomex-external-media-item
Slot
- (optional) Slot for inline JSON of type
application/glomex-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"
>
<glomex-external-media-item
id="SOME_ID"
src="SOME_VIDEO_URL"
duration="LENGTH_OF_VIDEO"
poster="POSTER_URL"
title="VIDEO_TITLE"
></glomex-external-media-item>
<!-- further media items -->
</glomex-integration>
It is possible to use MediaItem, MinimalMediaItem, or array of MediaItem or MinimalMediaItem in JSON format.
<glomex-integration
integration-id="REPLACE_WITH_INTEGRATION_ID"
>
<glomex-external-media-item>
<script type="application/glomex-external-media-item+json">
{
"id": "SOME_ID",
"sources": [
{
"src": "SOME_VIDEO_URL",
"mimetype": "video/mp4"
}
],
"duration": "LENGTH_OF_VIDEO",
"poster": "POSTER_URL",
"title": "VIDEO_TITLE"
}
</script>
</glomex-external-media-item>
</glomex-integration>
Extends
LitElement
Implements
Constructors
Constructor
new ExternalMediaItemElement():
ExternalMediaItemElement
Returns
ExternalMediaItemElement
Inherited from
LitElement.constructor
Properties
id
id:
string
=''
Unique identifier of the media item.
Implementation of
MediaItemElement.id
Overrides
LitElement.id
poster
poster:
string
=''
Poster image of the media item.
src
src:
string
=''
The source URL of this media source.
title
title:
string
=''
Title of the media item.
Implementation of
MediaItemElement.title
Overrides
LitElement.title
aspectRatio?
optional
aspectRatio:string
Aspect ratio of the media item.
channelLogo?
optional
channelLogo:string
Square logo of the channel (optimal size: 96x96 pixels)
channelName?
optional
channelName:string
Name of the channel
description?
optional
description:string
Description of the media item.
duration?
optional
duration:number
Duration of the media item in seconds. Not defined when livestream.
endDate?
optional
endDate:number
Time when the media item expires. Unix timestamp in milliseconds.
hasProductPlacement?
optional
hasProductPlacement:boolean
Whether the media item has product placements.
mimetype?
optional
mimetype:Mimetype
Mimetype of the media source.
minimumAge?
optional
minimumAge:number
Minimum age to watch the media item.
releaseDate?
optional
releaseDate:number
Release date of the media item. Unix timestamp in milliseconds.
type?
optional
type:StreamType
Stream type of the media item.
Accessors
data
Get Signature
get data():
MinimalMediaItem
|MediaItem