DevEco Studio 5.1.1 Release
Build #DS-233.14475.28.36.511830
Build Version: 5.1.1.830, built on August 4, 2025
Runtime version: 17.0.12+1-b1087.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 32
Registry:
idea.plugins.compatible.build=IC-233.14475.28





{
"name": "watchkit",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@vhall/vhall_live": "1.2.0",//SDK基础+观看模块
"@vhall/vhall_rtc": "1.2.0",//互动连麦
"@vhall/vhall_pusher": "1.2.0",//直播推流
"@vhall/vhall_beauty": "1.2.0",//美颜
"@ohos/danmakuflamemaster": "2.0.1",
"@esky/barrage": "1.0.6"
}
}{
"module": {
"name": "watchKit",
"type": "har",
"requestPermissions": [
{"name": "ohos.permission.INTERNET"},
{
"name": "ohos.permission.READ_MEDIA",
"usedScene": {
"abilities": [
"EntryAbility"
],
"when": "inuse"
},
"reason":"$string:read_media"
},
{
"name": "ohos.permission.WRITE_MEDIA",
"usedScene": {
"abilities": [
"EntryAbility"
],
"when": "inuse"
},
"reason":"$string:write_media"
},
{
"name": "ohos.permission.WRITE_IMAGEVIDEO",
"usedScene": {
"abilities": [
"EntryAbility"
],
"when": "inuse"
},
"reason":"$string:write_imagevideo"
},
],
"deviceTypes": [
"default"
],
"routerMap": "$profile:route_map"
}
}
//导入包
import { VHSaaSDK, VHCallBack } from '@vhall/vhall_live'
@Entry
@Component
struct Index {
aboutToAppear(): void {
//获取SDK版本号
VHSaaSDK.getInstance().getVersion();
}
build() {
Navigation(this.pathStack) {
}
.hideToolBar(true)
.hideTitleBar(true)
.width('100%')
.height('100%')
.mode(NavigationMode.Stack)
.id('Login')
}
}主要通过示例展示进入直播前用户需要进行初始化、活动配置信息获取、直播前状态处理。
