标签显示未注册
Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
<template>
<view class="content">
<view class="contentXiao">
<zego-local-view></zego-local-view>
<button class="btna" @click="go()">开始</button>
<view class="contentXiaoNei">
</view>
<button class="btn">1</button>
</view>
</view>
</template>
<script>
// 导入
import ZegoExpressEngine from '@/components/zego-ZegoExpressUniApp-JS/lib/ZegoExpressEngine';
export default {
data() {
return {
title: 'Hello',
}
},
onLoad() {
},
methods: {
// 登录
go() {
// 采用通用场景
const profile = {
appID: 571429559,
appSign: '89a0fe01f268891b35e8fea3be39a9f8d3e8931c3391a862b4e8f28ad6f5ee0f',
scenario: 0
};
ZegoExpressEngine.createEngineWithProfile(profile)
// ---------------------------------------------------------------------------------------------------------
let roomConfig = {};
//token 由用户自己的服务端生成,为了更快跑通流程,也可以通过即构控制台获取临时的音视频 token
roomConfig.token =
"04AAAAAGOruVYAEG9yem9heXQ5a2diNmozZmMAsAGVzoeWLVGAbq5rxOhqtIeRA/yQBs94aXqvVjPB97iz09ihcJCknmM8OZarcX5zvcWPIDFiqGXvbHLZj8B3YSaUbU1RZEmv+fM9fF36ba35tpJuSdTAU3gT5uWnMWqNKOyrk4RBtLZNiBgBcydaN2844wOPKpB/56QN/Vai+tbd+4Dp6xcwnErNVJd7EHbbnYZagg9NTQbGo+lXpqPSZfrImcpbEJ93xgevYU/Kcg5Y";
// 只有传入 “isUserStatusNotify” 参数取值为 “true” 的 ZegoRoomConfig,才能收到 onRoomUserUpdate 回调。
roomConfig.isUserStatusNotify = true;
// 登录房间
// 开始登录房间
ZegoExpressEngine.instance().loginRoom('room1', {
'userID': '123456',
'userName': 'admin123'
}, roomConfig);
/** 开始预览 */
ZegoExpressEngine.instance().startPreview();
/** 开始推流 */
ZegoExpressEngine.instance().startPublishingStream("456");
}
}
}
</script>
<style lang="scss">
.content {
width: 100vw;
height: 100vh;
.contentXiao {
width: 100%;
height: 100%;
background-color: #fff;
position: relative;
.btna {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: green;
text-align: center;
line-height: 100rpx;
color: #fff;
position: absolute;
top: 20rpx;
left: 0;
}
.contentXiaoNei {
width: 270rpx;
height: 410rpx;
background-color: #ccc;
position: absolute;
right: 0;
}
.btn {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: red;
text-align: center;
line-height: 100rpx;
color: #fff;
position: absolute;
bottom: 20rpx;
left: 50%;
transform: translate(-50%, 0);
}
}
}
</style>
Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
不知道如何引入这个标签
我想要达到的结果,如果你需要快速回答,请尝试 “付费悬赏”