Profile: player-video
The player-video
profile indicates a document that represents a video resource. Video documents contain 0 or more links to video files themselves, as well as metadata about the video and its intended use.
The player-video
profile is intended to be used as a “type” profile.
Structure
player-video
specifies the following attributes:
Name | Type | Required? | Explanation |
---|---|---|---|
enclosures | Link[] | Yes | a list of links to the video files themselves; see “Enclosures” below |
title | string | No | the title of the video |
caption | string | No | a caption to place alongside the video when rendered |
producer | string | No | the name of the person or organization who produced the video |
provider | string | No | the name of the person or organization who provided the video |
displaySize | string | No | the relative size to display the video on a webpage |
duration | string | No | The duration of this audio in seconds (if known); this value must be >= 1 |
isRestrictedToAuthorizedOrgServiceIds | boolean | Yes | Flag representing whether this video is restricted from distribution outside of the authorized ids listed in authorizedOrgServiceIds; see “isRestrictedToAuthorizedOrgServiceIds” below |
isEmbeddable | boolean | Yes | Flag representing whether this video is available for rendering in an embedded player |
closedCaptions | Link[] | No | a list of links to the closed captions files |
Enclosures
player-video
requires that the document contain an enclosures
array with one or more links in it. Each enclosure in the player-video document represents a link to a video file. The attributes defined for enclosure links are:
Name | Type | Required? | Explanation |
---|---|---|---|
href | string | Yes | the location of the video file; must begin with http or https |
rels | string[] | Yes | string values describing quality of the linked file and its intended use; see the “Video enclosure rels” section for values |
type | string | No | the expected RFC6838 media type of the linked file |
An example enclosure link is below:
{
"href": "https://ondemand.npr.org/npr/ascvid/2017/03/20170317_ascvid_sxswlizzo2-n-600000.mp4",
"type": "mp4",
"rels": ["mp4-low"]
}
Player Video enclosure rels
The following rel
values are valid for enclosure links; other rel
values will be rejected.
Quality rels; used to indicate the quality type of the linked video:
mp4-low
mp4-med
mp4-high
mp4-hd
hls
hls
is need in order to support legacy procedures.
displaySize
The display size for an video is really just relative to the other content on the main web page. It is a choice between
small
medium
large
x-large
isRestrictedToAuthorizedOrgServiceIds
If this flag is set to true
, the authorizedOrgServiceIds
of the client being used needs to have an intersection with the authorizedOrgServiceIds of the document in order to use the asset, otherwise this asset should be ignored and skipped over.
Structure of thumbnails
Video with a thumbnail image must contain a has-images
profile and an images
array property on the video asset document. The images
SHOULD have a link should have a link with the thumbnail
rel to the image asset containing the thumbnail image
Example player-video document with thumbnail
{
"id": "1000",
"title": "",
"caption": "",
"producer": "",
"provider": "NPR",
"displaySize": "large",
"isRestrictedToAuthorizedOrgServiceIds": true,
"isEmbeddable": true,
"duration": 172,
"enclosures": [{
"href": "https://ondemand.npr.org/npr/ascvid/2017/03/20170317_ascvid_sxswlizzo2-n-600000.mp4",
"type": "mp4",
"rels": [ "mp4-low" ]
}, {
"href": "https://ondemand.npr.org/npr/ascvid/2017/03/20170317_ascvid_sxswlizzo2-n-1200000.mp4",
"type": "mp4",
"rels": [ "mp4-high" ]
}],
"profiles": [
{
"href": "/v1/profiles/player-video",
"rels": [ "type" ]
},
{
"href": "/v1/profiles/has-images",
"rels": [ "interface" ]
},
{
"href": "/v1/profiles/document"
}
],
"images": [{
"href": "#/assets/1001",
"rels": [ "thumbnail" ]
}],
}