Media playback

Updated at:

This topic provides examples on how to use the API operations of the media playback module. The API operations used in this topic are encapsulated in ApsaraVideo server operation SDK for Python. You can call the API operations to query playback URLs and playback credentials.

Usage notes

Initialize the client

Before you can use the SDK, initialize a client. For more information, see Initialization.

Obtain a playback URL

You can call the GetPlayInfo operation to obtain a playback URL.

For more information, visit GetPlayInfo

After you obtain the playback URL, you can use the playback URL to play the video in a client. For more information, see Use playback URLs to play videos.

Obtain a playback credential

You can call the GetVideoPlayAuth operation to obtain a playback credential.

After you obtain the playback credential, you can use the playback credential to play the video in a client. For more information, see Use playback credentials to play videos.