benecaster_episode_preview_video
What a locked visitor’s video preview plays, resolved from the episode’s Video preview setting. $preview is [ 'source' => 'file'|'youtube'|'vimeo', 'url' => string, 'start' => int, 'end' => int ], or [] when the episode has none or its setting can’t be honoured. url is the video file, or for youtube and vimeo the player address. start and end are seconds, both 0 for a separate clip. Return [] to turn the preview off; a value with an unknown source or an empty url also means none.
It fires for visitors who failed the access check, so whatever you return is what they can get. A time span is not protection: the visitor is given the full video’s address. Only a separate clip keeps the full video away from them. A video preview never reaches a feed or a download.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$preview |
array |
— | The preview, as above, or `[]`. |
$episode_id |
int |
— | The episode. |
$show_id |
int |
— | The episode's show. |
Returns:
array
Affects
- Episode page player
Need this built rather than just documented? See our services →