finesdk
v0.0.34
Published
云播观众端sdk
Downloads
9
Readme
FineSdk
引入sdk
import {
init,
Events
useChat,
useUser,
useDoc,
useRtc,
usePraise,
useVote,
useAnswer,
useGoods,
useNotice,
useRollcall,
useGift,
useLottory
} from 'finesdk'
核心
const sdk = init({
appId: '',
webcastId: '',
nickName: ''
})
// 直播信息加载完成
sdk.on(Events.INIT, () => {
// 直播间标题
console.log(sdk.title)
})
聊天
const chat = useChat(sdk)
用户
const user = useUser(sdk)
连麦
import 'web-263-finesdk'
const rtc = useRtc(sdk)
共享文档/白板
const doc = useDoc(sdk)
公告
const notice = useNotice(sdk)
点赞
const praise = usePraise(sdk)
签到
const rollcall = useRollcall(sdk)
问卷
const vote = useVote(sdk)
抽奖
const lottory = useLottory(sdk)
商品
const goods = useGoods(sdk)
礼物
const gift = useGift(sdk)
答题
const answer = useAnswer(sdk)