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

  1. Log on to the Alibaba Cloud CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the target domain name and click Manage.
  4. In the left-side navigation pane of the specified domain, click Video.
  5. In the Audio/video Preview section, turn on the Audio/video Preview switch.
  6. On the right side of Custom Preview Parameter, click Modify.
  7. 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.
  8. Click OK.