Creating a Preview URL
Create a preview URL in Media Streams and view your content asset in a browser.
The Safari browser can play the HLS natively. Other browsers require an extra plugin or supported application to preview the HLS format.
You can generate a Preview URL of the playlist asset from the Playlist Asset details page.
- Open the navigation menu and click Analytics & AI. Under Media Services, click Media Streams.
- On the Distribution Channels list page, select the compartment that contains the distribution channel for where you want to generate the preview URL.
- Click the name of the distribution channel from which you want to generate the Preview URL.
- On the Distribution Channel details page, under Resources, click Playlist Assets.
- In the Playlist Assets section, click the playlist asset for which you want to generate the preview URL.
- On the Playlist Asset details page, in the Preview URL section, select a packaging.
- Specify the session token expiration value between 10 minutes to 24 hours. The preview URL expires after the specified time period.
A preview URL is generated for the asset.
You can view the asset by playing it in a supported browser or application.
Creating a Preview URL directly using the CLI isn't possible. You must generate a session token using the CLI and generate the Preview URL manually, by using the token ID. The session token is required for authentication and is valid for 24 hours.
To generate a token, use the
oci media-services media-stream stream-distribution-channel generate-session-token [OPTIONS]
Required parameters for the
--endpointparameter must point to the domain of the desired distribution channel.
After the session token is created, follow these steps to Creating a Preview URL Manually.
To get all the commands for
oci media-services stream-distribution-channel -h
To get help for the
oci media-services media-stream stream-distribution-channel generate-session-token -h
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
- If you're unable to access the Console, you can manually create a Preview URL by using the following:
<DC_DOMAIN>is the domain from the GetStreamDistributionChannel operation.
<PKG_ID>is the OCID of the packaging configuration used for streaming.
<ASSET_ID>is the OCID of the asset to be streamed.
<TOKEN_DATA>is the token that the
View the asset by copying the preview URL and play it in a supported browser or application.