浏览器接入(通信测试demo)

1、demo启动步骤

  1. 修改appKey(从已发布应用中获取发布链接参数) live-cat-0.3.0-demo-img1

  2. 打开player.html,启动

  3. 左边是发送消息到应用端,右边是接收应用的消息(按F12,可以打开控制台看到详细的发送状态) webrtc demo send pic

2、浏览器直接接入代码参考

<script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/react.production.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/react-dom.production.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/react-is.production.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/rxjs.umd.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/styled-components.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/base64.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/qs.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/ResizeObserver.min.js"></script>
        <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/ray-streaming/2.12.0/ray-streaming.min.js"></script>
    <script src="https://3dcat-cms-img.oss-cn-shenzhen.aliyuncs.com/script/live-cat/0.5.1/live-cat.min.js"></script>
<script>
  let Launcher = window.LiveCat.Launcher //公有化
  // let Launcher = window.LiveCat.LauncherPrivate //私有化
  let launcher = new Launcher({
    baseOptions:{
      appKey: 'xxxxxxxxxx', 
      address: 'https://app.3dcat.live',
      startType: 1
    }
  })
  window.launch = launcher
  document.querySelector('body').style.width = '100vw'
  document.querySelector('body').style.height = '100vh'
  launcher.automata(document.querySelector('body'))
</script>
业务咨询:400-8037-298