All Products
Search
Document Center

Basic concepts

Last Updated: Sep 17, 2019

Concepts

  1. playAuth: the unique credential for video playback. Each playback credential is bound to a user ID. Playback credentials cannot be exchanged among different users. Otherwise, videos cannot be played normally. By default, a playback credential has a limited validity period of 100 seconds. For more information, see Obtain the playAuth.

  2. RAM and STS: permission management systems provided by Alibaba Cloud.
    Resource Access Management (RAM) is used to control account permissions. RAM enables you to create RAM users within the permissions of your Alibaba Cloud account. Different RAM users can be granted different permissions.
    Security Token Service (STS) is a security token management system that grants temporary access permissions. STS can be used to grant access permissions to temporary accounts. For more information, see STS.

  3. On-demand AccessKey ID, AccessKey secret, and security token: obtained by using the STS API or ApsaraVideo for VOD SDKs after RAM authorization is enabled. They are used to make playback and download requests. For more information, see SDK Reference - STS.

  4. Hotlinking protection: ApsaraVideo for VOD checks the referer in the request header to determine whether a request is originated from the local site and whether the video can be played. You can set the referer in the ApsaraVideo for VOD or CDN console. For more information, see Hotlinking protection.

  5. Live streaming time shifting: Time-shift live streaming is based on regular HLS video streaming. A live stream is divided into TS fragments, which are distributed to playback users by using the HLS protocol. A user-requested M3U8 playback file contains a TS fragment address that is refreshed constantly. For regular HLS live streaming, TS fragment addresses and corresponding TS files are not stored persistently, causing a failure to trace previous live streaming video content. For HLS streaming with the time shifting feature activated, TS fragment addresses and corresponding TS files are respectively stored in a database and OSS persistently for up to 15 days. This makes it possible to trace the video content from the live streaming start time to the current time. For more information, see Time shifting. When you enable the time shifting for a player, you need to set isLive to true and the liveTimeShiftUrl attribute.

  6. Immersive mode: When a video is played in a web browser (for example, WeChat) on an Android mobile phone, the video is played in full-screen mode. The web browser hijacks the video tag to use the default player to play the video. In this case, the Dom element is overwritten. No effective solution is available. However, web browsers with the X5 kernel (such as the Tencent browser or WeChat) provide some attributes to enable the immersive mode. This avoids video playback hijacking and Dom element overwriting. However, an X5-kernel web browser displays a pop-up playback screen in overwrite mode, with the Exit and Share buttons in the upper part and a black edge in the lower part. The layout may be slightly different from the original screen. You need to subscribe to the x5requestFullScreen and x5cancelFullScreen events for layout tuning. For more information, see Immersive mode in WeChat.

Procedure

STS-based playback procedure

The STS-based playback procedure is as follows: 1. A user application requests an STS token. 2. The AppServer delivers an STS token. 3. The user uploads a video and obtains a video ID. 4. The AppServer obtains the STS token. 5. The AppServer delivers the STS token to the client. 6. The video is played.

Note: The AppServer is the user application server. You need to use the server API or SDK to develop your own server-side applications.

playAuth-based playback procedure

The playAuth-based playback procedure is as follows: 1. A user application requests an upload token. 2. The AppServer delivers an upload token. 3. The user uploads a video and obtains a video ID. 4. The AppServer obtains the playback credential. 5. The AppServer delivers the playback credential to the client. 6. The video is played.

Note: The AppServer is the user application server. You need to use the server API or SDK to develop your own server-side applications.