Used to cast and update currently playing cast media with a new playlist item(s).
If URL signing or Studio DRM are enabled, requestCast() allows the cast receiver app to attain an updated playlist item, including a signed URL and DRM config.
jwplayer().requestCast([
{
sources: [
{
file: "https://cdn.jwplayer.com/videos/hEJzN61W-DrwE7pIM.mp4",
},
{
file: "https://cdn.jwplayer.com/videos/hEJzN61W-DrwE7pIM.webm",
},
],
image: "https://cdn.jwplayer.com/v2/media/hEJzN61W/poster.jpg?width=1280",
title: "Cosmos Trailer",
},
]);
| Property | Description |
|---|---|
| file* string | (Required) Media file specified in your setup or sources |
| adschedule object | Schedule advertising for a specific media file See: playlist.adschedule |
| description string | Short description of the item This description is displayed below the title. This can be hidden with the displaydescription option. |
| image string | Poster image URL (displayed before and after playback) |
| link string | If defined, when the video is shared from the player, the recipient will be referred to this URL |
| mediaid string | Unique identifier of the media item Used by advertising, analytics and discovery services. |
| minDvrWindow number | (HLS-only) In seconds, the minimum amount of content in an M3U8 required to trigger DVR mode NOTE: To always display DVR mode, set this property to 0. The default value is 120. |
| recommendations string | URL to a feed that contains related items for a particular playlist item |
sources array | Used for quality toggling and alternate sources See: playlist.sources |
| starttime number | Time in seconds to start a media item NOTE: When used with an MP4 video file, both seek and seeked events are triggered. Neither event is triggered when used with a DASH or HLS stream. |
| title string | Title of the item This is displayed inside of the player prior to playback, as well as in the visual playlist. This can be hidden with the displaytitle option |
| tracks array | Include captions, chapters, and thumbnails for media See: playlist.tracks |
| withCredentials boolean | If true, "withCredentials" will be used to request a media file rather than CORS |
