@@ -181,7 +181,7 @@ SuperPlayerModel model = SuperPlayerModel();
model.appId=1500005830;
model.videoId=newSuperPlayerVideoId();
model.videoId.fileId="8602268011437356984";
_controller.playWithModel(model);
_controller.playWithModelNeedLicence(model);
```
Find the target video file in [Media Assets](https://console.cloud.tencent.com/vod/media), and you can view the `FileId` below the filename.
...
...
@@ -192,7 +192,7 @@ Play back the video through the `FileId`, and the player will request the backen
### Step 8. Stop the playback[](id:step8)
**Remember to call the controller termination method** when stopping the playback, especially before the next call of `startPlay`. This can prevent memory leak and screen flashing issues, as well as ensure that playback is stopped when the page is exited.
**Remember to call the controller termination method** when stopping the playback, especially before the next call of `startVodPlay`. This can prevent memory leak and screen flashing issues, as well as ensure that playback is stopped when the page is exited.
```dart
@override
voiddispose(){
...
...
@@ -206,6 +206,10 @@ void dispose() {
#### Playing back video
**Notice**
Starting from version 10.7.0, the Licence needs to be set through {@link SuperPlayerPlugin#setGlobalLicense} before it can be played successfully, otherwise the playback will fail (black screen), and it can only be set once globally. Live Licence, UGC Licence, and Player Licence can all be used. If you have not obtained the above Licence, you can quickly apply for a beta Licence for free To play, the official licence needs to be [purchased](https://cloud.tencent.com/document/product/881/74588#.E8.B4.AD.E4.B9.B0.E5.B9.B6.E6.96 .B0.E5.BB.BA.E6.AD.A3.E5.BC.8F.E7.89.88-license).
**Description**
This API is used to start video playback.
...
...
@@ -213,7 +217,7 @@ This API is used to start video playback.
* PLAY_ACTION_AUTO_PLAY: The video will be automatically played back after `playWithModel` is called.
* PLAY_ACTION_MANUAL_PLAY: The video needs to be played back manually after `playWithModel` is called. The player doesn't load the video and only displays the thumbnail image, which consumes no video playback resources compared with `PLAY_ACTION_PRELOAD`.
* PLAY_ACTION_PRELOAD: The player will display the thumbnail image and won't start the video playback after `playWithModel` is called, but the video will be loaded. This can start the playback faster than `PLAY_ACTION_MANUAL_PLAY`.
* PLAY_ACTION_AUTO_PLAY: The video will be automatically played back after `playWithModelNeedLicence` is called.
* PLAY_ACTION_MANUAL_PLAY: The video needs to be played back manually after `playWithModelNeedLicence` is called. The player doesn't load the video and only displays the thumbnail image, which consumes no video playback resources compared with `PLAY_ACTION_PRELOAD`.
* PLAY_ACTION_PRELOAD: The player will display the thumbnail image and won't start the video playback after `playWithModelNeedLicence` is called, but the video will be loaded. This can start the playback faster than `PLAY_ACTION_MANUAL_PLAY`.
#### Pausing playback
...
...
@@ -529,7 +533,7 @@ model.title = "VOD";
SuperVodDataLoaderloader=SuperVodDataLoader();
// Values of the required parameters in `model` are directly assigned in `SuperVodDataLoader`
`TXVodPlayerController` will internally recognize the playback protocol automatically. You only need to pass in your playback URL to the `startPlay` function.
`TXVodPlayerController` will internally recognize the playback protocol automatically. You only need to pass in your playback URL to the `startVodPlay` function.
Find the target video file in [Media Assets](https://console.cloud.tencent.com/vod/media), and you can view the `FileId` below the filename.
...
...
@@ -206,7 +206,7 @@ Play back the video through the `FileId`, and the player will request the backen
</dx-tabs>
### Step 7. Stop the playback[](id:step7)
**Remember to call the controller termination method** when stopping the playback, especially before the next call of `startPlay`. This can prevent memory leak and screen flashing issues.
**Remember to call the controller termination method** when stopping the playback, especially before the next call of `startVodPlay`. This can prevent memory leak and screen flashing issues.
Starting from version 10.7.0, the Licence needs to be set through {@link SuperPlayerPlugin#setGlobalLicense} before it can be played successfully, otherwise the playback will fail (black screen), and it can only be set once globally. Live Licence, UGC Licence, and Player Licence can all be used. If you have not obtained the above Licence, you can quickly apply for a beta Licence for free To play, the official licence needs to be [purchased](https://cloud.tencent.com/document/product/881/74588#.E8.B4.AD.E4.B9.B0.E5.B9.B6.E6.96 .B0.E5.BB.BA.E6.AD.A3.E5.BC.8F.E7.89.88-license).
**Description**
This API is used to play back a video via URL.
...
...
@@ -239,7 +243,7 @@ This API is used to play back a video via URL.
**API**
```dart
_controller.startPlay(url);
_controller.startVodPlay(url);
```
**Parameter description**
...
...
@@ -250,6 +254,10 @@ _controller.startPlay(url);
#### Playing back via file ID
**Notice**
Starting from version 10.7.0, the Licence needs to be set through {@link SuperPlayerPlugin#setGlobalLicense} before it can be played successfully, otherwise the playback will fail (black screen), and it can only be set once globally. Live Licence, UGC Licence, and Player Licence can all be used. If you have not obtained the above Licence, you can quickly apply for a beta Licence for free To play, the official licence needs to be [purchased](https://cloud.tencent.com/document/product/881/74588#.E8.B4.AD.E4.B9.B0.E5.B9.B6.E6.96 .B0.E5.BB.BA.E6.AD.A3.E5.BC.8F.E7.89.88-license).
**Description**
This API is used to play back a video via `fileId`.
...
...
@@ -260,7 +268,7 @@ This API is used to play back a video via `fileId`.
TXPlayerAuthParamsparams=TXPlayerAuthParams();
params.appId=1252463788;
params.fileId="4564972819220421305";
_controller.startPlayWithParams(params);
_controller.startVodPlayWithParams(params);
```
**Parameter description**
...
...
@@ -320,7 +328,7 @@ _controller.stop();
**Description**
This API is used to set whether to automatically play back the video after calling `startPlay` to load the video URL.
This API is used to set whether to automatically play back the video after calling `startVodPlay` to load the video URL.
**API**
...
...
@@ -739,15 +747,15 @@ This is how seamless switch works in video playback. You can use `isAutoPlay` in
The time shifting feature allows you to return to any previous time point during a live stream and resume playback from that time point. It is highly suitable for scenarios in which there is no need for interaction but viewers may want to rewind and replay a video, such as sports and gaming events.
```dart
// Call `startPlay` first before setting time shifting
// Call `startLivePlay` first before setting time shifting
await_controller.prepareLiveSeek(domian,bizidNum);// The backend requests the live streaming start time
...
...
@@ -199,7 +199,7 @@ This feature doesn't need to be enabled in advance, but the live stream must be
The playback URL cannot be a general CDN URL and must carry a hotlink protection signature. For more information on how to calculate a signature, see [Hotlink Protection URL Calculation](https://cloud.tencent.com/document/product/267/32735).
-**ACC must be specified as the playback type**
When calling the `startPlay` playback function, you need to set `type` to **PLAY_TYPE_LIVE_RTMP_ACC**, and the SDK will use the RTMP-UDP protocol to directly pull the live stream.
When calling the `startLivePlay` playback function, you need to set `type` to **PLAY_TYPE_LIVE_RTMP_ACC**, and the SDK will use the RTMP-UDP protocol to directly pull the live stream.
-**It has a limit on the number of streams played back concurrently**
Currently, a maximum of 10 streams can be played back concurrently. Because the cost of low-latency lines is much greater than CDN lines, we encourage users to use this feature only in scenarios that actually require high interaction rather than using it for scenarios which do not require extremely low latency.
Starting from version 10.7.0, the Licence needs to be set through {@link SuperPlayerPlugin#setGlobalLicense} before it can be played successfully, otherwise the playback will fail (black screen), and it can only be set once globally. Live Licence, UGC Licence, and Player Licence can all be used. If you have not obtained the above Licence, you can quickly apply for a beta Licence for free To play, the official licence needs to be [purchased](https://cloud.tencent.com/document/product/881/74588#.E8.B4.AD.E4.B9.B0.E5.B9.B6.E6.96 .B0.E5.BB.BA.E6.AD.A3.E5.BC.8F.E7.89.88-license).
**Description**
This API is used to play back a video via URL.
...
...
@@ -233,7 +237,7 @@ This API is used to play back a video via URL.
**API**
```dart
_controller.startPlay(url);
_controller.startLivePlay(url);
```
**Parameter description**
...
...
@@ -288,7 +292,7 @@ _controller.stop();
**Description**
This API is used to set whether to automatically play back the video after calling `startPlay` to load the video URL.
This API is used to set whether to automatically play back the video after calling `startLivePlay` to load the video URL.