requestCast()

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",
 },
]);
PropertyDescription
file* string(Required) Media file specified in your setup or sources
adschedule objectSchedule advertising for a specific media file

See: playlist.adschedule
description stringShort description of the item

This description is displayed below the title. This can be hidden with the displaydescription option.
image stringPoster image URL (displayed before and after playback)
link stringIf defined, when the video is shared from the player, the recipient will be referred to this URL
mediaid stringUnique 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 stringURL to a feed that contains related items for a particular playlist item
sources arrayUsed for quality toggling and alternate sources

See: playlist.sources
starttime numberTime 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 stringTitle 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 arrayInclude captions, chapters, and thumbnails for media

See: playlist.tracks
withCredentials booleanIf true, "withCredentials" will be used to request a media file rather than CORS
© 2007-2024 Longtail Ad Solutions, Inc.