簡體   English   中英

Big Bule Button 的集成

[英]integration of Big Bule Button

我得到低於錯誤。 有人可以幫忙解決這個問題。 我正在嘗試在 nodejs 中集成藍色大按鈕,但它拋出了一個錯誤。 有人可以為我提供任何參考鏈接以在 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.

你必須抓住錯誤。 你能試試這個嗎:

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