0

我正在尝试将 Zoom SDK for Angular 用于我的 PWA 应用程序,但是当我在移动浏览器或移动模式下(chrome 或 safari 上的调试模式)打开应用程序时,它不支持加入音频并且不支持支持响应模式。

在普通浏览器上工作正常!

这是我的代码:

import {Component, OnInit, Inject} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {DOCUMENT} from '@angular/common';

import {ZoomMtg} from '@zoomus/websdk';
import {ActivatedRoute} from '@angular/router';

ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

@Component({
  selector: 'app-education-meeting',
  templateUrl: './education-meeting.component.html',
  styleUrls: ['./education-meeting.component.css']
})
export class EducationMeetingComponent implements OnInit {
  signatureEndpoint = 'http://7b4be2d6a655.ngrok.io'
  apiKey = 'MY KEY'
  meetingNumber = 12345211
  role = 0
  leaveUrl = 'http://localhost:4200/login'
  userName = 'MY USER'
  userEmail = 'mailblblbl@gmail.com'
  passWord = '455331'

  constructor(public httpClient: HttpClient, @Inject(DOCUMENT) document, private route: ActivatedRoute) {

  }

  ngOnInit() {
    this.route.params.subscribe(params => {
      this.meetingNumber = +params['meetingId'];
      this.passWord = params['password'];
      // this.getSignature();
    });
  }

  getSignature() {
    this.httpClient.post(this.signatureEndpoint, {
      meetingNumber: this.meetingNumber,
      role: this.role
    }).toPromise().then((data: any) => {
      if (data.signature) {
        this.startMeeting(data.signature)
      } else {
      }
    }).catch((error) => {
      console.log(error)
    })
  }

  startMeeting(signature) {
    document.getElementById('zmmtg-root').style.display = '-webkit-inline-box'

    ZoomMtg.init({
      leaveUrl: this.leaveUrl,
      disableInvite: true,
      showMeetingHeader: false,
      // disableCallOut: true,
      disableRecord: false,
      // disableJoinAudio: false,
      // isSupportAV: false,
      videoDrag: false,
      isSupportNonverbal: false,
      isSupportChat: false,
      isSupportQA: false,
      isSupportCC: false,
      sharingMode: 'fit',
      isLockBottom: false,
      audioPanelAlwaysOpen: true,
      meetingInfo: [],
      // disableVoIP: true, // optional
      disableReport: true, // optional
      screenShare: false,
      success: (success) => {
        ZoomMtg.join({
          signature: signature,
          meetingNumber: this.meetingNumber,
          userName: this.userName,
          apiKey: this.apiKey,
          userEmail: this.userEmail,
          passWord: this.passWord,
          success: (success) => {
            console.log(success)
          },
          error: (error) => {
            console.log(error)
          }
        })

      },
      error: (error) => {
        console.log(error)
      }
    })
  }

}

有人找到解决方法了吗?

另外,我想知道有没有什么办法可以去掉验证码?

4

1 回答 1

0

在我写这篇文章的时候,他们当前的 WebSdk 版本是 1.7.7。在这个版本中,连接到音频和其他一些在 IOS 上不起作用的功能。请参考这张取自https://marketplace.zoom.us/docs/sdk/sdk-reference/web-reference的图片

在此处输入图像描述

于 2020-11-29T12:55:51.557 回答