Alibaba Cloud Content Delivery Network (CDN) provides the audio or video preview feature.
This topic describes how to configure this feature.
Background information
The audio or video preview feature allows a CDN node to return audio or video files
of a specific length of time to clients.
This feature supports TS and MP3 files. If you want to allow users to preview FLV
or MP4 files, enable the video seeking feature and set the end
parameter. For more information, see Video seeking.
Procedure
- 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 the Audio/video Preview switch.
- On the right side of Custom Preview Parameter, click Modify.
- Enter a parameter name in the Custom Preview Parameter field.
Clients send requests that specify the length of time in seconds. For example, if
Custom Preview Parameter is set to free_time and the field free_time=15 is included in a client request, Alibaba
Cloud CDN returns 15 seconds of the requested file to the client.
Note The value of the Custom Preview Parameter parameter may not be accurate as expected. We recommend that you advise your users
to specify a time period that is slightly longer than the expected one. For example,
if a user requires to preview 13 seconds of an audio or video file, they can set the
time period to 15 seconds in the request.
- Click OK.