本文介绍了如何将 Jitsi Meet 添加到 Vuejs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的 public.html 的正文中加载了 jitsi meet 脚本,我有一个组件如下:

<div class="container"><div id=满足"></div>

</模板><脚本>导出默认{名称:ServiceMeet",安装(){const domain =meet.jit.si";常量选项 = {房间名称:在这里选择合适的会议名称",宽度:700,高度:700,parentNode: document.querySelector("#meet"),};const api = new JitsiMeetExternalAPI(domain, options);console.log(api.getVideoQuality());},};

当我尝试运行时,我收到一个错误消息,说 18:21 error 'JitsiMeetExternalAPI' is not defined no-undef,但是在后台我可以看到会议工作正常,所以我我是修复错误还是忽略它.

解决方案

您可以禁用 linting 错误,但我建议将其指定为 全局变量.

.eslintrc.js

module.exports = {全局变量:{JitsiMeetExternalAPI:true}}

I have loaded the jitsi meet script in the body of my public.html, and i have a component as follows:

<template>
  <div class="container">
    <div id="meet"></div>
  </div>
</template>

<script>
export default {
  name: "ServiceMeet",
  mounted() {
    const domain = "meet.jit.si";
    const options = {
      roomName: "PickAnAppropriateMeetingNameHere",
      width: 700,
      height: 700,
      parentNode: document.querySelector("#meet"),
    };
    const api = new JitsiMeetExternalAPI(domain, options);
    console.log(api.getVideoQuality());
  },
};
</script>

When I try to run I get an error saying 18:21 error 'JitsiMeetExternalAPI' is not defined no-undef, however in the background i can see that the meet is working fine, so I do I fix the error or dismiss it.

解决方案

You could disable the linting error, but I would recommend specifying it as a global variable instead.

.eslintrc.js

module.exports = {
  globals: {
    JitsiMeetExternalAPI: true
  }
}

这篇关于如何将 Jitsi Meet 添加到 Vuejs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 16:44