[plugin-sdk-navbar] - merged upstream

This commit is contained in:
GuiLeme 2023-09-25 20:03:13 -03:00
commit 13f0c170cb
132 changed files with 1045 additions and 501 deletions

View File

@ -252,7 +252,7 @@ jobs:
apt --purge -y remove apache2-bin
'
- name: Install BBB
timeout-minutes: 15
timeout-minutes: 25
run: |
sudo -i <<EOF
set -e
@ -325,16 +325,17 @@ jobs:
chmod a+r -R /home/runner/work/bigbluebutton/bigbluebutton/configs
bbb-conf --zip
ls -t /root/*.tar.gz | head -1 | xargs -I '{}' cp '{}' /home/runner/work/bigbluebutton/bigbluebutton/bbb-logs.tar.gz
echo "MATRIX_SHARD=$(echo ${{ matrix.shard }} | tr '/' '_')" >> $GITHUB_ENV
EOF
- if: failure()
uses: actions/upload-artifact@v3
with:
name: bbb-configs
name: bbb-configs-${{ env.MATRIX_SHARD }}
path: configs
- if: failure()
uses: actions/upload-artifact@v3
with:
name: bbb-logs
name: bbb-logs-${{ env.MATRIX_SHARD }}
path: ./bbb-logs.tar.gz
upload-report:
if: always()

View File

@ -13,8 +13,8 @@ object Dependencies {
val scalactic = "3.0.8"
// Libraries
val akkaVersion = "2.6.17"
val akkaHttpVersion = "10.2.7"
val pekkoVersion = "1.0.1"
val pekkoHttpVersion = "1.0.0"
val gson = "2.8.9"
val jackson = "2.13.5"
val logback = "1.2.11"
@ -43,8 +43,8 @@ object Dependencies {
val scalaLibrary = "org.scala-lang" % "scala-library" % Versions.scala
val scalaCompiler = "org.scala-lang" % "scala-compiler" % Versions.scala
val akkaActor = "com.typesafe.akka" % "akka-actor_2.13" % Versions.akkaVersion
val akkaSl4fj = "com.typesafe.akka" % "akka-slf4j_2.13" % Versions.akkaVersion
val pekkoActor = "org.apache.pekko" %% "pekko-actor" % Versions.pekkoVersion
val pekkoSlf4j = "org.apache.pekko" %% "pekko-slf4j" % Versions.pekkoVersion
val googleGson = "com.google.code.gson" % "gson" % Versions.gson
val jacksonModule = "com.fasterxml.jackson.module" %% "jackson-module-scala" % Versions.jackson
@ -53,9 +53,9 @@ object Dependencies {
val commonsCodec = "commons-codec" % "commons-codec" % Versions.codec
val sprayJson = "io.spray" % "spray-json_2.13" % Versions.spray
val akkaStream = "com.typesafe.akka" %% "akka-stream" % Versions.akkaVersion
val akkaHttp = "com.typesafe.akka" %% "akka-http" % Versions.akkaHttpVersion
val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % Versions.akkaHttpVersion
val pekkoStream = "org.apache.pekko" %% "pekko-stream" % Versions.pekkoVersion
val pekkoHttp = "org.apache.pekko" %% "pekko-http" % Versions.pekkoHttpVersion
val pekkoHttpSprayJson = "org.apache.pekko" %% "pekko-http-spray-json" % Versions.pekkoHttpVersion
val apacheLang = "org.apache.commons" % "commons-lang3" % Versions.lang
@ -85,9 +85,9 @@ object Dependencies {
val runtime = Seq(
Compile.scalaLibrary,
Compile.scalaCompiler,
Compile.akkaActor,
Compile.akkaSl4fj,
Compile.akkaStream,
Compile.pekkoActor,
Compile.pekkoSlf4j,
Compile.pekkoStream,
Compile.googleGson,
Compile.jacksonModule,
Compile.quicklens,
@ -95,8 +95,8 @@ object Dependencies {
Compile.commonsCodec,
Compile.sprayJson,
Compile.apacheLang,
Compile.akkaHttp,
Compile.akkaHttpSprayJson,
Compile.pekkoHttp,
Compile.pekkoHttpSprayJson,
Compile.bbbCommons,
Compile.slick,
Compile.slickHikaricp,

View File

@ -1,8 +1,8 @@
package org.bigbluebutton
import akka.http.scaladsl.model._
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import akka.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import org.apache.pekko.http.scaladsl.server.Directives._
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.service.{ HealthzService, MeetingInfoService, PubSubReceiveStatus, PubSubSendStatus, RecordingDBSendStatus }
import spray.json._

View File

@ -1,9 +1,9 @@
package org.bigbluebutton
import akka.actor.ActorSystem
import akka.event.Logging
import akka.http.scaladsl.Http
import akka.stream.ActorMaterializer
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.event.Logging
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.stream.ActorMaterializer
import org.bigbluebutton.common2.redis.{ MessageSender, RedisConfig, RedisPublisher }
import org.bigbluebutton.core._
import org.bigbluebutton.core.bus._

View File

@ -1,10 +1,10 @@
package org.bigbluebutton.core
import java.io.{ PrintWriter, StringWriter }
import akka.actor._
import akka.actor.ActorLogging
import akka.actor.SupervisorStrategy.Resume
import akka.util.Timeout
import org.apache.pekko.actor._
import org.apache.pekko.actor.ActorLogging
import org.apache.pekko.actor.SupervisorStrategy.Resume
import org.apache.pekko.util.Timeout
import scala.concurrent.duration._
import org.bigbluebutton.core.bus._

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps.audiocaptions
import akka.actor.ActorContext
import org.apache.pekko.actor.ActorContext
class AudioCaptionsApp2x(implicit val context: ActorContext)
extends UpdateTranscriptPubMsgHdlr

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps.breakout
import org.bigbluebutton.common2.msgs.{ GroupChatAccess, GroupChatMsgFromUser }
import org.bigbluebutton.common2.msgs.{ GroupChatAccess, GroupChatMessageType, GroupChatMsgFromUser }
import org.bigbluebutton.core.api.SendMessageToBreakoutRoomInternalMsg
import org.bigbluebutton.core.apps.groupchats.GroupChatApp
import org.bigbluebutton.core.bus.MessageBus
@ -20,7 +20,7 @@ trait SendMessageToBreakoutRoomInternalMsgHdlr {
} yield {
val groupChatMsgFromUser = GroupChatMsgFromUser(sender.id, sender.copy(name = msg.senderName), true, msg.msg)
val gcm = GroupChatApp.toGroupChatMessage(sender.copy(name = msg.senderName), groupChatMsgFromUser)
val gcs = GroupChatApp.addGroupChatMessage(liveMeeting.props.meetingProp.intId, chat, state.groupChats, gcm)
val gcs = GroupChatApp.addGroupChatMessage(liveMeeting.props.meetingProp.intId, chat, state.groupChats, gcm, GroupChatMessageType.BREAKOUTROOM_MOD_MSG)
val event = buildGroupChatMessageBroadcastEvtMsg(
liveMeeting.props.meetingProp.intId,

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.caption
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.running.{ LiveMeeting }

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps.chat
import akka.actor.ActorContext
import org.apache.pekko.actor.ActorContext
class ChatApp2x(implicit val context: ActorContext)
extends GetChatHistoryReqMsgHdlr

View File

@ -33,7 +33,7 @@ trait ClearPublicChatHistoryPubMsgHdlr extends LogHelper with RightsManagementTr
gc <- state.groupChats.find(msg.body.chatId)
} yield {
ChatMessageDAO.deleteAllFromChat(liveMeeting.props.meetingProp.intId, msg.body.chatId)
ChatMessageDAO.insertSystemMsg(liveMeeting.props.meetingProp.intId, msg.body.chatId, "", "publicChatHistoryCleared", Map(), "")
ChatMessageDAO.insertSystemMsg(liveMeeting.props.meetingProp.intId, msg.body.chatId, "", GroupChatMessageType.PUBLIC_CHAT_HIST_CLEARED, Map(), "")
broadcastEvent(msg)
val newGc = gc.clearMessages()
val gcs = state.groupChats.update(newGc)

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.externalvideo
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
class ExternalVideoApp2x(implicit val context: ActorContext)
extends StartExternalVideoPubMsgHdlr

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps.groupchats
import org.bigbluebutton.common2.msgs.{ GroupChatAccess, GroupChatMsgFromUser, GroupChatMsgToUser, GroupChatUser }
import org.bigbluebutton.common2.msgs.{ GroupChatAccess, GroupChatMessageType, GroupChatMsgFromUser, GroupChatMsgToUser, GroupChatUser }
import org.bigbluebutton.core.db.ChatMessageDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models._
@ -32,9 +32,9 @@ object GroupChatApp {
}
def addGroupChatMessage(meetingId: String, chat: GroupChat, chats: GroupChats,
msg: GroupChatMessage): GroupChats = {
msg: GroupChatMessage, messageType: String = GroupChatMessageType.DEFAULT): GroupChats = {
if (msg.sender.id == SystemUser.ID) {
ChatMessageDAO.insertSystemMsg(meetingId, chat.id, msg.message, "default", Map(), msg.sender.name)
ChatMessageDAO.insertSystemMsg(meetingId, chat.id, msg.message, messageType, Map(), msg.sender.name)
} else {
ChatMessageDAO.insert(meetingId, chat.id, msg)
}

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.groupchats
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
class GroupChatHdlrs(implicit val context: ActorContext)
extends CreateGroupChatReqMsgHdlr

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps.pads
import akka.actor.ActorContext
import org.apache.pekko.actor.ActorContext
class PadsApp2x(implicit val context: ActorContext)
extends PadCreateGroupReqMsgHdlr

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.polls
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
class PollApp2x(implicit val context: ActorContext)
extends GetCurrentPollReqMsgHdlr

View File

@ -77,7 +77,7 @@ trait ShowPollResultReqMsgHdlr extends RightsManagementTrait {
"numResponders" -> result.numResponders,
)
ChatMessageDAO.insertSystemMsg(liveMeeting.props.meetingProp.intId, GroupChatApp.MAIN_PUBLIC_CHAT, "", "poll", resultAsSimpleMap, "")
ChatMessageDAO.insertSystemMsg(liveMeeting.props.meetingProp.intId, GroupChatApp.MAIN_PUBLIC_CHAT, "", GroupChatMessageType.POLL, resultAsSimpleMap, "")
broadcastEvent(msg, result, annotationProp)
}
}

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.presentation
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
import org.bigbluebutton.core.apps.Presentation
import org.bigbluebutton.core.running.LiveMeeting

View File

@ -247,7 +247,7 @@ trait MakePresentationDownloadReqMsgHdlr extends RightsManagementTrait {
"fileURI" -> m.body.annotatedFileURI,
"filename" -> "annotated_slides.pdf"
)
ChatMessageDAO.insertSystemMsg(liveMeeting.props.meetingProp.intId, GroupChatApp.MAIN_PUBLIC_CHAT, "", "presentation", presentationDownloadInfo, "")
ChatMessageDAO.insertSystemMsg(liveMeeting.props.meetingProp.intId, GroupChatApp.MAIN_PUBLIC_CHAT, "", GroupChatMessageType.PRESENTATION, presentationDownloadInfo, "")
}
bus.outGW.send(buildBroadcastNewPresFileAvailable(m, liveMeeting))

View File

@ -2,7 +2,9 @@ package org.bigbluebutton.core.apps.presentationpod
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.db.PresPresentationDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models.PresentationInPod
import org.bigbluebutton.core.running.LiveMeeting
trait PdfConversionInvalidErrorSysPubMsgHdlr {
@ -30,7 +32,30 @@ trait PdfConversionInvalidErrorSysPubMsgHdlr {
bus.outGW.send(msgEvent)
}
val errorDetails = scala.collection.immutable.Map(
"bigPageNumber" -> msg.body.bigPageNumber.toString,
"bigPageSize" -> msg.body.bigPageSize.toString
)
val newState = for {
pod <- PresentationPodsApp.getPresentationPod(state, msg.body.podId)
pres <- pod.getPresentation(msg.body.presentationId)
} yield {
val presWithError = PresentationInPod(pres.id, pres.name, pres.current, pres.pages, pres.downloadable, pres.removable,
pres.filenameConverted, pres.uploadCompleted, pres.numPages, msg.body.messageKey, errorDetails)
var pods = state.presentationPodManager.addPod(pod)
pods = pods.addPresentationToPod(pod.id, presWithError)
PresPresentationDAO.insertOrUpdate(msg.header.meetingId, presWithError)
state.update(pods)
}
broadcastEvent(msg)
state
newState match {
case Some(ns) => ns
case None =>
PresPresentationDAO.updateErrors(msg.body.presentationId, msg.body.messageKey, errorDetails)
state
}
}
}

View File

@ -48,11 +48,11 @@ trait PresentationConversionCompletedSysPubMsgHdlr {
)
val presWithConvertedName = PresentationInPod(pres.id, pres.name, pres.current, pres.pages,
pres.downloadable, pres.removable, msg.body.presentation.filenameConverted)
pres.downloadable, pres.removable, msg.body.presentation.filenameConverted, uploadCompleted = true, numPages = pres.numPages, errorDetails = Map.empty)
var pods = state.presentationPodManager.addPod(pod)
pods = pods.addPresentationToPod(pod.id, presWithConvertedName)
PresPresentationDAO.insert(meetingId, pres)
PresPresentationDAO.insertOrUpdate(meetingId, presWithConvertedName)
state.update(pods)
}

View File

@ -2,7 +2,9 @@ package org.bigbluebutton.core.apps.presentationpod
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.db.PresPresentationDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models.PresentationInPod
import org.bigbluebutton.core.running.LiveMeeting
trait PresentationConversionUpdatePubMsgHdlr {
@ -35,6 +37,10 @@ trait PresentationConversionUpdatePubMsgHdlr {
bus.outGW.send(msgEvent)
}
val pres = new PresentationInPod(msg.body.presentationId, msg.body.presName, false, Map.empty, false,
false, uploadCompleted = false, numPages = -1, errorDetails = Map.empty)
PresPresentationDAO.insertOrUpdate(msg.header.meetingId, pres)
broadcastEvent(msg)
state
}

View File

@ -2,7 +2,9 @@ package org.bigbluebutton.core.apps.presentationpod
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.db.PresPresentationDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models.PresentationInPod
import org.bigbluebutton.core.running.LiveMeeting
trait PresentationHasInvalidMimeTypeErrorPubMsgHdlr {
@ -32,6 +34,15 @@ trait PresentationHasInvalidMimeTypeErrorPubMsgHdlr {
bus.outGW.send(msgEvent)
}
val errorDetails = scala.collection.immutable.Map(
"fileMime" -> msg.body.fileMime,
"fileExtension" -> msg.body.fileExtension
)
val pres = new PresentationInPod(msg.body.presentationId, msg.body.presentationName, false, Map.empty, false,
false, uploadCompleted = false, numPages = -1, errorMsgKey = msg.body.messageKey, errorDetails = errorDetails)
PresPresentationDAO.insertOrUpdate(msg.header.meetingId, pres)
broadcastEvent(msg)
state
}

View File

@ -2,6 +2,7 @@ package org.bigbluebutton.core.apps.presentationpod
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.db.PresPresentationDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models.PresentationInPod
import org.bigbluebutton.core.running.LiveMeeting
@ -43,7 +44,8 @@ trait PresentationPageConversionStartedSysMsgHdlr {
val presentationId = msg.body.presentationId
val podId = msg.body.podId
val pres = new PresentationInPod(presentationId, msg.body.presName, msg.body.current, Map.empty, downloadable, removable)
val pres = new PresentationInPod(presentationId, msg.body.presName, msg.body.current, Map.empty, downloadable,
removable, uploadCompleted = false, numPages = msg.body.numPages, errorDetails = Map.empty)
val newState = for {
pod <- PresentationPodsApp.getPresentationPod(state, podId)

View File

@ -3,6 +3,7 @@ package org.bigbluebutton.core.apps.presentationpod
import org.bigbluebutton.common2.domain.PresentationPageVO
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.db.PresPresentationDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models.{ PresentationInPod, PresentationPage }
import org.bigbluebutton.core.running.LiveMeeting
@ -56,7 +57,8 @@ trait PresentationPageConvertedSysMsgHdlr {
msg.body.page.urls,
msg.body.page.current,
width = msg.body.page.width,
height = msg.body.page.height
height = msg.body.page.height,
converted = true
)
val newState = for {
@ -67,6 +69,7 @@ trait PresentationPageConvertedSysMsgHdlr {
var pods = state.presentationPodManager.addPod(pod)
pods = pods.addPresentationToPod(pod.id, newPres)
PresPresentationDAO.insertOrUpdate(msg.header.meetingId, newPres)
state.update(pods)
}

View File

@ -2,7 +2,9 @@ package org.bigbluebutton.core.apps.presentationpod
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.db.PresPresentationDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models.PresentationInPod
import org.bigbluebutton.core.running.LiveMeeting
trait PresentationPageCountErrorPubMsgHdlr {
@ -30,7 +32,30 @@ trait PresentationPageCountErrorPubMsgHdlr {
bus.outGW.send(msgEvent)
}
val errorDetails = scala.collection.immutable.Map(
"numberOfPages" -> msg.body.numberOfPages.toString,
"maxNumberOfPages" -> msg.body.maxNumberPages.toString
)
val newState = for {
pod <- PresentationPodsApp.getPresentationPod(state, msg.body.podId)
pres <- pod.getPresentation(msg.body.presentationId)
} yield {
val presWithError = PresentationInPod(pres.id, pres.name, pres.current, pres.pages, pres.downloadable, pres.removable,
pres.filenameConverted, pres.uploadCompleted, msg.body.numberOfPages, msg.body.messageKey, errorDetails)
var pods = state.presentationPodManager.addPod(pod)
pods = pods.addPresentationToPod(pod.id, presWithError)
PresPresentationDAO.insertOrUpdate(msg.header.meetingId, presWithError)
state.update(pods)
}
broadcastEvent(msg)
state
newState match {
case Some(ns) => ns
case None =>
PresPresentationDAO.updateErrors(msg.body.presentationId, msg.body.messageKey, errorDetails)
state
}
}
}

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.presentationpod
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
class PresentationPodHdlrs(implicit val context: ActorContext)
extends CreateNewPresentationPodPubMsgHdlr

View File

@ -2,7 +2,9 @@ package org.bigbluebutton.core.apps.presentationpod
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.db.PresPresentationDAO
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.models.PresentationInPod
import org.bigbluebutton.core.running.LiveMeeting
trait PresentationUploadedFileTimeoutErrorPubMsgHdlr {
@ -32,7 +34,29 @@ trait PresentationUploadedFileTimeoutErrorPubMsgHdlr {
bus.outGW.send(msgEvent)
}
val errorDetails = scala.collection.immutable.Map(
"maxNumberOfAttempts" -> msg.body.maxNumberOfAttempts.toString,
)
val newState = for {
pod <- PresentationPodsApp.getPresentationPod(state, msg.body.podId)
pres <- pod.getPresentation(msg.body.presentationId)
} yield {
val presWithError = PresentationInPod(pres.id, pres.name, pres.current, pres.pages, pres.downloadable, pres.removable,
pres.filenameConverted, pres.uploadCompleted, pres.numPages, msg.body.messageKey, errorDetails)
var pods = state.presentationPodManager.addPod(pod)
pods = pods.addPresentationToPod(pod.id, presWithError)
PresPresentationDAO.insertOrUpdate(msg.header.meetingId, presWithError)
state.update(pods)
}
broadcastEvent(msg)
state
newState match {
case Some(ns) => ns
case None =>
PresPresentationDAO.updateErrors(msg.body.presentationId, msg.body.messageKey, errorDetails)
state
}
}
}

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.screenshare
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
import org.bigbluebutton.core.apps.ScreenshareModel
import org.bigbluebutton.core.running.{ LiveMeeting, OutMsgRouter }
import org.bigbluebutton.core2.message.senders.MsgBuilder

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.timer
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
class TimerApp2x(implicit val context: ActorContext)
extends CreateTimerPubMsgHdlr

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.users
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.apps.ExternalVideoModel
import org.bigbluebutton.core.bus.InternalEventBus

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps.voice
import akka.actor.{ ActorContext, ActorSystem, Cancellable }
import org.apache.pekko.actor.{ ActorContext, ActorSystem, Cancellable }
import org.bigbluebutton.SystemConfiguration
import org.bigbluebutton.LockSettingsUtil
import org.bigbluebutton.core.apps.breakout.BreakoutHdlrHelpers

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.webcam
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
class WebcamApp2x(implicit val context: ActorContext)
extends CamBroadcastStoppedInSfuEvtMsgHdlr

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.whiteboard
import akka.actor.ActorContext
import akka.event.Logging
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.Logging
import org.bigbluebutton.core.running.LiveMeeting
import org.bigbluebutton.common2.msgs.AnnotationVO
import scala.collection.immutable.{ Map }

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
import org.bigbluebutton.common2.msgs.BbbCommonEnvCoreMsg
case class BbbMsgEvent(val topic: String, val payload: BbbCommonEnvCoreMsg)

View File

@ -1,5 +1,6 @@
package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import org.apache.pekko.actor.ActorRef
class InMsgBusGW(bus: IncomingEventBusImp) extends InternalEventBus {
override def publish(event: BigBlueButtonEvent): Unit = {

View File

@ -1,8 +1,8 @@
package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import akka.event.EventBus
import akka.event.LookupClassification
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.EventBus
import org.apache.pekko.event.LookupClassification
class IncomingEventBusImp extends EventBus with LookupClassification {
type Event = BigBlueButtonEvent

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import org.apache.pekko.actor.ActorRef
import org.bigbluebutton.core.api.InMessage
case class BigBlueButtonEvent(val topic: String, val payload: InMessage)

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
import org.bigbluebutton.common2.msgs.{ BbbCommonEnvCoreMsg }
case class BbbOutMessage(val topic: String, val payload: BbbCommonEnvCoreMsg)

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
import org.bigbluebutton.common2.msgs.{ BbbCoreMsg }
case class BbbRecordMessage(val topic: String, val payload: BbbCoreMsg)

View File

@ -24,7 +24,8 @@ case class PresPageDbModel(
viewBoxWidth: Double,
viewBoxHeight: Double,
maxImageWidth: Int,
maxImageHeight: Int
maxImageHeight: Int,
converted: Boolean
)
class PresPageDbTableDef(tag: Tag) extends Table[PresPageDbModel](tag, None, "pres_page") {
@ -44,8 +45,9 @@ class PresPageDbTableDef(tag: Tag) extends Table[PresPageDbModel](tag, None, "pr
val viewBoxHeight = column[Double]("viewBoxHeight")
val maxImageWidth = column[Int]("maxImageWidth")
val maxImageHeight = column[Int]("maxImageHeight")
val converted = column[Boolean]("converted")
// val presentation = foreignKey("presentation_fk", presentationId, Presentations)(_.presentationId, onDelete = ForeignKeyAction.Cascade)
def * = (pageId, presentationId, num, urls, slideRevealed, current, xOffset, yOffset, widthRatio, heightRatio, width, height, viewBoxWidth, viewBoxHeight, maxImageWidth, maxImageHeight) <> (PresPageDbModel.tupled, PresPageDbModel.unapply)
def * = (pageId, presentationId, num, urls, slideRevealed, current, xOffset, yOffset, widthRatio, heightRatio, width, height, viewBoxWidth, viewBoxHeight, maxImageWidth, maxImageHeight, converted) <> (PresPageDbModel.tupled, PresPageDbModel.unapply)
}
object PresPageDAO {

View File

@ -7,7 +7,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.util.{ Failure, Success }
import spray.json._
case class PresPresentationDbModel(presentationId: String, meetingId: String, current: Boolean, downloadable: Boolean, removable: Boolean)
case class PresPresentationDbModel(presentationId: String, meetingId: String, current: Boolean, downloadable: Boolean, removable: Boolean, uploadCompleted: Boolean, numPages: Int, errorMsgKey: String, errorDetails: String)
class PresPresentationDbTableDef(tag: Tag) extends Table[PresPresentationDbModel](tag, None, "pres_presentation") {
val presentationId = column[String]("presentationId", O.PrimaryKey)
@ -15,9 +15,13 @@ class PresPresentationDbTableDef(tag: Tag) extends Table[PresPresentationDbModel
val current = column[Boolean]("current")
val downloadable = column[Boolean]("downloadable")
val removable = column[Boolean]("removable")
val uploadCompleted = column[Boolean]("uploadCompleted")
val numPages = column[Int]("numPages")
val errorMsgKey = column[String]("errorMsgKey")
val errorDetails = column[String]("errorDetails")
// val meeting = foreignKey("meeting_fk", meetingId, Meetings)(_.meetingId, onDelete = ForeignKeyAction.Cascade)
def * = (presentationId, meetingId, current, downloadable, removable) <> (PresPresentationDbModel.tupled, PresPresentationDbModel.unapply)
def * = (presentationId, meetingId, current, downloadable, removable, uploadCompleted, numPages, errorMsgKey, errorDetails) <> (PresPresentationDbModel.tupled, PresPresentationDbModel.unapply)
}
object PresPresentationDAO {
@ -27,7 +31,7 @@ object PresPresentationDAO {
}
}
def insert(meetingId: String, presentation: PresentationInPod) = {
def insertOrUpdate(meetingId: String, presentation: PresentationInPod) = {
DatabaseConnection.db.run(
TableQuery[PresPresentationDbTableDef].insertOrUpdate(
PresPresentationDbModel(
@ -35,7 +39,11 @@ object PresPresentationDAO {
meetingId = meetingId,
current = false, //Set after pages were inserted
downloadable = presentation.downloadable,
removable = presentation.removable
removable = presentation.removable,
uploadCompleted = presentation.uploadCompleted,
numPages = presentation.numPages,
errorMsgKey = presentation.errorMsgKey,
errorDetails = presentation.errorDetails.toJson.asJsObject.compactPrint
)
)
).onComplete {
@ -63,7 +71,8 @@ object PresPresentationDAO {
viewBoxWidth = 1,
viewBoxHeight = 1,
maxImageWidth = 1440,
maxImageHeight = 1080
maxImageHeight = 1080,
converted = page._2.converted
)
)
}
@ -93,4 +102,16 @@ object PresPresentationDAO {
}
}
def updateErrors(presentationId: String, errorMsgKey: String, errorDetails: scala.collection.immutable.Map[String, String]) = {
DatabaseConnection.db.run(
TableQuery[PresPresentationDbTableDef]
.filter(_.presentationId === presentationId)
.map(p => (p.errorMsgKey, p.errorDetails))
.update(errorMsgKey, errorDetails.toJson.asJsObject.compactPrint)
).onComplete {
case Success(rowAffected) => DatabaseConnection.logger.debug(s"$rowAffected row(s) updated errorMsgKey on PresPresentation table")
case Failure(e) => DatabaseConnection.logger.error(s"Error updating errorMsgKey on PresPresentation: $e")
}
}
}

View File

@ -4,7 +4,7 @@ import org.bigbluebutton.common2.domain.PageVO
import org.bigbluebutton.core.models.PresentationInPod
import org.bigbluebutton.core.util.RandomStringGenerator
import org.bigbluebutton.common2.msgs.AnnotationVO
import org.bigbluebutton.core.db.{PresPageDAO, PresPresentationDAO}
import org.bigbluebutton.core.db.{ PresPageDAO, PresPresentationDAO }
object PresentationPodFactory {
private def genId(): String = System.currentTimeMillis() + "-" + RandomStringGenerator.randomAlphanumericString(8)
@ -31,7 +31,8 @@ case class PresentationPage(
widthRatio: Double = 100D,
heightRatio: Double = 100D,
width: Double = 1440D,
height: Double = 1080D
height: Double = 1080D,
converted: Boolean = false
)
object PresentationInPod {
@ -61,13 +62,17 @@ object PresentationInPod {
}
case class PresentationInPod(
id: String,
name: String,
current: Boolean = false,
pages: scala.collection.immutable.Map[String, PresentationPage],
downloadable: Boolean,
removable: Boolean,
filenameConverted: String = "",
id: String,
name: String,
current: Boolean = false,
pages: scala.collection.immutable.Map[String, PresentationPage],
downloadable: Boolean,
removable: Boolean,
filenameConverted: String = "",
uploadCompleted: Boolean,
numPages: Int,
errorMsgKey: String = "",
errorDetails: scala.collection.immutable.Map[String, String]
)
object PresentationPod {

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.pubsub.senders
import akka.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.bigbluebutton.SystemConfiguration
import com.fasterxml.jackson.databind.JsonNode
import org.bigbluebutton.common2.msgs._

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.running
import akka.actor.{ Actor, ActorLogging }
import org.apache.pekko.actor.{ Actor, ActorLogging }
// A marker trait so we can create testable meeting actors
trait BaseMeetingActor extends Actor with ActorLogging {

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.running
import akka.actor.ActorContext
import akka.event.{ LogSource, Logging }
import org.apache.pekko.actor.ActorContext
import org.apache.pekko.event.{ LogSource, Logging }
object MyType {
implicit val logSource: LogSource[AnyRef] = new LogSource[AnyRef] {

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.core.running
import java.io.{ PrintWriter, StringWriter }
import akka.actor.SupervisorStrategy.Resume
import org.apache.pekko.actor.SupervisorStrategy.Resume
import org.bigbluebutton.SystemConfiguration
import org.bigbluebutton.core.apps.groupchats.GroupChatHdlrs
import org.bigbluebutton.core.apps.presentationpod._
@ -32,18 +32,18 @@ import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.apps.breakout._
import org.bigbluebutton.core.apps.polls._
import org.bigbluebutton.core.apps.voice._
import akka.actor.Props
import akka.actor.OneForOneStrategy
import org.apache.pekko.actor.Props
import org.apache.pekko.actor.OneForOneStrategy
import org.bigbluebutton.common2.msgs
import scala.concurrent.duration._
import org.bigbluebutton.core.apps.layout.LayoutApp2x
import org.bigbluebutton.core.apps.meeting.{ SyncGetMeetingInfoRespMsgHdlr, ValidateConnAuthTokenSysMsgHdlr }
import org.bigbluebutton.core.apps.users.ChangeLockSettingsInMeetingCmdMsgHdlr
import org.bigbluebutton.core.db.{ UserStateDAO }
import org.bigbluebutton.core.db.UserStateDAO
import org.bigbluebutton.core.models.VoiceUsers.{ findAllFreeswitchCallers, findAllListenOnlyVoiceUsers }
import org.bigbluebutton.core.models.Webcams.findAll
import org.bigbluebutton.core2.MeetingStatus2x.{ hasAuthedUserJoined }
import org.bigbluebutton.core2.MeetingStatus2x.hasAuthedUserJoined
import org.bigbluebutton.core2.message.senders.{ MsgBuilder, Sender }
import java.util.concurrent.TimeUnit

View File

@ -2,11 +2,11 @@ package org.bigbluebutton.core.running
import java.io.{ PrintWriter, StringWriter }
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.actor.Props
import akka.actor.OneForOneStrategy
import akka.actor.SupervisorStrategy.Resume
import org.apache.pekko.actor.Actor
import org.apache.pekko.actor.ActorLogging
import org.apache.pekko.actor.Props
import org.apache.pekko.actor.OneForOneStrategy
import org.apache.pekko.actor.SupervisorStrategy.Resume
import scala.concurrent.duration._
import org.bigbluebutton.SystemConfiguration

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.running
import akka.actor.ActorContext
import org.apache.pekko.actor.ActorContext
import org.bigbluebutton.common2.domain.DefaultProps
import org.bigbluebutton.core.apps._
import org.bigbluebutton.core.bus._

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core2
import akka.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.common2.util.JsonUtil
object AnalyticsActor {

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core2
import akka.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.bigbluebutton.SystemConfiguration
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.common2.util.JsonUtil

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core2.voiceconf
import akka.actor.{ Actor, ActorLogging, FSM }
import org.apache.pekko.actor.{ Actor, ActorLogging, FSM }
import org.bigbluebutton.SystemConfiguration
sealed trait VoiceConfState

View File

@ -2,8 +2,8 @@ package org.bigbluebutton.endpoint.redis
import org.bigbluebutton.common2.bus.IncomingJsonMessageBus
import org.bigbluebutton.common2.redis.{ RedisConfig, RedisSubscriberProvider }
import akka.actor.ActorSystem
import akka.actor.Props
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.actor.Props
object AppsRedisSubscriberActor {
def props(
@ -22,7 +22,7 @@ object AppsRedisSubscriberActor {
channelsToSubscribe,
patternsToSubscribe,
forwardMsgToChannel
).withDispatcher("akka.redis-subscriber-worker-dispatcher")
).withDispatcher("pekko.redis-subscriber-worker-dispatcher")
}
class AppsRedisSubscriberActor(

View File

@ -5,10 +5,10 @@ import scala.collection.JavaConverters._
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.common2.redis.{ RedisConfig, RedisStorageProvider }
import org.bigbluebutton.core.record.events.{ AbstractPresentationWithAnnotations, StoreAnnotationsInRedisPresAnnEvent, StoreExportJobInRedisPresAnnEvent }
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.actor.ActorSystem
import akka.actor.Props
import org.apache.pekko.actor.Actor
import org.apache.pekko.actor.ActorLogging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.actor.Props
import org.bigbluebutton.service.HealthzService
import scala.concurrent.duration._

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.endpoint.redis
import akka.actor.{Actor, ActorLogging, ActorSystem, Props}
import org.apache.pekko.actor.{Actor, ActorLogging, ActorSystem, Props}
import org.bigbluebutton.common2.domain.PresentationVO
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.common2.util.JsonUtil

View File

@ -6,10 +6,10 @@ import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.common2.redis.{ RedisConfig, RedisStorageProvider }
import org.bigbluebutton.core.apps.groupchats.GroupChatApp
import org.bigbluebutton.core.record.events._
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.actor.ActorSystem
import akka.actor.Props
import org.apache.pekko.actor.Actor
import org.apache.pekko.actor.ActorLogging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.actor.Props
import org.bigbluebutton.service.HealthzService
import scala.concurrent.duration._

View File

@ -1,11 +1,11 @@
package org.bigbluebutton.service
import akka.actor.{ Actor, ActorLogging, ActorSystem, Props }
import akka.util.Timeout
import org.apache.pekko.actor.{ Actor, ActorLogging, ActorSystem, Props }
import org.apache.pekko.util.Timeout
import scala.concurrent.Future
import scala.concurrent.duration._
import akka.pattern.{ AskTimeoutException, ask }
import org.apache.pekko.pattern.{ AskTimeoutException, ask }
import org.bigbluebutton.core.BigBlueButtonActor
import java.time.{ Instant, LocalDateTime }

View File

@ -1,9 +1,9 @@
package org.bigbluebutton.service
import akka.actor.{ Actor, ActorLogging, ActorRef, ActorSystem, Props }
import akka.pattern.ask
import akka.pattern.AskTimeoutException
import akka.util.Timeout
import org.apache.pekko.actor.{ Actor, ActorLogging, ActorRef, ActorSystem, Props }
import org.apache.pekko.pattern.ask
import org.apache.pekko.pattern.AskTimeoutException
import org.apache.pekko.util.Timeout
import org.bigbluebutton.MeetingInfoAnalytics
import org.bigbluebutton.common2.msgs.{ BbbCommonEnvCoreMsg, MeetingEndingEvtMsg, MeetingInfoAnalyticsServiceMsg }

View File

@ -1,4 +1,4 @@
akka {
pekko {
actor {
debug {
# enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill et.c.)
@ -7,11 +7,11 @@ akka {
lifecycle = on
}
}
loggers = ["akka.event.slf4j.Slf4jLogger"]
loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
redis-publish-worker-dispatcher {
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
mailbox-type = "org.apache.pekko.dispatch.SingleConsumerOnlyUnboundedMailbox"
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.
@ -19,7 +19,7 @@ akka {
}
redis-subscriber-worker-dispatcher {
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
mailbox-type = "org.apache.pekko.dispatch.SingleConsumerOnlyUnboundedMailbox"
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.

View File

@ -12,8 +12,8 @@ object Dependencies {
val scalactic = "3.0.8"
// Libraries
val akkaVersion = "2.6.17"
val akkaHttpVersion = "10.2.7"
val pekkoVersion = "1.0.1"
val pekkoHttpVersion = "1.0.0"
val logback = "1.2.10"
// Apache Commons
@ -26,7 +26,7 @@ object Dependencies {
// Test
val scalaTest = "3.2.11"
val akkaTestKit = "2.6.0"
val pekkoTestKit = "1.0.1"
val junit = "4.12"
}
@ -34,12 +34,12 @@ object Dependencies {
val scalaLibrary = "org.scala-lang" % "scala-library" % Versions.scala
val scalaCompiler = "org.scala-lang" % "scala-compiler" % Versions.scala
val akkaActor = "com.typesafe.akka" % "akka-actor_2.13" % Versions.akkaVersion
val akkaSl4fj = "com.typesafe.akka" % "akka-slf4j_2.13" % Versions.akkaVersion
val akkaStream = "com.typesafe.akka" %% "akka-stream" % Versions.akkaVersion
val pekkoActor = "org.apache.pekko" %% "pekko-actor" % Versions.pekkoVersion
val pekkoSlf4j = "org.apache.pekko" %% "pekko-slf4j" % Versions.pekkoVersion
val pekkoStream = "org.apache.pekko" %% "pekko-stream" % Versions.pekkoVersion
val akkaHttp = "com.typesafe.akka" %% "akka-http" % Versions.akkaHttpVersion
val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % Versions.akkaHttpVersion
val pekkoHttp = "org.apache.pekko" %% "pekko-http" % Versions.pekkoHttpVersion
val pekkoHttpSprayJson = "org.apache.pekko" %% "pekko-http-spray-json" % Versions.pekkoHttpVersion
val logback = "ch.qos.logback" % "logback-classic" % Versions.logback
val commonsCodec = "commons-codec" % "commons-codec" % Versions.codec
@ -53,13 +53,11 @@ object Dependencies {
object Test {
val scalaTest = "org.scalatest" %% "scalatest" % Versions.scalaTest % "test"
// val junit = "junit" % "junit" % Versions.junit % "test"
val scalactic = "org.scalactic" % "scalactic_2.13" % Versions.scalactic % "test"
val akkaTestKit = "com.typesafe.akka" %% "akka-testkit" % Versions.akkaTestKit % "test"
val pekkoTestKit = "org.apache.pekko" %% "pekko-testkit" % Versions.pekkoTestKit % "test"
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-http-testkit
val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % "10.2.0" % "test"
val pekkoHttpTestKit = "org.apache.pekko" %% "pekko-http-testkit" % "1.0.0" % "test"
}
@ -67,22 +65,22 @@ object Dependencies {
Test.scalaTest,
// Test.junit,
Test.scalactic,
Test.akkaTestKit,
Test.akkaHttpTestkit
Test.pekkoTestKit,
Test.pekkoHttpTestKit
)
val runtime = Seq(
Compile.scalaLibrary,
Compile.scalaCompiler,
Compile.akkaActor,
Compile.akkaSl4fj,
Compile.akkaStream,
Compile.pekkoActor,
Compile.pekkoSlf4j,
Compile.pekkoStream,
Compile.logback,
Compile.commonsCodec,
Compile.apacheLang,
Compile.bbbCommons,
Compile.bbbFseslClient,
Compile.akkaHttp,
Compile.akkaHttpSprayJson) ++ testing
Compile.pekkoHttp,
Compile.pekkoHttpSprayJson) ++ testing
}

View File

@ -1,15 +1,15 @@
akka {
pekko {
actor {
debug {
receive = on
}
}
loggers = ["akka.event.slf4j.Slf4jLogger"]
loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
stdout-loglevel = "DEBUG"
redis-subscriber-worker-dispatcher {
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
mailbox-type = "org.apache.pekko.dispatch.SingleConsumerOnlyUnboundedMailbox"
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.
@ -37,3 +37,9 @@ redis {
keyExpiry=1209600
}
http {
interface = "127.0.0.1"
interface = ${?INTERFACE}
port = 8900
port = ${?PORT}
}

View File

@ -1,10 +1,10 @@
package org.bigbluebutton
import akka.http.scaladsl.model._
import akka.http.scaladsl.server.Directives._
import org.bigbluebutton.service.{ HealthzService }
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.server.Directives._
import org.bigbluebutton.service.HealthzService
import spray.json.DefaultJsonProtocol
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
case class HealthResponse(isHealthy: Boolean)
case class StatusResponse(status: Array[String], heartbeat: Map[String, String])

View File

@ -7,9 +7,9 @@ import org.bigbluebutton.freeswitch.{ RxJsonMsgHdlrActor, VoiceConferenceService
import org.bigbluebutton.freeswitch.voice.FreeswitchConferenceEventListener
import org.bigbluebutton.freeswitch.voice.freeswitch.{ ConnectionManager, ESLEventListener, FreeswitchApplication }
import org.freeswitch.esl.client.manager.DefaultManagerConnection
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.http.scaladsl.Http
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.ActorMaterializer
import org.apache.pekko.http.scaladsl.Http
import org.bigbluebutton.service.HealthzService
import scala.concurrent.ExecutionContext

View File

@ -1,7 +1,7 @@
package org.bigbluebutton
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.ActorMaterializer
import scala.concurrent.ExecutionContext

View File

@ -4,8 +4,8 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration.DurationInt
import org.bigbluebutton.common2.bus.IncomingJsonMessageBus
import org.bigbluebutton.common2.redis.{ RedisConfig, RedisSubscriberProvider }
import akka.actor.ActorSystem
import akka.actor.Props
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.actor.Props
object FSESLRedisSubscriberActor {
@ -25,7 +25,7 @@ object FSESLRedisSubscriberActor {
channelsToSubscribe,
patternsToSubscribe,
forwardMsgToChannel
).withDispatcher("akka.redis-subscriber-worker-dispatcher")
).withDispatcher("pekko.redis-subscriber-worker-dispatcher")
}
class FSESLRedisSubscriberActor(

View File

@ -7,9 +7,9 @@ import org.bigbluebutton.freeswitch.voice.freeswitch.FreeswitchApplication
import com.fasterxml.jackson.databind.JsonNode
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.actor.Props
import org.apache.pekko.actor.Actor
import org.apache.pekko.actor.ActorLogging
import org.apache.pekko.actor.Props
object RxJsonMsgHdlrActor {
def props(fsApp: FreeswitchApplication): Props =

View File

@ -2,10 +2,10 @@ package org.bigbluebutton.service
import java.text.SimpleDateFormat
import akka.actor.{ Actor, ActorLogging, Props }
import akka.actor.ActorSystem
import akka.pattern.{ AskTimeoutException, ask }
import akka.util.Timeout
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.pattern.{ AskTimeoutException, ask }
import org.apache.pekko.util.Timeout
import scala.concurrent.duration._
import scala.concurrent.Future

View File

@ -1,15 +1,15 @@
akka {
pekko {
actor {
debug {
receive = on
}
}
loggers = ["akka.event.slf4j.Slf4jLogger"]
loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
stdout-loglevel = "DEBUG"
redis-subscriber-worker-dispatcher {
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
mailbox-type = "org.apache.pekko.dispatch.SingleConsumerOnlyUnboundedMailbox"
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.
@ -42,4 +42,4 @@ http {
interface = ${?INTERFACE}
port = 8900
port = ${?PORT}
}
}

View File

@ -13,7 +13,7 @@ object Dependencies {
val scalactic = "3.0.8"
// Libraries
val akkaVersion = "2.6.17"
val pekkoVersion = "1.0.1"
val gson = "2.8.9"
val jackson = "2.13.5"
val sl4j = "1.7.32"
@ -31,7 +31,7 @@ object Dependencies {
val scalaLibrary = "org.scala-lang" % "scala-library" % Versions.scala
val scalaCompiler = "org.scala-lang" % "scala-compiler" % Versions.scala
val akkaActor = "com.typesafe.akka" % "akka-actor_2.13" % Versions.akkaVersion
val pekkoActor = "org.apache.pekko" %% "pekko-actor" % Versions.pekkoVersion
val googleGson = "com.google.code.gson" % "gson" % Versions.gson
val jacksonModule = "com.fasterxml.jackson.module" %% "jackson-module-scala" % Versions.jackson
@ -58,7 +58,7 @@ object Dependencies {
val runtime = Seq(
Compile.scalaLibrary,
Compile.scalaCompiler,
Compile.akkaActor,
Compile.pekkoActor,
Compile.googleGson,
Compile.jacksonModule,
Compile.sl4jApi,

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.common2.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
case class ReceivedJsonMessage(channel: String, data: String)
case class IncomingJsonMessage(val topic: String, val payload: ReceivedJsonMessage)

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.common2.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
case class JsonMsgFromAkkaApps(name: String, data: String)
case class JsonMsgFromAkkaAppsEvent(val topic: String, val payload: JsonMsgFromAkkaApps)

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.api2.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
import org.bigbluebutton.common2.msgs.BbbCommonMsg
case class MsgFromAkkaApps(val topic: String, val payload: BbbCommonMsg)

View File

@ -1,8 +1,7 @@
package org.bigbluebutton.common2.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import akka.actor.actorRef2Scala
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
case class OldReceivedJsonMessage(pattern: String, channel: String, msg: String)
case class OldIncomingJsonMessage(val topic: String, val payload: OldReceivedJsonMessage)

View File

@ -5,6 +5,14 @@ object GroupChatAccess {
val PRIVATE = "PRIVATE_ACCESS"
}
object GroupChatMessageType {
val DEFAULT = "default"
val PRESENTATION = "presentation"
val POLL = "poll"
val BREAKOUTROOM_MOD_MSG = "breakoutRoomModeratorMsg"
val PUBLIC_CHAT_HIST_CLEARED = "publicChatHistoryCleared"
}
case class GroupChatUser(id: String, name: String = "", role: String = "VIEWER")
case class GroupChatMsgFromUser(correlationId: String, sender: GroupChatUser, chatEmphasizedText: Boolean = false, message: String)
case class GroupChatMsgToUser(id: String, timestamp: Long, correlationId: String, sender: GroupChatUser, chatEmphasizedText: Boolean = false, message: String)

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.common2.redis
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import io.lettuce.core.ClientOptions
import io.lettuce.core.RedisClient
import io.lettuce.core.RedisURI

View File

@ -5,7 +5,7 @@ import io.lettuce.core.event.Event
import io.lettuce.core.event.EventBus
import io.lettuce.core.event.connection.{ ConnectionDeactivatedEvent, ConnectionActivatedEvent, ConnectedEvent, DisconnectedEvent }
import reactor.core.Disposable
import akka.event.LoggingAdapter
import org.apache.pekko.event.LoggingAdapter
case class RedisConfig(host: String, port: Int, password: Option[String], expireKey: Int)

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.common2.redis
import akka.actor.ActorSystem
import akka.event.Logging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.event.Logging
class RedisPublisher(
system: ActorSystem,

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.common2.redis
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
abstract class RedisStorageProvider(system: ActorSystem, clientName: String, config: RedisConfig) {
val redisPass = config.password match {

View File

@ -1,16 +1,15 @@
package org.bigbluebutton.common2.redis
import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import org.bigbluebutton.common2.bus.ReceivedJsonMessage
import org.bigbluebutton.common2.bus.IncomingJsonMessage
import io.lettuce.core.pubsub.RedisPubSubListener
import org.bigbluebutton.common2.bus.IncomingJsonMessageBus
import akka.actor.ActorLogging
import akka.actor.Actor
import org.apache.pekko.actor.ActorLogging
import org.apache.pekko.actor.Actor
import akka.actor.ActorSystem
import akka.actor.OneForOneStrategy
import akka.actor.SupervisorStrategy.Resume
import org.apache.pekko.actor.OneForOneStrategy
import org.apache.pekko.actor.SupervisorStrategy.Resume
import java.io.StringWriter
import scala.concurrent.duration._
import java.io.PrintWriter

View File

@ -13,7 +13,7 @@ object Dependencies {
val scalactic = "3.0.8"
// Libraries
val akkaVersion = "2.6.17"
val pekkoVersion = "1.0.1"
val gson = "2.8.9"
val jackson = "2.13.5"
val freemarker = "2.3.31"
@ -45,8 +45,8 @@ object Dependencies {
val scalaLibrary = "org.scala-lang" % "scala-library" % Versions.scala
val scalaCompiler = "org.scala-lang" % "scala-compiler" % Versions.scala
val akkaActor = "com.typesafe.akka" % "akka-actor_2.13" % Versions.akkaVersion
val akkaSl4fj = "com.typesafe.akka" % "akka-slf4j_2.13" % Versions.akkaVersion
val pekkoActor = "org.apache.pekko" %% "pekko-actor" % Versions.pekkoVersion
val pekkoSlf4j = "org.apache.pekko" %% "pekko-slf4j" % Versions.pekkoVersion
val googleGson = "com.google.code.gson" % "gson" % Versions.gson
val jacksonModule = "com.fasterxml.jackson.module" %% "jackson-module-scala" % Versions.jackson
@ -85,8 +85,8 @@ object Dependencies {
val runtime = Seq(
Compile.scalaLibrary,
Compile.scalaCompiler,
Compile.akkaActor,
Compile.akkaSl4fj,
Compile.pekkoActor,
Compile.pekkoSlf4j,
Compile.googleGson,
Compile.jacksonModule,
Compile.jacksonXml,

View File

@ -1,8 +1,8 @@
package org.bigbluebutton.api2
import scala.collection.JavaConverters._
import akka.actor.ActorSystem
import akka.event.Logging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.event.Logging
import org.bigbluebutton.api.domain.{BreakoutRoomsParams, Group, LockSettingsParams}
import org.bigbluebutton.api.messaging.converters.messages._
import org.bigbluebutton.api2.bus._
@ -27,7 +27,7 @@ class BbbWebApiGWApp(
implicit val system = ActorSystem("bbb-web-common")
implicit val timeout = akka.util.Timeout(3 seconds)
implicit val timeout = org.apache.pekko.util.Timeout(3 seconds)
val log = Logging(system, getClass)

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.api2.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
case class JsonMsgToSendToAkkaApps(channel: String, json: String)
case class JsonMsgToAkkaAppsBusMsg(val topic: String, payload: JsonMsgToSendToAkkaApps)

View File

@ -2,8 +2,8 @@ package org.bigbluebutton.api2.bus
import java.io.{ PrintWriter, StringWriter }
import akka.actor.SupervisorStrategy.Resume
import akka.actor.{ Actor, ActorLogging, OneForOneStrategy, Props }
import org.apache.pekko.actor.SupervisorStrategy.Resume
import org.apache.pekko.actor.{ Actor, ActorLogging, OneForOneStrategy, Props }
import org.bigbluebutton.common2.redis.MessageSender
import scala.concurrent.duration._

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.api2.bus
import akka.actor.ActorRef
import akka.event.{ EventBus, LookupClassification }
import org.apache.pekko.actor.ActorRef
import org.apache.pekko.event.{ EventBus, LookupClassification }
import org.bigbluebutton.common2.msgs.BbbCommonEnvCoreMsg
case class MsgToAkkaApps(val topic: String, val payload: BbbCommonEnvCoreMsg)

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.api2.bus
import akka.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.bigbluebutton.api2.SystemConfiguration
import org.bigbluebutton.common2.msgs.BbbCommonEnvCoreMsg
import org.bigbluebutton.common2.util.JsonUtil

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.api2.bus
import akka.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.bigbluebutton.common2.bus.OldReceivedJsonMessage
object OldMessageJsonReceiverActor {

View File

@ -4,9 +4,9 @@ import org.bigbluebutton.api2.SystemConfiguration
import org.bigbluebutton.common2.bus._
import org.bigbluebutton.common2.msgs._
import com.fasterxml.jackson.databind.JsonNode
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.actor.Props
import org.apache.pekko.actor.Actor
import org.apache.pekko.actor.ActorLogging
import org.apache.pekko.actor.Props
import scala.reflect.runtime.universe._

View File

@ -3,8 +3,8 @@ package org.bigbluebutton.api2.endpoint.redis
import org.bigbluebutton.api2.SystemConfiguration
import org.bigbluebutton.common2.bus._
import org.bigbluebutton.common2.redis.{ RedisConfig, RedisSubscriberProvider }
import akka.actor.ActorSystem
import akka.actor.Props
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.actor.Props
import io.lettuce.core.pubsub.RedisPubSubListener
@ -32,7 +32,7 @@ object WebRedisSubscriberActor {
patternsToSubscribe,
forwardMsgToChannel,
oldJsonChannel
).withDispatcher("akka.redis-subscriber-worker-dispatcher")
).withDispatcher("pekko.redis-subscriber-worker-dispatcher")
}
class WebRedisSubscriberActor(

View File

@ -1,7 +1,7 @@
package org.bigbluebutton.api2.meeting
import akka.actor.Actor
import akka.actor.ActorLogging
import org.apache.pekko.actor.Actor
import org.apache.pekko.actor.ActorLogging
object MeetingActor {

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.api2.meeting
import akka.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.bigbluebutton.api.domain.UserSession
import org.bigbluebutton.api2.bus.MsgToAkkaAppsEventBus
import org.bigbluebutton.common2.domain.DefaultProps

View File

@ -2,7 +2,7 @@ package org.bigbluebutton.api2.meeting
import java.util
import akka.actor.{ Actor, ActorLogging, Props }
import org.apache.pekko.actor.{ Actor, ActorLogging, Props }
import org.bigbluebutton.api.messaging.messages._
import org.bigbluebutton.api2.bus.OldMessageReceivedGW
import org.bigbluebutton.common2.msgs._

View File

@ -842,19 +842,16 @@ CREATE TABLE "pres_presentation" (
"meetingId" varchar(100) REFERENCES "meeting"("meetingId") ON DELETE CASCADE,
"current" boolean,
"downloadable" boolean,
"removable" boolean
"removable" boolean,
"converting" boolean,
"uploadCompleted" boolean,
"numPages" integer,
"errorMsgKey" varchar(100),
"errorDetails" TEXT
);
CREATE INDEX "idx_pres_presentation_meetingId" ON "pres_presentation"("meetingId");
CREATE INDEX "idx_pres_presentation_meetingId_curr" ON "pres_presentation"("meetingId") where "current" is true;
CREATE OR REPLACE VIEW public.v_pres_presentation AS
SELECT pres_presentation."meetingId",
pres_presentation."presentationId",
pres_presentation."current",
pres_presentation."downloadable",
pres_presentation."removable"
FROM pres_presentation;
CREATE TABLE "pres_page" (
"pageId" varchar(100) PRIMARY KEY,
"presentationId" varchar(100) REFERENCES "pres_presentation"("presentationId") ON DELETE CASCADE,
@ -871,11 +868,26 @@ CREATE TABLE "pres_page" (
"viewBoxWidth" NUMERIC,
"viewBoxHeight" NUMERIC,
"maxImageWidth" integer,
"maxImageHeight" integer
"maxImageHeight" integer,
"converted" boolean
);
CREATE INDEX "idx_pres_page_presentationId" ON "pres_page"("presentationId");
CREATE INDEX "idx_pres_page_presentationId_curr" ON "pres_page"("presentationId") where "current" is true;
CREATE OR REPLACE VIEW public.v_pres_presentation AS
SELECT pres_presentation."meetingId",
pres_presentation."presentationId",
pres_presentation."current",
pres_presentation."downloadable",
pres_presentation."removable",
pres_presentation."converting",
pres_presentation."uploadCompleted",
pres_presentation."numPages",
pres_presentation."errorMsgKey",
pres_presentation."errorDetails",
(SELECT count(*) FROM pres_page WHERE pres_page."presentationId" = pres_presentation."presentationId" AND "converted" is true) as "pagesUploaded"
FROM pres_presentation;
CREATE OR REPLACE VIEW public.v_pres_page AS
SELECT pres_presentation."meetingId",
pres_page."presentationId",
@ -895,7 +907,8 @@ SELECT pres_presentation."meetingId",
(pres_page."width" * LEAST(pres_page."maxImageWidth" / pres_page."width", pres_page."maxImageHeight" / pres_page."height")) AS "scaledWidth",
(pres_page."height" * LEAST(pres_page."maxImageWidth" / pres_page."width", pres_page."maxImageHeight" / pres_page."height")) AS "scaledHeight",
(pres_page."width" * pres_page."widthRatio" / 100 * LEAST(pres_page."maxImageWidth" / pres_page."width", pres_page."maxImageHeight" / pres_page."height")) AS "scaledViewBoxWidth",
(pres_page."height" * pres_page."heightRatio" / 100 * LEAST(pres_page."maxImageWidth" / pres_page."width", pres_page."maxImageHeight" / pres_page."height")) AS "scaledViewBoxHeight"
(pres_page."height" * pres_page."heightRatio" / 100 * LEAST(pres_page."maxImageWidth" / pres_page."width", pres_page."maxImageHeight" / pres_page."height")) AS "scaledViewBoxHeight",
pres_page."converted"
FROM pres_page
JOIN pres_presentation ON pres_presentation."presentationId" = pres_page."presentationId";

View File

@ -20,10 +20,16 @@ select_permissions:
- role: bbb_client
permission:
columns:
- converting
- current
- downloadable
- errorDetails
- errorMsgKey
- numPages
- pagesUploaded
- presentationId
- removable
- uploadCompleted
filter:
meetingId:
_eq: X-Hasura-PresenterInMeeting

View File

@ -17,12 +17,12 @@ fi
echo "Restarting database bbb_graphql"
sudo -u postgres psql -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = 'bbb_graphql'"
sudo -u postgres psql -c "drop database if exists bbb_graphql"
sudo -u postgres psql -c "drop database if exists bbb_graphql with (force)"
sudo -u postgres psql -c "create database bbb_graphql WITH TEMPLATE template0 LC_COLLATE 'C.UTF-8'"
sudo -u postgres psql -c "alter database bbb_graphql set timezone to 'UTC'"
echo "Creating tables in bbb_graphql"
sudo -u postgres psql -U postgres -d bbb_graphql -a -f bbb_schema.sql --set ON_ERROR_STOP=on
sudo -u postgres psql -U postgres -d bbb_graphql -q -f bbb_schema.sql --set ON_ERROR_STOP=on
if [ "$hasura_status" = "active" ]; then
echo "Starting Hasura"

View File

@ -1,3 +1 @@
FROM amazoncorretto:17-alpine
RUN apk add fontconfig libreoffice
FROM bigbluebutton/bbb-libreoffice:latest

View File

@ -6,6 +6,7 @@ import ExternalVideoModal from '/imports/ui/components/external-video-player/mod
import RandomUserSelectContainer from '/imports/ui/components/common/modal/random-user/container';
import LayoutModalContainer from '/imports/ui/components/layout/modal/container';
import BBBMenu from '/imports/ui/components/common/menu/component';
import * as PluginSdk from 'bigbluebutton-html-plugin-sdk';
import Styled from './styles';
import TimerService from '/imports/ui/components/timer/service';
import { colorPrimary } from '/imports/ui/stylesheets/styled-components/palette';
@ -33,6 +34,12 @@ const propTypes = {
showPushLayout: PropTypes.bool.isRequired,
isTimerFeatureEnabled: PropTypes.bool.isRequired,
isCameraAsContentEnabled: PropTypes.bool.isRequired,
actionButtonDropdownItems: PropTypes.arrayOf(
PropTypes.shape({
allowed: PropTypes.bool,
key: PropTypes.string,
}),
).isRequired,
};
const defaultProps = {
@ -178,12 +185,9 @@ class ActionsDropdown extends PureComponent {
isTimerActive,
isTimerEnabled,
layoutContextDispatch,
setMeetingLayout,
setPushLayout,
showPushLayout,
amIModerator,
isMobile,
hasCameraAsContent,
actionButtonDropdownItems,
isCameraAsContentEnabled,
isTimerFeatureEnabled,
presentations,
@ -303,6 +307,29 @@ class ActionsDropdown extends PureComponent {
});
}
actionButtonDropdownItems.forEach((actionButtonItem) => {
switch (actionButtonItem.type) {
case PluginSdk.ActionButtonDropdownItemType.OPTION:
actions.push({
icon: actionButtonItem.icon,
label: actionButtonItem.label,
key: actionButtonItem.id,
onClick: actionButtonItem.onClick,
allowed: actionButtonItem.allowed,
});
break;
case PluginSdk.ActionButtonDropdownItemType.SEPARATOR:
actions.push({
key: actionButtonItem.id,
allowed: actionButtonItem.allowed,
isSeparator: true,
});
break;
default:
break;
}
});
return actions;
}

View File

@ -1,4 +1,4 @@
import React from 'react';
import React, { useContext } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Presentations from '/imports/api/presentations';
import PresentationUploaderService from '/imports/ui/components/presentation/presentation-uploader/service';
@ -7,6 +7,7 @@ import ActionsDropdown from './component';
import { layoutSelectInput, layoutDispatch, layoutSelect } from '../../layout/context';
import { SMALL_VIEWPORT_BREAKPOINT } from '../../layout/enums';
import { isCameraAsContentEnabled, isTimerFeatureEnabled } from '/imports/ui/services/features';
import { PluginsContext } from '/imports/ui/components/components-data/plugin-context/context';
const ActionsDropdownContainer = (props) => {
const sidebarContent = layoutSelectInput((i) => i.sidebarContent);
@ -15,6 +16,11 @@ const ActionsDropdownContainer = (props) => {
const isMobile = browserWidth <= SMALL_VIEWPORT_BREAKPOINT;
const layoutContextDispatch = layoutDispatch();
const isRTL = layoutSelect((i) => i.isRTL);
const { pluginsProvidedAggregatedState } = useContext(PluginsContext);
let actionButtonDropdownItems = [];
if (pluginsProvidedAggregatedState.actionButtonDropdownItems) {
actionButtonDropdownItems = [...pluginsProvidedAggregatedState.actionButtonDropdownItems];
}
return (
<ActionsDropdown
@ -24,6 +30,7 @@ const ActionsDropdownContainer = (props) => {
sidebarNavigation,
isMobile,
isRTL,
actionButtonDropdownItems,
...props,
}}
/>

View File

@ -1,6 +1,7 @@
import React, { PureComponent } from 'react';
import CaptionsButtonContainer from '/imports/ui/components/captions/button/container';
import deviceInfo from '/imports/utils/deviceInfo';
import * as PluginSdk from 'bigbluebutton-html-plugin-sdk';
import Styled from './styles';
import ActionsDropdown from './actions-dropdown/container';
import AudioCaptionsButtonContainer from '/imports/ui/components/audio/captions/button/container';
@ -12,6 +13,7 @@ import JoinVideoOptionsContainer from '../video-provider/video-button/container'
import PresentationOptionsContainer from './presentation-options/component';
import RaiseHandDropdownContainer from './raise-hand/container';
import { isPresentationEnabled } from '/imports/ui/services/features';
import Button from '/imports/ui/components/common/button/component';
class ActionsBar extends PureComponent {
constructor(props) {
@ -24,12 +26,53 @@ class ActionsBar extends PureComponent {
this.setCaptionsReaderMenuModalIsOpen = this.setCaptionsReaderMenuModalIsOpen.bind(this);
this.setRenderRaiseHand = this.renderRaiseHand.bind(this);
this.actionsBarRef = React.createRef();
this.renderPluginsActionBarItems = this.renderPluginsActionBarItems.bind(this);
}
setCaptionsReaderMenuModalIsOpen(value) {
this.setState({ isCaptionsReaderMenuModalOpen: value })
}
renderPluginsActionBarItems(position) {
const { actionBarItems } = this.props;
return (
<>
{
actionBarItems.filter((plugin) => plugin.position === position).map((plugin, index) => {
let actionBarItemToReturn;
switch (plugin.type) {
case PluginSdk.ActionsBarItemType.BUTTON:
actionBarItemToReturn = (
<Button
key={`${plugin.type}-${plugin.id}`}
onClick={plugin.onClick}
hideLabel
color="primary"
icon={plugin.icon}
size="lg"
circle
label={plugin.tooltip}
/>
);
break;
case PluginSdk.ActionsBarItemType.SEPARATOR:
actionBarItemToReturn = (
<Styled.Separator
key={`${plugin.type}-${plugin.id}`}
/>
);
break;
default:
actionBarItemToReturn = null;
break;
}
return actionBarItemToReturn;
})
}
</>
);
}
renderRaiseHand() {
const {
isReactionsButtonEnabled, isRaiseHandButtonEnabled, setEmojiStatus, currentUser, intl,
@ -138,6 +181,7 @@ class ActionsBar extends PureComponent {
: null }
</Styled.Left>
<Styled.Center>
{this.renderPluginsActionBarItems(PluginSdk.ActionsBarPosition.LEFT)}
<AudioControlsContainer />
{enableVideo
? (
@ -149,7 +193,8 @@ class ActionsBar extends PureComponent {
isMeteorConnected,
}}
/>
{isRaiseHandButtonCentered && this.renderRaiseHand()}
{isRaiseHandButtonCentered && this.renderRaiseHand()}
{this.renderPluginsActionBarItems(PluginSdk.ActionsBarPosition.RIGHT)}
</Styled.Center>
<Styled.Right>
{ shouldShowOptionsButton ?

View File

@ -16,6 +16,7 @@ import TimerService from '/imports/ui/components/timer/service';
import { layoutSelectOutput, layoutDispatch } from '../layout/context';
import { isExternalVideoEnabled, isPollingEnabled, isPresentationEnabled } from '/imports/ui/services/features';
import { isScreenBroadcasting, isCameraAsContentBroadcasting } from '/imports/ui/components/screenshare/service';
import { PluginsContext } from '/imports/ui/components/components-data/plugin-context/context';
import MediaService from '../media/service';
@ -24,6 +25,16 @@ const ActionsBarContainer = (props) => {
const layoutContextDispatch = layoutDispatch();
const usingUsersContext = useContext(UsersContext);
const {
pluginsProvidedAggregatedState,
} = useContext(PluginsContext);
let actionBarItems = [];
if (pluginsProvidedAggregatedState.actionsBarItems) {
actionBarItems = [
...pluginsProvidedAggregatedState.actionsBarItems,
];
}
const { users } = usingUsersContext;
const currentUser = { userId: Auth.userID, emoji: users[Auth.meetingID][Auth.userID].emoji };
@ -40,6 +51,7 @@ const ActionsBarContainer = (props) => {
layoutContextDispatch,
actionsBarStyle,
amIPresenter,
actionBarItems,
}
}
/>

View File

@ -1,10 +1,11 @@
/* eslint-disable @typescript-eslint/ban-types */
import React, { useCallback } from 'react';
import React, { useCallback, useContext } from 'react';
import deviceInfo from '/imports/utils/deviceInfo';
import { defineMessages, useIntl } from 'react-intl';
import { useShortcut } from '/imports/ui/core/hooks/useShortcut';
import BBBMenu from '/imports/ui/components/common/menu/component';
import { MenuSeparatorItemType, MenuOptionItemType } from '/imports/ui/components/common/menu/menuTypes';
import * as PluginSdk from 'bigbluebutton-html-plugin-sdk';
import Styled from '../styles';
import {
handleLeaveAudio,
@ -15,6 +16,7 @@ import {
} from '../service';
import Mutetoggle from './muteToggle';
import ListenOnly from './listenOnly';
import { PluginsContext } from '/imports/ui/components/components-data/plugin-context/context';
const AUDIO_INPUT = 'audioinput';
const AUDIO_OUTPUT = 'audiooutput';
@ -89,6 +91,16 @@ export const LiveSelection: React.FC<LiveSelectionProps> = ({
const leaveAudioShourtcut = useShortcut('leaveAudio');
const {
pluginsProvidedAggregatedState,
} = useContext(PluginsContext);
let audioSettingsDropdownItems = [] as PluginSdk.AudioSettingsDropdownItem[];
if (pluginsProvidedAggregatedState.audioSettingsDropdownItems) {
audioSettingsDropdownItems = [
...pluginsProvidedAggregatedState.audioSettingsDropdownItems,
];
}
const renderDeviceList = useCallback((
deviceKind: string,
list: MediaDeviceInfo[],
@ -194,6 +206,33 @@ export const LiveSelection: React.FC<LiveSelectionProps> = ({
isSeparator: true,
})
.concat(leaveAudioOption);
audioSettingsDropdownItems.forEach((audioSettingsDropdownItem:
PluginSdk.AudioSettingsDropdownItem) => {
switch (audioSettingsDropdownItem.type) {
case PluginSdk.AudioSettingsDropdownItemType.OPTION: {
const audioSettingsDropdownOption = audioSettingsDropdownItem as PluginSdk.AudioSettingsDropdownOption;
dropdownListComplete.push({
label: audioSettingsDropdownOption.label,
iconRight: audioSettingsDropdownOption.icon,
onClick: audioSettingsDropdownOption.onClick,
key: audioSettingsDropdownOption.id,
});
break;
}
case PluginSdk.AudioSettingsDropdownItemType.SEPARATOR: {
const audioSettingsDropdownSeparator = audioSettingsDropdownItem as PluginSdk.AudioSettingsDropdownOption;
dropdownListComplete.push({
isSeparator: true,
key: audioSettingsDropdownSeparator.id,
});
break;
}
default:
break;
}
});
const customStyles = { top: '-1rem' };
const { isMobile } = deviceInfo;
return (

View File

@ -24,7 +24,6 @@ const pulse = keyframes`
// @ts-ignore - as button comes from JS, we can't provide its props
export const MuteToggleButton = styled(Button)`
margin-right: 0.5rem;
${({ ghost }) => ghost && `
span {
box-shadow: none;

Some files were not shown because too many files have changed in this diff Show More