Live play abstract class.
More...
Live play abstract class.
- Author
- baorunchen
- Date
- 2022/8/14
- Note
- Now can only support interactive mode
- Call Rule
- When used in the interactive mode, you need to push first; when streaming push callback 'onFirstFramePushed', then use playing.
- Call Example
AlivcLivePlayer livePlayer = new AlivcLivePlayerImpl(context, AlivcLiveMode.AlivcLiveInteractiveMode);
- See also
- com.alivc.live.player.AlivcLivePlayerImpl
-
com.alivc.live.annotations.AlivcLiveMode
-
AliLive Push SDK Doc
-
AliLive Push SDK Interactive Doc
-
AliLive Push SDK License Doc
Definition at line 27 of file AlivcLivePlayer.java.
com.alivc.live.player.AlivcLivePlayer.AlivcLivePlayer |
( |
Context |
context, |
|
|
AlivcLiveMode |
mode |
|
) |
| |
instance construct
- Parameters
-
context | android context |
mode | live mode |
Definition at line 37 of file AlivcLivePlayer.java.
abstract void com.alivc.live.player.AlivcLivePlayer.destroy |
( |
| ) |
|
|
abstract |
abstract AlivcLiveMode com.alivc.live.player.AlivcLivePlayer.getMode |
( |
| ) |
|
|
abstract |
abstract void com.alivc.live.player.AlivcLivePlayer.pauseAudioPlaying |
( |
| ) |
|
|
abstract |
pause audio playing
- Note
- This interface corresponds to the 'resumeAudioPlaying' interface
abstract void com.alivc.live.player.AlivcLivePlayer.pauseVideoPlaying |
( |
| ) |
|
|
abstract |
pause video playing
- Note
- This interface corresponds to the 'resumeVideoPlaying' interface
abstract void com.alivc.live.player.AlivcLivePlayer.resumeAudioPlaying |
( |
| ) |
|
|
abstract |
resume audio playing
- Note
- This interface corresponds to the 'pauseAudioPlaying' interface
abstract void com.alivc.live.player.AlivcLivePlayer.resumeVideoPlaying |
( |
| ) |
|
|
abstract |
resume video playing
- Note
- This interface corresponds to the 'pauseVideoPlaying' interface
abstract int com.alivc.live.player.AlivcLivePlayer.setPlayoutVolume |
( |
int |
volume | ) |
|
|
abstract |
set play volume
- Parameters
-
- Returns
- 0->success; others->failed
abstract int com.alivc.live.player.AlivcLivePlayer.setPlayView |
( |
FrameLayout |
frameLayout | ) |
|
|
abstract |
set play view
- Parameters
-
- Returns
- 0->success; others->failed
- Note
- In the interactive mode, the SurfaceView is created internally, and add it to the frameLayout.
-
This interface is used to set playback controls for remote streams in interactive scenarios (connected microphone or PK)
-
In the connected microphone scenario, the anchor sets the play view of the connected remote audience through this interface, and the connected remote audience sets the play view of the anchor through this interface too.
-
In the PK scenario, the anchor A sets the play view of the anchor B through this interface, and the anchor B sets the play view of the anchor A through this interface too.
abstract int com.alivc.live.player.AlivcLivePlayer.setupWithConfig |
( |
AlivcLivePlayConfig |
playConfig | ) |
|
|
abstract |
abstract int com.alivc.live.player.AlivcLivePlayer.startPlay |
( |
String |
url | ) |
|
|
abstract |
start play remote stream
- Parameters
-
url | anchor or connected audience pull url |
- Returns
- 0->success; others->failed
- Note
- This interface is used to play remote streams in interactive scenarios (connected microphone or PK)
-
In the connected microphone scenario, the anchor plays remote stream of the connected remote audience through this interface, and the connected remote audience plays remote stream of the anchor through this interface too.
-
In the PK scenario, the anchor A plays remote stream of the anchor B through this interface, and the anchor B plays remote stream of the anchor A through this interface too.
abstract int com.alivc.live.player.AlivcLivePlayer.stopPlay |
( |
| ) |
|
|
abstract |
stop play remote stream
- Returns
- 0->success; others->failed
- Note
- This interface corresponds to the 'startPlayWithURL' interface