简体   繁体   English

Big Bule Button 的集成

[英]integration of Big Bule Button

I am getting below error.我得到低于错误。 Can someone please help on this.有人可以帮忙解决这个问题。 I am trying to integrate big blue button in nodejs but it's throwing an error.我正在尝试在 nodejs 中集成蓝色大按钮,但它抛出了一个错误。 Can someone please provide me any reference links to integrate big blue button in angular/node.有人可以为我提供任何参考链接以在 angular/node.js 中集成蓝色大按钮吗?

const bbb = require('bigbluebutton-js')
// var http = require('http')

let api = bbb.api(
 `http://test-install.blindsidenetworks.com/bigbluebutton/api`, 
 '8cd8ef52e8e101574e400365b55e11a6'
)
let http = bbb.http

let meetingCreateUrl = api.administration.create('My Meeting', '1', {
  duration: 2,
  attendeePW: 'secret',
  moderatorPW: 'supersecret',
})
 
// http method should be used in order to make calls
http(meetingCreateUrl).then((result) => {
  console.log(result)
 
  let moderatorUrl = api.administration.join('moderator', '1', 'supersecret')
  let attendeeUrl = api.administration.join('attendee', '1', 'secret')
  console.log(`Moderator link: ${moderatorUrl}\nAttendee link: ${attendeeUrl}`)
 
  let meetingEndUrl = api.administration.end('1', 'supersecret')
  console.log(`End meeting link: ${meetingEndUrl}`)
})
(node:4590) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
    at createError (/Users/smrentachintala/Documents/node/bigBlueButton/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/smrentachintala/Documents/node/bigBlueButton/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/Users/smrentachintala/Documents/node/bigBlueButton/node_modules/axios/lib/adapters/http.js:236:11)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1143:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:4590) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:4590) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

you have to catch the error.你必须抓住错误。 can you please try this one :你能试试这个吗:

http(meetingCreateUrl).then((result) => {
  console.log(result)
 
  let moderatorUrl = api.administration.join('moderator', '1', 'supersecret')
  let attendeeUrl = api.administration.join('attendee', '1', 'secret')
  console.log(`Moderator link: ${moderatorUrl}\nAttendee link: ${attendeeUrl}`)
 
  let meetingEndUrl = api.administration.end('1', 'supersecret')
  console.log(`End meeting link: ${meetingEndUrl}`)
}).catch( error => {
   console.log(error.message);
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM