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 or array of MediaItem 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?
optionalaspectRatio:string
Aspect ratio of the media item. Useful when vertical variants are used.
channelLogo?
optionalchannelLogo:string
Square logo of the channel (optimal size: 96x96 pixels)
channelName?
optionalchannelName:string
Name of the channel
description?
optionaldescription:string
Description of the media item.
duration?
optionalduration:number
Duration of the media item in seconds. Not defined when livestream.
endDate?
optionalendDate:number
Time when the media item expires. Unix timestamp in milliseconds. Useful for JSON-LD generation.
hasProductPlacement?
optionalhasProductPlacement:boolean
Whether the media item has product placements. Shows a product placement indicator in the UI.
mimetype?
optionalmimetype:Mimetype
Mimetype of the media source.
minimumAge?
optionalminimumAge:number
Minimum age to watch the media item. Shows a minimum age indicator in the UI.
playbackMode?
optionalplaybackMode:PlaybackMode
Content mode of the media source.
releaseDate?
optionalreleaseDate:number
Release date of the media item. Unix timestamp in milliseconds. Useful for JSON-LD generation.
Accessors
data
Get Signature
get data():
MediaItem
Returns
Implementation of
Methods
webkitRequestFullscreen()?
optionalwebkitRequestFullscreen():void
Returns
void
Implementation of
MediaItemElement.webkitRequestFullscreen
Inherited from
LitElement.webkitRequestFullscreen