zhyz-cloudrender-web
v3.9.14
Published
cloudRender
Downloads
24
Readme
Example Usage
<template>
<div id="player"></div>
</template>
<script>
import cloud from "zhyz-cloudrender-web/cloudRender.umd";
import { onMounted } from "vue";
export default {
name: "",
setup() {
let appli_id = "xxxx"; // 云渲染节点中的某个容器的ID
let myhostname = "xxx.xxx.x.xx"; // 云渲染节点的流媒体地址
let paasUrl = "http://xxxx:xxx/"; // paas服务对应地址
let protooPort = 'xxxx'; // 云渲染节点的流媒体端口没有为''
let username = 'zhangsan';
let password = 'zhangsan_password';
let ishttps = false; //是否为https
// 初始化云渲染实例
let Dandelion = new cloud(paasUrl,username,password,ishttps);
onMounted(() => {
// 在页面上显示场景
Dandelion.RtAPI("joinRoom", {
ele: document.querySelector("#player"), //指定的挂载三维场景的页面元素
myhostname,
appli_id,
protooPort
});
/**
* api调用示例
*/
Dandelion.RtAPI("getAllApp", res => {
// res包含所有需要的参数
})
return {};
})
}
}
</script>