2단계 Shoplive Player 실행하기
- Print
2단계 Shoplive Player 실행하기
- Print
The content is currently unavailable in English. You are viewing the default Korean version.
Article summary
Did you find this summary helpful?
Thank you for your feedback!
라이브 실행하기
준비된 Access Key와 Campaign Key를 사용해 Shoplive Flutter SDK 를 초기화하고 플레이어를 실행합니다.
import 'package:shoplive_player/shoplive_common.dart';
final _shopLiveCommon = ShopLiveCommon();
_shopLiveCommon.setAccessKey(accessKey: "{AccessKey}");캠페인(방송) 키를 사용하여, 방송을 재생할 수 있습니다.

import 'package:shoplive_player/shoplive_player.dart';
final _player = ShopLivePlayer();
_player.play(data: ShopLivePlayerData(campaignKey: "CampaignKey"));ShopLivePlayerData
Property name | Type | Description |
|---|---|---|
campaignKey | String | 재생할 동영상의 캠페인(방송) 키 (필수) |
keepWindowStateOnPlayExecuted | Boolean | 재생 중인 플레이어의 실행 모드(pip, fullscreen)을 유지한 상태로 재생을 시작할 지 여부. 기본값(false)
|
referrer | String? | 진입경로 통계를 측정할 수 있는 파라미터 |
ShopLiveCommonUser
Property name | Type | Description |
|---|---|---|
userId | String | 서비스에서 사용하는 사용자 고유 ID (필수) |
userName | String? | 채팅/플레이어 UI에 표시되는 이름 |
age | int? | 사용자 나이 |
gender | ShopLiveCommonUserGender? | 사용자 성별 (MALE, FEMALE, NEUTRAL) |
userScore | int? | 사용자 등급 |
custom | Map<String, dynamic>? | 사용자 임의 데이터 |
적용 가이드 : 간편 인증된 사용자로 채팅하기
라이브 종료하기
void close()를 통해 라이브 상세화면을 종료합니다.
late final _player = ShopLivePlayer();
_player.close();