3

I am trying to implement Client View for Zoom Web SDK. I am using Flask as backend. Here is my code:

<html>
<body>
</body>
<script src="https://source.zoom.us/2.9.7/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/2.9.7/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/2.9.7/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/2.9.7/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/2.9.7/lib/vendor/lodash.min.js"></script>

<!-- CDN for client view -->
<script src="https://source.zoom.us/zoom-meeting-2.9.7.min.js"></script>

<head>
  <link type="text/css" rel="stylesheet" href="https://source.zoom.us/2.9.5/css/bootstrap.css" />
  <link type="text/css" rel="stylesheet" href="https://source.zoom.us/2.9.5/css/react-select.css" />
</head>

<script>
ZoomMtg.setZoomJSLib('https://source.zoom.us/2.9.7/lib', '/av')
// loads dependent assets
ZoomMtg.preLoadWasm()
ZoomMtg.prepareWebSDK()
// loads language files, also passes any error messages to the ui
ZoomMtg.i18n.load('en-US')
ZoomMtg.i18n.reload('en-US')

const sdkKey = "xxxxxxx";
const userName = sessionStorage.getItem("N");
const meetingNumber = sessionStorage.getItem("ID");
const passWord = sessionStorage.getItem("Pass");
const leaveUrl = "http://localhost:5050/videolist";
console.log(meetingNumber)
console.log(passWord)

//const KJUR = require('jsrsasign')
// https://www.npmjs.com/package/jsrsasign

const signature = "{{ signature }}"
console.log(signature)
ZoomMtg.init({
  leaveUrl: leaveUrl, // https://example.com/thanks-for-joining
  success: (success) => {
    console.log('Success init')
    ZoomMtg.join({
      sdkKey: sdkKey,
      signature: signature, // role in SDK signature needs to be 0
      meetingNumber: meetingNumber,
      passWord: passWord,
      userName: userName,
      userEmail: "xxxxxx", //Actual Email ID was given
      success: (success) => {
        console.log('Success join')
        console.log(success)
      },
      error: (error) => {
        console.log("A" + error + " B " + error.message)
        console.log(sdkKey)
        console.log(signature)
        console.log(meetingNumber)
        console.log(passWord)
        console.log(userName)
        
      }
    })
  },
  error: (error) => {
    console.log(error)
  }
})
</script>

<!--
<script src="{{ url_for('static', filename='script/meeting.js') }}" type="module"></script>
-->
</html>

The init part is working fine, but when I am pressing the Join button, it shows

Joining Meeting Timeout. Fail to join the meeting

This is my code for Flask

@app.route('/meeting/<IDP>', methods=['GET'])
def meet(IDP):
    ID = IDP[:IDP.index(' ')]
    payload = {'sdkKey': SDK_KEY, "meetingNumber": ID, "role": 0, "user": IDP[IDP.index(' ')+1:], "iat": time.strftime("%d %b %y %H:%M:%S",time.gmtime())}
    encoded = jwt.encode({"some": payload}, SECRET, algorithm="HS256")
    return render_template('meeting.html', signature = encoded)

Console Message

I have also turned off waiting room in my meeting. Also, as you can see in the console, the data is reflecting accurately.

George
  • 255
  • 8

0 Answers0