V2TXLivePlayerObserver
to receive callbacks of V2TXLivePlayer including player status, playback volume, first audio/video frame, statistics, warning and error messages, etc.public void onError(V2TXLivePlayer player, int code, String msg, Bundle extraInfo)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
code | int | Error code |
msg | String | Error message |
extraInfo | Bundle | Extra information |
public void onWarning(V2TXLivePlayer player, int code, String msg, Bundle extraInfo)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
code | int | Warning code |
msg | String | Warning message |
extraInfo | Bundle | Extra information |
public void onConnected(V2TXLivePlayer player, Bundle extraInfo)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
extraInfo | Bundle | Extra information |
public void onVideoResolutionChanged(V2TXLivePlayer player, int width, int height)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
width | int | Video width |
height | int | Video height |
public void onVideoLoading(V2TXLivePlayer player, Bundle extraInfo)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
extraInfo | Bundle | Extra information |
public void onVideoPlaying(V2TXLivePlayer player, boolean firstPlay, Bundle extraInfo)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
firstPlay | boolean | Whether it is the first playback |
extraInfo | Bundle | Extra information |
public void onSnapshotComplete(V2TXLivePlayer player, Bitmap image)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
image | Bitmap * | The video image captured |
[V2TXLivePlayer enableCustomRendering:pixelFormat:bufferType:]
to enable custom video rendering.public void onRenderVideoFrame(V2TXLivePlayer player, V2TXLiveVideoFrame videoFrame)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
videoFrame | V2TXLiveVideoFrame | Video frame |
public void onAudioLoading(V2TXLivePlayer player, Bundle extraInfo)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
extraInfo | Bundle | Extra information |
public void onAudioPlaying(V2TXLivePlayer player, boolean firstPlay, Bundle extraInfo)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
firstPlay | boolean | Whether it is the first playback |
extraInfo | Bundle | Extra information |
public void onPlayoutVolumeUpdate(V2TXLivePlayer player, int volume)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
volume | int | Volume. Value range: 0-100 |
public void onStatisticsUpdate(V2TXLivePlayer player, V2TXLivePlayerStatistics statistics)
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
statistics | V2TXLivePlayerStatistics | Player statistics |
Was this page helpful?