Video seeking enables you to jump to a specific position during audio or video playback without affecting playback quality. This topic describes how to configure video seeking.
Feature description
When you seek during playback in a video-on-demand (VOD) scenario, the client sends a URL request to the server, such as http://www.aliyundoc.com/test-****.flv?start=10. The server then responds with data that starts from a keyframe. If the requested position is not a keyframe, the server uses the keyframe that immediately precedes that position.
Before you configure video seeking, you must enable range origin fetch. For more information, see range origin fetch. If an HTTP request header contains the `Range` field, the origin server must return an HTTP 206 Partial Content response.
The following table lists the supported file formats and URL formats for video seeking.
File format | Metadata | Start parameter | Example |
MP4 | The metadata of the source video must be in the file header. Videos with metadata in the file tail are not supported. | The `start` parameter specifies the time in seconds (s). If the specified time is not a keyframe, Alibaba Cloud CDN automatically seeks to the preceding keyframe. The parameter supports decimals. For example, `start=1.01` means playback starts at 1.01 seconds. | The URL request |
FLV | The source video must contain metadata. | The `start` parameter specifies the position in bytes. If the specified byte is not at a keyframe, Alibaba Cloud CDN automatically seeks to the preceding keyframe. | The URL request |
Procedure
Log on to the ApsaraVideo VOD console.
In the navigation pane on the left, under Configuration Management, click CDN Configuration > Domain Names.
Find the domain name that you want to configure and click Configure.
Click the Video Related tab and turn on Drag/Drop Playback.
