《爱奥尼亚



如何在Ionic中使用jitsi?我尝试过以下代码在Ionic中集成jitsi,但在我构建Android应用程序时,它给了我以下错误。此外,我曾尝试使用电容器jitsi meet,但未能成功。

import { Component, ElementRef, OnInit, ViewChild } from "@angular/core";
import { Plugins } from '@capacitor/core';
import 'capacitor-jitsi-meet';
const { Jitsi } = Plugins;


@Component({
selector: "app-jitsi-poc",
templateUrl: "./jitsi-poc.page.html",
styleUrls: ["./jitsi-poc.page.scss"],
})
export class JitsiPocPage implements OnInit {
@ViewChild("videoConatiner") videoContainer: ElementRef;
jitsi: any;
options = {
roomName: "my room ",
configOverwrite: { startWithAudioMuted: true },
interfaceConfigOverwrite: {
SHOW_CHROME_EXTENSION_BANNER: false,
SHOW_DEEP_LINKING_IMAGE: false,
SHOW_JITSI_WATERMARK: false,
SHOW_POWERED_BY: false,
SHOW_PROMOTIONAL_CLOSE_PAGE: false,
SHOW_BRAND_WATERMARK: false,
JITSI_WATERMARK_LINK: "",
SHOW_WATERMARK_FOR_GUESTS: false,
},
};

constructor() { }

ngOnInit() { }

startMeeting() {
this.options["parentNode"] = document.querySelector("#meet");
// Setting parentNode option on init after the DOM has rendered
this.jitsi = new (window as any).JitsiMeetExternalAPI("meet.jit.si", {
...this.options,
}); // Jitsi running in local docker container
}

}

错误

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find org.jitsi.react:jitsi-meet-sdk:3.5.0.
Searched in the following locations:

您是否按照说明安装了电容器?https://capacitorjs.com/docs/getting-started

接下来,我注意到您试图激活Jitsi web实现,这对本机应用程序实现不起作用。在Android应用程序上启动jitsi调用的正确方法是通过电容器jitsi-meet插件,该插件使用以下语法调用:

// On Capacitor 3
import { Jitsi } from 'capacitor-jitsi-meet';
// On Capacitor 1 and 2
import { Plugins } from '@capacitor/core';
import 'capacitor-jitsi-meet';
const { Jitsi } = Plugins;
const result = await Jitsi.joinConference({
roomName: 'room1', // room identifier for the conference
url: 'https://meet.jit.si' // endpoint of the Jitsi Meet video bridge
});

有关完整的安装说明,请参阅自述文件:https://github.com/calvinckho/capacitor-jitsi-meet

相关内容

  • 没有找到相关文章

最新更新