Data Structures | |
| protocol | <TXVodPreloadManagerDelegate> |
| class | TXVodPreloadManager |
| protocol TXVodPreloadManagerDelegate-p |
The callback for video predownloading.
Inheritance diagram for <TXVodPreloadManagerDelegate>:Instance Methods | |
| (void) | - onComplete:url: |
| (void) | - onError:url:error: |
|
optional |
The callback for download completion.
| taskID | The download task ID |
| url | The download task URL |
|
optional |
The callback for download error.
| taskID | The download task ID |
| url | The download task URL |
| error | The error message of the download failure |
| class TXVodPreloadManager |
Video predownloading. You can download part of the video content in advance without creating a player instance, so as to start playing back the video faster when using the player. This helps deliver a better playback experience.
Inheritance diagram for TXVodPreloadManager:Instance Methods | |
| (int) | - startPreload:preloadSize:preferredResolution:delegate: |
| (void) | - stopPreload: |
Class Methods | |
| (instancetype) | + sharedManager |
| + (instancetype) sharedManager |
This API is used to get the video predownloading singleton object.
| - (int) startPreload: | (NSString *) | requestURL | |
| preloadSize: | (int) | preloadSizeMB | |
| preferredResolution: | (long) | preferredResolution | |
| delegate: | (id< TXVodPreloadManagerDelegate >) | delegate | |
This API is used to start predownloading.
| requestURL | The predownload URL |
| preloadSizeMB | The size of the data to be predownloaded in MB |
| preferredResolution | The preferred resolution of long type. Sample value: TXVodPlayConfig.VIDEO_RESOLUTION_720X1280. If multi-resolution is not supported or not needed, pass in -1. |
| delegate/listener | The callback |
| - (void) stopPreload: | (int) | taskID |
This API is used to stop predownloading.
| taskID | The task ID, which is obtained from the returned value of TXVodPreloadManager#startPreload. |