AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AVPSourceRefreshCallback> Protocol Reference

A protocol for handling playback source refresh results, which developers need to implement. More...

#include "AVPDelegate.h"

Inheritance diagram for <AVPSourceRefreshCallback>:

Instance Methods

(void) - onError:
 Called by the player when the refresh operation fails.
(void) - onSuccess:
 Called by the player when the refresh operation succeeds.

Detailed Description

A protocol for handling playback source refresh results, which developers need to implement.

This protocol notifies developers when the player requests playback source refresh, such as when a resource has expired or needs updating. The methods in this protocol are called to provide the refresh results to the developer, including success or failure.

Note
This protocol applies to URL source, VidAuth source, and similar scenarios requiring refresh logic.

Method Documentation

◆ onError:

- (void) onError: (NSString *) errorMsg

Called by the player when the refresh operation fails.

Parameters
errorMsgA string describing the reason for the failure.

This method indicates that the refresh operation has failed. Developers can use errorMsg to capture failure details and handle subsequent processing accordingly.

◆ onSuccess:

- (void) onSuccess: (id) newSource

Called by the player when the refresh operation succeeds.

Parameters
newSourceThe new playback source object containing the updated information.

This method indicates that the refresh operation has been successfully completed. Developers need to pass the updated newSource back to the player so that it can load the latest resource.


The documentation for this protocol was generated from the following file: