Alibaba Cloud CDN provides the preview feature. After you set the preview duration, non-registered users can only watch a video clip for preview instead of the whole video. This topic describes the functionality and specific console operations of this feature.
The audio/video preview feature allows a CDN node to only return audio/video files of a specific length to the client.
Only FLV, MP4, and TS files support the preview feature.
- Log on to the Alibaba Cloud CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the target domain name and click Manage.
- In the left-side navigation pane of the specified domain, click Video.
- In the Audio/video Preview section, turn on Audio/video Preview.
- Enter a parameter name in the Custom Preview Parameter field.
This parameter is used to specify the length of the file to be returned in seconds. For example, if the parameter is set to free_time, the request from a client will include the "free_time=15" field, which indicates that the CDN node only needs to return the first 15 seconds of an audio or video file.Note The actual effective length may not be exactly the same as the length that you have set on your client. We recommend that you set a value slightly larger than the expected length. For example, if a 13-second preview is expected on the client, you can set the preview duration to 15 seconds.