Profile: stream-player-video

Profile Schema

The stream-player-video profile indicates a document that represents a streaming video resource. Video documents contain 0 or more links to video files themselves, as well as metadata about the streaming video and its intended use.

The stream-player-video profile is intended to be used as a “type” profile.

Structure

stream-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
streamExpirationDateTime string No The date and time at which this stream should no longer be served
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

stream-player-video requires that the document contain an enclosures array with one or more links in it. Each enclosure in the stream-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://cdn.jwplayer.com/manifests/uWSE0niN.m3u8",
    "type": "application/vnd.apple.mpegurl",
    "rels": ["hls"]
}

Stream 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:

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 stream-player-video document with thumbnail

{
    "id": "1000",
    "title": "",
    "caption": "",
    "producer": "",
    "provider": "NPR",
    "displaySize": "large",
    "isRestrictedToAuthorizedOrgServiceIds": true,
    "isAvailable": true,
    "isEmbeddable": true,
    "enclosures": [{
        "href": "https://cdn.jwplayer.com/manifests/uWSE0niN.m3u8",
        "type": "application/vnd.apple.mpegurl",
        "rels": [ "hls" ]
    }],
    "profiles": [
        {
            "href": "/v1/profiles/stream-player-video",
            "rels": [ "type" ]
        },
        {
            "href": "/v1/profiles/has-images",
            "rels": [ "interface" ]
        },
        {
            "href": "/v1/profiles/document"
        }
    ],
    "images": [{
        "href": "#/assets/1001",
        "rels": [ "thumbnail" ]
    }],
}

© 2024 npr