metadigiee-api
TypeScript icon, indicating that this package has built-in type declarations

5.0.2-3 • Public • Published

MetadigieeApi

版本说明:
a.b.c-x
a.b.c需要对应相应底座版本 x为热修复版本

Quick Start

页面中

<!-- RoadMAP 需要全局唯一的标签 -->
<div id="metadigiee-video-player"></div>

js 部分 适用于 webpack/vite umd 包

import MetadigieeApi from 'metadigiee-api'
const { Service } = MetadigieeApi
async function openService() {
  let openService = document.getElementById('openService')
  /**
   * 需要开放的端口:
   *        底座服务      tcp: 22222/22223  分别对应 http/ws  https/wss
   *        webrtc服务    udp: 50000~65535
   *  */
  const params = { host: '底座服务器IP地址', port: 22222, scene: '场景名称' }
  try {
    if (openService.checked) {
      let res = await Service.openService(params)
      console.log('=> openService(): ', JSON.stringify(res))
    } else {
      await Service.closeService(params)
    }
  } catch (error) {
    console.log(error)
  }
}

/**
 * todo 其余api调用
 *
 *
 * 特殊说明
 *
 * 所有api均需要等待上一次调用完成,请使用 async await 的方式进行开发
 *
 * */

Vite-VUE3 Demo

Package Sidebar

Install

npm i metadigiee-api

Weekly Downloads

159

Version

5.0.2-3

License

BSD

Unpacked Size

6.53 MB

Total Files

105

Last publish

Collaborators

  • txzh007