Media

The commands below are related to the playback of media within the app.

Note

You cannot play YouTube content in a Roku TV application.

Notes

Both of the media commands below share some common functionality as it relates to working with MediaElements. Here are some things you should know.

To set the resume location from an existing interaction provide the map from the interaction using the rockWatchMap property.

To append to the watch map of an existing interaction provide both the rockInteractionGuid as well as the rockWatchMap property.

If you provide a rockWatchMap without a rockInteractionGuid property the watch map will be used for determining the resume location, but a new interaction will be written with a fresh watch map (so the watch map will start where they last left off).

Play Video

Plays the video file using the provided configuration.

<Rock:ContentNode rockCommand="playVideo" 
    rockVideoUrl="https://church.com/demo.mp3" />

Additional configuration options include the following:

ParameterTypeDescription
rockVideoUrlstringThe URL to the video file to play. Should be MP4 or HLS file.
rockVideoMediaElementGuidatringThis determines how you'd like the contents of the page cached by CDNs. Your options are: Public - The contents of the URL will have a public cache control header placed on them. Append ':600' to provide a seconds value for determining how long to cache the response. Personal - The URL will be appended with the logged in person's guid. This makes the URLs specific (cached) by the person. Append ':600' to provide a seconds value for determining how long to cache the response. Private - The page response will have a private cache control header applied.  
rockVideoRelatedEntityTypeIdintThe Entity Type ID that the media file is related to.
rockVideoRelatedEntityIdintThe Entity ID that the media file is related to.
rockVideoEnableResumebooleanDetermines if the enabled resume feature is enabled. This allows the individual to start the playing of the media file where they last left off. Defaults to true.
rockVideoTitlestringThe title of the media file. This will show as meta data when the file is in the player.
rockVideoSubtitlestringThe subtitle of the media file. This shows as meta data when the file is in the player.
rockVideoArtworkImageURLstringThe URL where the media file's artwork can be loaded. This will show as meta data when the file is in the player.
rockVideoDescriptionstringThe description of the media file. This will show as meta data when the file is in the player.
rockInteractionGuidstringThe GUID of the interaction that should be used to append to.
rockWatchMapstringThe existing watch map that, when provided, will be used to append to.
rockIsLiveboolIf true, the video should be treated as a livestream (and jump to live).

Play Audio

Plays the audio file using the provided configuration.

<Rock:ContentNode rockCommand="playAudio" 
    rockAudioUrl="https://church.com/demo.mp3" />
ParameterTypeDescription
rockAudioUrlstringThe URL to the video file to play. Should be MP3 file.
rockVideoMediaElementGuidintThe GUID of the Rock media file. This is only needed if the audio/video is a Rock Media Element. This will be used to track watches.
rockAudioRelatedEntityTypeIdintThe Entity Type ID that the media file is related to.
rockAudioRelatedEntityIdintThe Entity ID that the media file is related to.
rockAudioEnableResumebooleanDetermines if the enabled resume feature is enabled. This allows the individual to start the playing of the media file where they last left off.
rockAudioTitlestringThe title of the media file. This will show as meta data when the file is in the player.
rockAudioSubtitlestringThe subtitle of the media file. This shows as meta data when the file is in the player.
rockAudioArtworkImageURLstringThe URL where the media file's artwork can be loaded. This will show as meta data when the file is in the player.
rockAudioDescriptionstringThe description of the media file. This will show as meta data when the file is in the player.
rockInteractionGuidstringThe GUID of the interaction that should be used to append to.
rockWatchMapstringThe existing watch map that, when provided, will be used to append to.