Video seeking allows you to jump to any point in an audio or video file without affecting the playback experience.
Overview
In video on-demand (VOD) scenarios, when a user seeks to a specific position, the client sends a URL request to the server, such as http://www.aliyundoc.com/test-****.flv?start=10. The server responds with content starting from the keyframe that immediately precedes the requested position (the 10th byte in this example), unless the position corresponds to a keyframe.
Before you can use video seeking, you must enable range back-to-origin. If an HTTP request includes a Range header, your origin server must respond with a 206 Partial Content status code and the requested data.
The following table lists the supported file formats and URL formats.
|
File format |
Metadata |
Start parameter |
Example |
|
MP4 |
The metadata of the video on the origin server must be at the beginning of the file. Videos with metadata at the end are not supported. |
Specifies the time in seconds. The CDN seeks to the keyframe that immediately precedes the specified time, unless the |
The URL request |
|
FLV |
The video file on the origin server must contain metadata. |
Specifies the offset in bytes. The CDN seeks to the keyframe that immediately precedes the specified byte offset, unless the offset corresponds to the start of a keyframe. |
The URL request |
Procedure
-
Log in to the ApsaraVideo VOD console.
-
In the left-side navigation pane, under Configuration Management, click CDN Configuration > Domain Names.
-
Find the domain name that you want to configure and click Configure in the Actions column.
-
Click the Video Related tab and turn on the Drag/Drop Playback switch.