• 서비스
  • 가격
  • 리소스
  • 기술지원
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

LiveCoreWidget

Introduction

LiveCoreView provides view container for live streaming push and playback, supporting multi-person co-guest, PK and other features.
Through this component, video rendering and interaction in live rooms can be implemented.
Important:
Before using, you need to call setLiveID to set the live room ID first.

Features

Video Rendering:Provides view container for live streaming push and playback
Co-guest Support:Supports multi-person co-guest feature
PK Support:Supports anchor PK feature
Preview Outside Room:Supports previewing live stream before entering the room

Data Structures

CoreViewType

Core view type.
Enum Value
Description
playView
Play view.
pushView
Push view.

ViewLayer

View layer.
Enum Value
Description
foreground
Foreground layer.
background
Background layer.

LiveCoreController

Live core widget controller protocol
Methods
create: Create LiveCoreController
static LiveCoreController create(CoreViewType type) {
return LiveCoreControllerImpl(type);
}
Parameter
Type
Description
type
Core view type.
setLiveID: Set live ID. Should set live ID before using other interfaces.
void setLiveID(String liveID);
Parameter
Type
Description
liveID
String
Live ID.
startPreviewLiveStream: Preview outside room.
void startPreviewLiveStream(String roomID, bool isMuteAudio, int viewID, TUIPlayCallback? playCallback);
Parameter
Type
Description
roomID
String
Live ID.
isMuteAudio
bool
Whether to mute audio.
playCallback
TUIPlayCallback?
Play callback.
stopPreviewLiveStream: Stop preview outside room.
void stopPreviewLiveStream(String roomID);
Parameter
Type
Description
roomID
String
Live ID.
callExperimentalAPI: Call experimental API
static void callExperimentalAPI(String jsonStr) {
LiveCoreControllerImpl.callExperimentalAPI(jsonStr);
}

VideoViewAdapter

Video view adapter protocol
Methods
createCoGuestView: Create co-guest view.
CoGuestWidgetBuilder coGuestWidgetBuilder = (BuildContext context, SeatInfo seatInfo, ViewLayer viewPlayer) {
return Container();
};
Parameter
Type
Description
seatInfo
Co-guest user seat information.
viewLayer
View layer, foreground or background.
createCoHostView: Create cross-room co-host view.
CoHostWidgetBuilder coHostWidgetBuilder = (BuildContext context, SeatInfo seatInfo, ViewLayer viewPlayer) {
return Container();
};
Parameter
Type
Description
seatInfo
Cross-room co-host user seat information.
viewLayer
View layer, foreground or background.
createBattleView: Create PK view.
BattleWidgetBuilder battleWidgetBuilder = (BuildContext context, SeatInfo seatInfo) {
return Container();
};
Parameter
Type
Description
seatInfo
PK user seat information.
createBattleContainerView: Create PK container view.
BattleContainerWidgetBuilder battleContainerWidgetBuilder = (BuildContext context) {
return Container();
};

VideoWidgetBuilder({
CoGuestWidgetBuilder? coGuestWidgetBuilder,
CoHostWidgetBuilder? coHostWidgetBuilder,
BattleWidgetBuilder? battleWidgetBuilder,
BattleContainerWidgetBuilder? battleContainerWidgetBuilder,
}) {
if (coGuestWidgetBuilder != null) this.coGuestWidgetBuilder = coGuestWidgetBuilder;
if (coHostWidgetBuilder != null) this.coHostWidgetBuilder = coHostWidgetBuilder;
if (battleWidgetBuilder != null) this.battleWidgetBuilder = battleWidgetBuilder;
if (battleContainerWidgetBuilder != null) this.battleContainerWidgetBuilder = battleContainerWidgetBuilder;
}