From bed47ff9dfbcbb010f6f271e6810b2110b7e8477 Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Mon, 5 Mar 2018 19:41:04 +0100 Subject: [PATCH 01/54] Remove force debug in LoadingScreenMediator. --- .../air/main/views/LoadingScreenMediator.as | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as index 60e5b6efd6..fbc6826ff8 100755 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as @@ -2,13 +2,12 @@ package org.bigbluebutton.air.main.views { import flash.desktop.NativeApplication; import flash.events.InvokeEvent; - import flash.system.Capabilities; import mx.core.FlexGlobals; import org.bigbluebutton.air.common.PageEnum; - import org.bigbluebutton.air.main.models.IUISession; import org.bigbluebutton.air.main.commands.JoinMeetingSignal; + import org.bigbluebutton.air.main.models.IUISession; import org.bigbluebutton.air.main.models.IUserSession; import robotlegs.bender.bundles.mvcs.Mediator; @@ -36,17 +35,10 @@ package org.bigbluebutton.air.main.views { NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvokeEvent); uiSession.loadingChangeSignal.add(onLoadingChange); onLoadingChange(uiSession.loading, uiSession.loadingMessage); - - // If we are in the Flash Builder debugger the InvokeEvent will never be fired - if (Capabilities.isDebugger) { - //var url:String = "bigbluebutton://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=AIR&meetingID=Demo+Meeting&password=mp&redirect=false&checksum=3fdf56e9915c1031c3ea012b4ec8823cedd7c272"; - var url:String = "bigbluebutton://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=User+2021828&meetingID=Demo+Meeting&password=ap&redirect=true&checksum=8751963df96437c7d435eac8124e4fb3ec147115"; - joinRoom(url); - } } private function onInvokeEvent(invocation:InvokeEvent):void { - if (invocation.arguments.length > 0 && !Capabilities.isDebugger) { + if (invocation.arguments.length > 0) { var url:String = invocation.arguments[0].toString(); if (url.lastIndexOf("://") != -1) { if (userSession.mainConnection) From ffb1c17edf05b2d25d3ee84eb94fac7dd8fd64f6 Mon Sep 17 00:00:00 2001 From: mesutaydemir Date: Mon, 7 May 2018 11:37:25 +0300 Subject: [PATCH 02/54] suggested solution timestamp issue for student role lti integration with blackboard learn Suggested solution for https://groups.google.com/forum/#!topic/bigbluebutton-dev/2q43YPSAu0o --- bbb-lti/grails-app/views/tool/index.gsp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bbb-lti/grails-app/views/tool/index.gsp b/bbb-lti/grails-app/views/tool/index.gsp index ca27d71ca1..2a11cc10ff 100644 --- a/bbb-lti/grails-app/views/tool/index.gsp +++ b/bbb-lti/grails-app/views/tool/index.gsp @@ -30,6 +30,9 @@ + + + @@ -75,6 +78,10 @@ + + + + From 2820178b83ac691ef072690e5a44c1c446040965 Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Sun, 5 Aug 2018 22:36:56 +0100 Subject: [PATCH 03/54] Updated JVM projects dependencies and configuration. --- akka-bbb-apps/build.sbt | 26 +++++------ akka-bbb-apps/project/plugins.sbt | 12 ++--- akka-bbb-fsesl/build.sbt | 38 ++++++++++------ akka-bbb-fsesl/project/plugins.sbt | 12 +++-- akka-bbb-transcode/project/plugins.sbt | 4 ++ bbb-apps-common/build.sbt | 18 ++++---- bbb-apps-common/{publish.sh => deploy.sh} | 1 - bbb-apps-common/project/plugins.sbt | 4 +- bbb-common-message/build.sbt | 8 ++-- bbb-common-message/deploy.sh | 2 +- bbb-common-message/project/plugins.sbt | 7 +-- bbb-common-web/build.sbt | 49 ++++++++++----------- bbb-common-web/project/plugins.sbt | 8 ++-- bbb-fsesl-client/build.gradle | 16 +++---- bbb-fsesl-client/build.sbt | 8 ++-- bbb-fsesl-client/deploy.sh | 2 + bbb-fsesl-client/project/plugins.sbt | 7 ++- bbb-screenshare/app/build.sbt | 18 ++++---- bbb-screenshare/app/deploy.sh | 6 +-- bbb-screenshare/app/project/plugins.sbt | 27 +++++++----- bbb-voice/build.gradle | 12 ++--- bigbluebutton-apps/build.gradle | 10 ++--- bigbluebutton-apps/deploy.sh | 2 +- bigbluebutton-web/build.gradle | 2 +- bigbluebutton-web/pres-checker/build.gradle | 8 ++-- labs/vertx-akka/project/plugins.sbt | 4 ++ 26 files changed, 164 insertions(+), 147 deletions(-) rename bbb-apps-common/{publish.sh => deploy.sh} (97%) mode change 100755 => 100644 create mode 100644 bbb-fsesl-client/deploy.sh diff --git a/akka-bbb-apps/build.sbt b/akka-bbb-apps/build.sbt index 0dfa9f4685..af6c93edc0 100755 --- a/akka-bbb-apps/build.sbt +++ b/akka-bbb-apps/build.sbt @@ -6,7 +6,7 @@ organization := "org.bigbluebutton" version := "0.0.2" -scalaVersion := "2.12.2" +scalaVersion := "2.12.6" scalacOptions ++= Seq( "-unchecked", @@ -38,15 +38,15 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports") -val akkaVersion = "2.5.1" -val scalaTestVersion = "3.0.1" +val akkaVersion = "2.5.14" +val scalaTestVersion = "3.0.5" libraryDependencies ++= { Seq( - "ch.qos.logback" % "logback-classic" % "1.0.13" % "runtime", + "ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime", "junit" % "junit" % "4.11", - "commons-codec" % "commons-codec" % "1.10", - "org.apache.commons" % "commons-lang3" % "3.2" + "commons-codec" % "commons-codec" % "1.11", + "org.apache.commons" % "commons-lang3" % "3.7" ) } @@ -66,14 +66,14 @@ libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % akkaVersion // https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12 libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0" -libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8" -libraryDependencies += "com.google.code.gson" % "gson" % "2.8.0" -libraryDependencies += "joda-time" % "joda-time" % "2.9.9" -libraryDependencies += "io.spray" % "spray-json_2.12" % "1.3.3" +libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11" +libraryDependencies += "com.google.code.gson" % "gson" % "2.8.5" +libraryDependencies += "joda-time" % "joda-time" % "2.10" +libraryDependencies += "io.spray" % "spray-json_2.12" % "1.3.4" libraryDependencies += "org.parboiled" % "parboiled-scala_2.12" % "1.1.8" // https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12 -libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.8.8" +libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6" // For generating test reports @@ -87,7 +87,7 @@ libraryDependencies += "org.scalactic" % "scalactic_2.12" % "3.0.3" % "test" // https://mvnrepository.com/artifact/org.scalatest/scalatest_2.12 libraryDependencies += "org.scalatest" % "scalatest_2.12" % scalaTestVersion % "test" -libraryDependencies += "org.mockito" % "mockito-core" % "2.7.22" % "test" +libraryDependencies += "org.mockito" % "mockito-core" % "2.21.0" % "test" @@ -143,5 +143,3 @@ mappings in Universal <+= (packageBin in Compile, sourceDirectory ) map { (_, sr val logConf = src / "main" / "resources" / "logback.xml" logConf -> "conf/logback.xml" } - -debianPackageDependencies in Debian ++= Seq("java7-runtime-headless", "bash") diff --git a/akka-bbb-apps/project/plugins.sbt b/akka-bbb-apps/project/plugins.sbt index e6f83d0330..ec155bbffc 100755 --- a/akka-bbb-apps/project/plugins.sbt +++ b/akka-bbb-apps/project/plugins.sbt @@ -1,9 +1,11 @@ -addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2") +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") -//addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") - -addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0") +addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.6") + +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") + +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/akka-bbb-fsesl/build.sbt b/akka-bbb-fsesl/build.sbt index 36275f0e26..319345d682 100755 --- a/akka-bbb-fsesl/build.sbt +++ b/akka-bbb-fsesl/build.sbt @@ -6,7 +6,7 @@ organization := "org.bigbluebutton" version := "0.0.1" -scalaVersion := "2.12.2" +scalaVersion := "2.12.6" scalacOptions ++= Seq( "-unchecked", @@ -37,17 +37,17 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports") -val akkaVersion = "2.5.1" +val akkaVersion = "2.5.14" val scalaTestV = "2.2.6" libraryDependencies ++= { Seq( - "ch.qos.logback" % "logback-classic" % "1.0.3", + "ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime", "junit" % "junit" % "4.11", - "commons-codec" % "commons-codec" % "1.10", - "joda-time" % "joda-time" % "2.3", - "org.apache.commons" % "commons-lang3" % "3.2" + "commons-codec" % "commons-codec" % "1.11", + "joda-time" % "joda-time" % "2.10", + "org.apache.commons" % "commons-lang3" % "3.7" )} @@ -56,9 +56,9 @@ libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19 libraryDependencies += "org.bigbluebutton" % "bbb-fsesl-client" % "0.0.6" // https://mvnrepository.com/artifact/org.scala-lang/scala-library -libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2" +libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value // https://mvnrepository.com/artifact/org.scala-lang/scala-compiler -libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2" +libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value // https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12 libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % akkaVersion @@ -72,19 +72,29 @@ libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0" // For generating test reports libraryDependencies += "org.pegdown" % "pegdown" % "1.6.0" % "test" // https://mvnrepository.com/artifact/com.typesafe.akka/akka-testkit_2.12 -libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % "2.5.1" % "test" +libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % "2.5.14" % "test" // https://mvnrepository.com/artifact/org.scalactic/scalactic_2.12 -libraryDependencies += "org.scalactic" % "scalactic_2.12" % "3.0.3" % "test" +libraryDependencies += "org.scalactic" % "scalactic_2.12" % "3.0.5" % "test" // https://mvnrepository.com/artifact/org.scalatest/scalatest_2.12 -libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.3" % "test" +libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.5" % "test" -libraryDependencies += "org.mockito" % "mockito-core" % "2.7.22" % "test" +libraryDependencies += "org.mockito" % "mockito-core" % "2.21.0" % "test" seq(Revolver.settings: _*) -scalariformSettings +import com.typesafe.sbt.SbtScalariform + +import scalariform.formatter.preferences._ +import com.typesafe.sbt.SbtScalariform.ScalariformKeys + +SbtScalariform.defaultScalariformSettings + +ScalariformKeys.preferences := ScalariformKeys.preferences.value + .setPreference(AlignSingleLineCaseStatements, true) + .setPreference(DoubleIndentClassDeclaration, true) + .setPreference(AlignParameters, true) //----------- // Packaging @@ -123,4 +133,4 @@ mappings in Universal <+= (packageBin in Compile, sourceDirectory ) map { (_, sr logConf -> "conf/logback.xml" } -debianPackageDependencies in Debian ++= Seq("java7-runtime-headless", "bash") +debianPackageDependencies in Debian ++= Seq("java8-runtime-headless", "bash") diff --git a/akka-bbb-fsesl/project/plugins.sbt b/akka-bbb-fsesl/project/plugins.sbt index 87ef644864..56e1e39f39 100755 --- a/akka-bbb-fsesl/project/plugins.sbt +++ b/akka-bbb-fsesl/project/plugins.sbt @@ -1,7 +1,11 @@ -addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2") +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") +addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2") -addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") +addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.6") + +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") + +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/akka-bbb-transcode/project/plugins.sbt b/akka-bbb-transcode/project/plugins.sbt index 87ef644864..6fabc00590 100755 --- a/akka-bbb-transcode/project/plugins.sbt +++ b/akka-bbb-transcode/project/plugins.sbt @@ -5,3 +5,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0") + +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") + +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/bbb-apps-common/build.sbt b/bbb-apps-common/build.sbt index 355f55b53d..693e0e360c 100755 --- a/bbb-apps-common/build.sbt +++ b/bbb-apps-common/build.sbt @@ -5,7 +5,7 @@ organization := "org.bigbluebutton" version := "0.0.3-SNAPSHOT" -scalaVersion := "2.12.2" +scalaVersion := "2.12.6" scalacOptions ++= Seq( "-unchecked", @@ -26,14 +26,13 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports") -val scalaV = "2.12.2" -val akkaVersion = "2.5.1" +val akkaVersion = "2.5.14" val scalaTestV = "2.2.6" // https://mvnrepository.com/artifact/org.scala-lang/scala-library -libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2" +libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value // https://mvnrepository.com/artifact/org.scala-lang/scala-compiler -libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2" +libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value // https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12 libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % "2.5.1" @@ -43,18 +42,17 @@ libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % "2.5.1" // https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12 libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0" -libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8" +libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11" libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT" -libraryDependencies += "com.google.code.gson" % "gson" % "2.8.0" +libraryDependencies += "com.google.code.gson" % "gson" % "2.8.5" libraryDependencies += "redis.clients" % "jedis" % "2.9.0" // https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.5" -libraryDependencies += "commons-io" % "commons-io" % "2.4" -libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.3" +libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.7" libraryDependencies += "commons-io" % "commons-io" % "2.4" +libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.6.0" libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.23" % "provided" diff --git a/bbb-apps-common/publish.sh b/bbb-apps-common/deploy.sh old mode 100755 new mode 100644 similarity index 97% rename from bbb-apps-common/publish.sh rename to bbb-apps-common/deploy.sh index 948f563417..ccba754eaa --- a/bbb-apps-common/publish.sh +++ b/bbb-apps-common/deploy.sh @@ -1,3 +1,2 @@ sbt clean sbt publish publishLocal - diff --git a/bbb-apps-common/project/plugins.sbt b/bbb-apps-common/project/plugins.sbt index d6beaa3759..1a99bbcaf4 100755 --- a/bbb-apps-common/project/plugins.sbt +++ b/bbb-apps-common/project/plugins.sbt @@ -4,6 +4,6 @@ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") -//addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2") - +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/bbb-common-message/build.sbt b/bbb-common-message/build.sbt index f659b6d468..29cf68bec6 100755 --- a/bbb-common-message/build.sbt +++ b/bbb-common-message/build.sbt @@ -4,7 +4,7 @@ organization := "org.bigbluebutton" version := "0.0.19-SNAPSHOT" -scalaVersion := "2.12.2" +scalaVersion := "2.12.6" scalacOptions ++= Seq( "-unchecked", @@ -32,9 +32,9 @@ libraryDependencies ++= { )} // https://mvnrepository.com/artifact/org.scala-lang/scala-library -libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2" +libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value // https://mvnrepository.com/artifact/org.scala-lang/scala-compiler -libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2" +libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value libraryDependencies += "junit" % "junit" % "4.12" % "test" libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test" @@ -49,7 +49,7 @@ libraryDependencies += "org.pegdown" % "pegdown" % "1.6.0" % "test" libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.3" % "test" // https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12 -libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.8.8" +libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6" seq(Revolver.settings: _*) diff --git a/bbb-common-message/deploy.sh b/bbb-common-message/deploy.sh index 7884b2f251..ccba754eaa 100755 --- a/bbb-common-message/deploy.sh +++ b/bbb-common-message/deploy.sh @@ -1,2 +1,2 @@ +sbt clean sbt publish publishLocal - diff --git a/bbb-common-message/project/plugins.sbt b/bbb-common-message/project/plugins.sbt index d33e342247..5ab7b095f6 100755 --- a/bbb-common-message/project/plugins.sbt +++ b/bbb-common-message/project/plugins.sbt @@ -1,8 +1,9 @@ -addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2") +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") -addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") +addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") - +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/bbb-common-web/build.sbt b/bbb-common-web/build.sbt index 572a77fdb8..11ff1b07e8 100755 --- a/bbb-common-web/build.sbt +++ b/bbb-common-web/build.sbt @@ -4,7 +4,7 @@ organization := "org.bigbluebutton" version := "0.0.2-SNAPSHOT" -scalaVersion := "2.12.2" +scalaVersion := "2.12.6" scalacOptions ++= Seq( "-unchecked", @@ -25,13 +25,12 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports") -val scalaV = "2.12.2" -val akkaVersion = "2.5.1" +val akkaVersion = "2.5.14" // https://mvnrepository.com/artifact/org.scala-lang/scala-library -libraryDependencies += "org.scala-lang" % "scala-library" % scalaV +libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value // https://mvnrepository.com/artifact/org.scala-lang/scala-compiler -libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaV +libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value // https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12 libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % akkaVersion @@ -41,50 +40,48 @@ libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % akkaVersion // https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12 libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0" -libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8" +libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11" libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT" // https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12 -libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.8.8" +libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6" -libraryDependencies += "redis.clients" % "jedis" % "2.7.2" -libraryDependencies += "com.google.code.gson" % "gson" % "2.5" +libraryDependencies += "redis.clients" % "jedis" % "2.9.0" +libraryDependencies += "com.google.code.gson" % "gson" % "2.8.5" // https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.5" -libraryDependencies += "commons-io" % "commons-io" % "2.4" - -libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.3" -libraryDependencies += "commons-io" % "commons-io" % "2.4" -libraryDependencies += "com.zaxxer" % "nuprocess" % "1.1.0" +libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.7" +libraryDependencies += "commons-io" % "commons-io" % "2.6" +libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.6.0" +libraryDependencies += "com.zaxxer" % "nuprocess" % "1.2.4" // https://mvnrepository.com/artifact/org.jodconverter/jodconverter-core -libraryDependencies += "org.jodconverter" % "jodconverter-core" % "4.0.0-RELEASE" +libraryDependencies += "org.jodconverter" % "jodconverter-local" % "4.2.0" // https://mvnrepository.com/artifact/org.libreoffice/unoil -libraryDependencies += "org.libreoffice" % "unoil" % "5.3.2" +libraryDependencies += "org.libreoffice" % "unoil" % "5.4.2" // https://mvnrepository.com/artifact/org.libreoffice/ridl -libraryDependencies += "org.libreoffice" % "ridl" % "5.3.2" +libraryDependencies += "org.libreoffice" % "ridl" % "5.4.2" // https://mvnrepository.com/artifact/org.libreoffice/juh -libraryDependencies += "org.libreoffice" % "juh" % "5.3.2" +libraryDependencies += "org.libreoffice" % "juh" % "5.4.2" // https://mvnrepository.com/artifact/org.libreoffice/jurt -libraryDependencies += "org.libreoffice" % "jurt" % "5.3.2" +libraryDependencies += "org.libreoffice" % "jurt" % "5.4.2" libraryDependencies += "org.apache.poi" % "poi-ooxml" % "3.17" -libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.5" +libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.25" // https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.3" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" // https://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient -libraryDependencies += "org.apache.httpcomponents" % "httpasyncclient" % "4.1.3" +libraryDependencies += "org.apache.httpcomponents" % "httpasyncclient" % "4.1.4" -libraryDependencies += "org.freemarker" % "freemarker" % "2.3.23" -libraryDependencies += "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.6.3" +libraryDependencies += "org.freemarker" % "freemarker" % "2.3.28" +libraryDependencies += "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.6" // https://mvnrepository.com/artifact/org.codehaus.woodstox/woodstox-core-asl libraryDependencies += "org.codehaus.woodstox" % "woodstox-core-asl" % "4.4.1" @@ -100,7 +97,7 @@ libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % akkaVersion % "test" // https://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_2.12 -libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.12" % "1.0.6" +libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.12" % "1.1.0" seq(Revolver.settings: _*) diff --git a/bbb-common-web/project/plugins.sbt b/bbb-common-web/project/plugins.sbt index 6ce94e5f09..b91f89e4a6 100755 --- a/bbb-common-web/project/plugins.sbt +++ b/bbb-common-web/project/plugins.sbt @@ -1,9 +1,11 @@ -addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2") +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") -addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") +addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") -addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2") +addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.7") +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/bbb-fsesl-client/build.gradle b/bbb-fsesl-client/build.gradle index 845cc2a9dd..ad7449677b 100755 --- a/bbb-fsesl-client/build.gradle +++ b/bbb-fsesl-client/build.gradle @@ -51,17 +51,15 @@ repositories { dependencies { // Logging - compile 'ch.qos.logback:logback-core:1.0.9@jar' - compile 'ch.qos.logback:logback-classic:1.0.9@jar' - compile 'org.slf4j:log4j-over-slf4j:1.7.2@jar' - compile 'org.slf4j:jcl-over-slf4j:1.7.2@jar' - compile 'org.slf4j:jul-to-slf4j:1.7.2@jar' - compile 'org.slf4j:slf4j-api:1.7.2@jar' + compile 'ch.qos.logback:logback-core:1.2.3@jar' + compile 'ch.qos.logback:logback-classic:1.2.3@jar' + compile 'org.slf4j:log4j-over-slf4j:1.7.25@jar' + compile 'org.slf4j:jcl-over-slf4j:1.7.25@jar' + compile 'org.slf4j:jul-to-slf4j:1.7.25@jar' + compile 'org.slf4j:slf4j-api:1.7.25@jar' testRuntime 'junit:junit:4.8.1.@jar' - compile 'org.jboss.netty:netty:3.2.9.Final@jar' - - //compile 'io.netty:netty:3.6.0.Final@jar' + compile 'org.jboss.netty:netty:3.2.10.Final@jar' } diff --git a/bbb-fsesl-client/build.sbt b/bbb-fsesl-client/build.sbt index 8d32b971af..6cc930898e 100755 --- a/bbb-fsesl-client/build.sbt +++ b/bbb-fsesl-client/build.sbt @@ -1,5 +1,3 @@ - - name := "bbb-fsesl-client" description := "BigBlueButton custom FS-ESL client built on top of FS-ESL Java library." @@ -19,9 +17,9 @@ testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/sc libraryDependencies ++= { Seq( - "org.jboss.netty" % "netty" % "3.2.1.Final", - "junit" % "junit" % "4.11", - "ch.qos.logback" % "logback-classic" % "1.0.3" + "org.jboss.netty" % "netty" % "3.2.10.Final", + "junit" % "junit" % "4.12", + "ch.qos.logback" % "logback-classic" % "1.2.3" )} seq(Revolver.settings: _*) diff --git a/bbb-fsesl-client/deploy.sh b/bbb-fsesl-client/deploy.sh new file mode 100644 index 0000000000..a5f14b0d75 --- /dev/null +++ b/bbb-fsesl-client/deploy.sh @@ -0,0 +1,2 @@ +sbt clean +sbt publish publishLocal diff --git a/bbb-fsesl-client/project/plugins.sbt b/bbb-fsesl-client/project/plugins.sbt index edddc9ca18..5ab7b095f6 100755 --- a/bbb-fsesl-client/project/plugins.sbt +++ b/bbb-fsesl-client/project/plugins.sbt @@ -1,6 +1,9 @@ -addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2") +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") -addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") +addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") + +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/bbb-screenshare/app/build.sbt b/bbb-screenshare/app/build.sbt index 7e7f1b96f6..dc47de3ded 100755 --- a/bbb-screenshare/app/build.sbt +++ b/bbb-screenshare/app/build.sbt @@ -8,7 +8,7 @@ organization := "org.bigbluebutton" version := "0.0.2" -scalaVersion := "2.12.2" +scalaVersion := "2.12.6" scalacOptions ++= Seq( "-unchecked", @@ -39,7 +39,7 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports") -val akkaVersion = "2.5.1" +val akkaVersion = "2.5.14" val scalaTestV = "2.2.6" libraryDependencies ++= { @@ -51,10 +51,10 @@ libraryDependencies ++= { "com.typesafe" % "config" % "1.3.0", "ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime", "commons-codec" % "commons-codec" % "1.11", - "redis.clients" % "jedis" % "2.7.2", - "org.apache.commons" % "commons-pool2" % "2.3", + "redis.clients" % "jedis" % "2.9.0", + "org.apache.commons" % "commons-pool2" % "2.6.0", "org.red5" % "red5-server" % "1.0.10-M5", - "com.google.code.gson" % "gson" % "2.5", + "com.google.code.gson" % "gson" % "2.8.5", "org.springframework" % "spring-web" % springVersion, "org.springframework" % "spring-beans" % springVersion, "org.springframework" % "spring-context" % springVersion, @@ -62,19 +62,17 @@ libraryDependencies ++= { "org.springframework" % "spring-webmvc" % springVersion, "org.springframework" % "spring-aop" % springVersion, "javax.servlet" % "servlet-api" % "2.5" - - )} // https://mvnrepository.com/artifact/org.scala-lang/scala-library -libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2" -libraryDependencies += "org.scala-lang" % "scala-reflect" % "2.12.2" +libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value +libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT" // https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12 libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0" // https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12 -libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.8.8" +libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6" //seq(Revolver.settings: _*) // diff --git a/bbb-screenshare/app/deploy.sh b/bbb-screenshare/app/deploy.sh index a008d43127..305fe88e80 100755 --- a/bbb-screenshare/app/deploy.sh +++ b/bbb-screenshare/app/deploy.sh @@ -18,9 +18,9 @@ sudo cp ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/bbb-sc ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/paranamer-2.8.jar \ ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/akka-* \ ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/config-1.3.1.jar \ - ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/gson-2.5.jar \ - ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/jedis-2.7.2.jar \ - ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/commons-pool2-2.3.jar \ + ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/gson-2.8.5.jar \ + ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/jedis-2.9.0.jar \ + ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/commons-pool2-2.6.0.jar \ ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/spring-webmvc-4.3.12.RELEASE.jar \ ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/rediscala_2.12-1.8.0.jar \ ~/dev/bigbluebutton/bbb-screenshare/app/target/webapp/WEB-INF/lib/bbb-common-message_2.12-0.0.19-SNAPSHOT.jar \ diff --git a/bbb-screenshare/app/project/plugins.sbt b/bbb-screenshare/app/project/plugins.sbt index 366f6fd659..1c5c911f1d 100644 --- a/bbb-screenshare/app/project/plugins.sbt +++ b/bbb-screenshare/app/project/plugins.sbt @@ -1,12 +1,15 @@ -addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2") - -addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") - -addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") - -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0") - -addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.1.0") - -//addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.7.9") - +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") + +addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2") + +addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") + +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.6") + +addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.1.0") + +//addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.7.9") + +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") + +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/bbb-voice/build.gradle b/bbb-voice/build.gradle index 68a9cfe0b9..e364181721 100755 --- a/bbb-voice/build.gradle +++ b/bbb-voice/build.gradle @@ -50,20 +50,16 @@ dependencies { providedCompile 'org.springframework:spring-aop:4.3.12.RELEASE@jar' compile 'aopalliance:aopalliance:1.0@jar' - // Testing - compile 'org.easymock:easymock:2.4@jar' - - // Testing - testRuntime 'org.easymock:easymock:2.4@jar' - //redis compile 'redis.clients:jedis:2.9.0' - compile 'org.apache.commons:commons-pool2:2.3' - compile 'com.google.code.gson:gson:2.5' + compile 'org.apache.commons:commons-pool2:2.6.0' + compile 'com.google.code.gson:gson:2.8.5' compile 'org.apache.commons:commons-lang3:3.7' compile 'org.bigbluebutton:bbb-common-message_2.12:0.0.19-SNAPSHOT' + // Testing + testRuntime 'org.easymock:easymock:3.6@jar' } test { diff --git a/bigbluebutton-apps/build.gradle b/bigbluebutton-apps/build.gradle index 3d0ecdcd19..85dc33cbaf 100755 --- a/bigbluebutton-apps/build.gradle +++ b/bigbluebutton-apps/build.gradle @@ -32,7 +32,7 @@ dependencies { // Spring providedCompile 'org.springframework:spring-web:4.3.12.RELEASE@jar' - providedCompile 'org.springframework:spring-beans:4.3.12.RELEASE@jar' + providedCompile 'org.springframework:spring-beans:4.3.12.RELEASE@jar' providedCompile 'org.springframework:spring-context:4.3.12.RELEASE@jar' providedCompile 'org.springframework:spring-core:4.3.13.RELEASE@jar' @@ -54,13 +54,13 @@ dependencies { compile 'aopalliance:aopalliance:1.0@jar' // Testing - compile 'org.easymock:easymock:2.4@jar' + compile 'org.easymock:easymock:3.6@jar' //redis - compile "redis.clients:jedis:2.7.2" - compile 'org.apache.commons:commons-pool2:2.3' + compile "redis.clients:jedis:2.9.0" + compile 'org.apache.commons:commons-pool2:2.6.0' - compile 'com.google.code.gson:gson:2.5' + compile 'com.google.code.gson:gson:2.8.5' providedCompile 'org.apache.commons:commons-lang3:3.7' compile 'org.bigbluebutton:bbb-common-message_2.12:0.0.19-SNAPSHOT' diff --git a/bigbluebutton-apps/deploy.sh b/bigbluebutton-apps/deploy.sh index 83d2945f61..b002c6f858 100755 --- a/bigbluebutton-apps/deploy.sh +++ b/bigbluebutton-apps/deploy.sh @@ -10,7 +10,7 @@ gradle war deploy sudo chown -R red5.red5 /usr/share/red5/webapps # Remove slf4j jar as it conflicts with logging with red5 -FILE=/usr/share/red5/webapps/bigbluebutton/WEB-INF/lib/slf4j-api-1.7.23.jar +FILE=/usr/share/red5/webapps/bigbluebutton/WEB-INF/lib/slf4j-api-1.7.25.jar if [ -f $FILE ] then sudo rm $FILE diff --git a/bigbluebutton-web/build.gradle b/bigbluebutton-web/build.gradle index 3d1b655c40..e896556837 100755 --- a/bigbluebutton-web/build.gradle +++ b/bigbluebutton-web/build.gradle @@ -17,7 +17,7 @@ dependencies { // XML creation speedup - compile 'org.freemarker:freemarker:2.3.23' + compile 'org.freemarker:freemarker:2.3.28' //junit compile 'junit:junit:4.8.2' diff --git a/bigbluebutton-web/pres-checker/build.gradle b/bigbluebutton-web/pres-checker/build.gradle index cb7d4ec82f..c918e98807 100755 --- a/bigbluebutton-web/pres-checker/build.gradle +++ b/bigbluebutton-web/pres-checker/build.gradle @@ -21,10 +21,10 @@ dependencies { compile 'org.apache.poi:poi:3.17@jar' compile 'org.apache.poi:poi-ooxml:3.17@jar' compile 'org.apache.poi:poi-ooxml-schemas:3.17@jar' - compile 'commons-io:commons-io:2.4@jar' - compile 'org.apache.commons:commons-lang3:3.5@jar' - compile 'org.apache.commons:commons-collections4:4.1@jar' - compile 'org.apache.xmlbeans:xmlbeans:2.6.0@jar' + compile 'commons-io:commons-io:2.6@jar' + compile 'org.apache.commons:commons-lang3:3.7@jar' + compile 'org.apache.commons:commons-collections4:4.2@jar' + compile 'org.apache.xmlbeans:xmlbeans:3.0.0@jar' } jar { diff --git a/labs/vertx-akka/project/plugins.sbt b/labs/vertx-akka/project/plugins.sbt index 87ef644864..6fabc00590 100755 --- a/labs/vertx-akka/project/plugins.sbt +++ b/labs/vertx-akka/project/plugins.sbt @@ -5,3 +5,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0") + +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") + +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") From cb152bf864ec6d491b38608ad311a12f40502c08 Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Sun, 5 Aug 2018 22:41:15 +0100 Subject: [PATCH 04/54] Improved java classes code quality. --- ...tionConversionCompletedSysPubMsgHdlr.scala | 2 +- .../core/apps/users/UserLeaveReqMsgHdlr.scala | 1 - .../org/bigbluebutton/common2/util/Util.scala | 6 - .../java/org/bigbluebutton/api/ApiParams.java | 5 + .../org/bigbluebutton/api/MeetingService.java | 149 +++----------- .../api/ParamsProcessorUtil.java | 193 ++++-------------- .../bigbluebutton/api/RecordingService.java | 30 ++- .../main/java/org/bigbluebutton/api/Util.java | 4 + .../org/bigbluebutton/api/domain/Meeting.java | 88 ++++---- .../api/messaging/ReceivedMessageHandler.java | 2 +- .../api/messaging/RedisStorageService.java | 2 +- .../common/messages/MessageBuilder.java | 4 +- .../ConversionMessageConstants.java | 34 +-- .../OfficeToPdfConversionSuccessFilter.java | 8 +- .../PresentationUrlDownloadService.java | 4 +- .../imp/ExternalProcessExecutor.java | 7 +- .../ImageToSwfSlidesGenerationService.java | 4 +- .../imp/Office2PdfPageConverter.java | 4 +- .../imp/Pdf2SwfPageConverter.java | 4 +- .../imp/PdfToSwfSlidesGenerationService.java | 10 +- .../presentation/imp/PngCreatorImp.java | 8 +- .../presentation/imp/TextFileCreatorImp.java | 4 +- .../web/services/KeepAliveService.java | 8 +- .../web/services/RedisStorageService.java | 12 +- .../services/callback/CallbackUrlService.java | 6 +- .../bigbluebutton/api2/domain/Recording.scala | 1 - .../api2/util/RecMetaXmlHelper.scala | 13 +- 27 files changed, 206 insertions(+), 407 deletions(-) delete mode 100755 bbb-common-message/src/main/scala/org/bigbluebutton/common2/util/Util.scala diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationConversionCompletedSysPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationConversionCompletedSysPubMsgHdlr.scala index 6f9cdfe22a..83f1802546 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationConversionCompletedSysPubMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationConversionCompletedSysPubMsgHdlr.scala @@ -4,7 +4,7 @@ import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.core.bus.MessageBus import org.bigbluebutton.core.domain.MeetingState2x import org.bigbluebutton.core.running.LiveMeeting -import org.bigbluebutton.common2.domain.{ PageVO, PresentationVO } +import org.bigbluebutton.common2.domain.{ PageVO } import org.bigbluebutton.core.models.PresentationInPod trait PresentationConversionCompletedSysPubMsgHdlr { diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/UserLeaveReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/UserLeaveReqMsgHdlr.scala index 67e520fa27..657bf9449c 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/UserLeaveReqMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/UserLeaveReqMsgHdlr.scala @@ -1,6 +1,5 @@ package org.bigbluebutton.core.apps.users -import org.bigbluebutton.common2.domain.MeetingStatus import org.bigbluebutton.common2.msgs.UserLeaveReqMsg import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.core.apps.presentationpod.PresentationPodsApp diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/util/Util.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/util/Util.scala deleted file mode 100755 index beb092eec4..0000000000 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/util/Util.scala +++ /dev/null @@ -1,6 +0,0 @@ -package org.bigbluebutton.common2.util - - -object Util { - -} diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java index ca53bce879..e2f9439929 100644 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java @@ -27,10 +27,13 @@ public class ApiParams { public static final String BANNER_COLOR = "bannerColor"; public static final String BANNER_TEXT = "bannerText"; public static final String CHECKSUM = "checksum"; + public static final String COPYRIGHT = "copyright"; public static final String DIAL_NUMBER = "dialNumber"; public static final String DURATION = "duration"; + public static final String FREE_JOIN = "freeJoin"; public static final String GUEST_POLICY = "guestPolicy"; public static final String IS_BREAKOUT = "isBreakout"; + public static final String LOGO = "logo"; public static final String LOGOUT_TIMER = "logoutTimer"; public static final String LOGOUT_URL = "logoutURL"; public static final String MAX_PARTICIPANTS = "maxParticipants"; @@ -38,9 +41,11 @@ public class ApiParams { public static final String META = "meta"; public static final String MODERATOR_ONLY_MESSAGE = "moderatorOnlyMessage"; public static final String MODERATOR_PW = "moderatorPW"; + public static final String MUTE_ON_START = "muteOnStart"; public static final String NAME = "name"; public static final String PARENT_MEETING_ID = "parentMeetingID"; public static final String RECORD = "record"; + public static final String SEQUENCE = "sequence"; public static final String VOICE_BRIDGE = "voiceBridge"; public static final String WEB_VOICE = "webVoice"; public static final String WEBCAMS_ONLY_FOR_MODERATOR = "webcamsOnlyForModerator"; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java index 4e04e8c42b..5ac854fd0a 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java @@ -50,7 +50,6 @@ import org.bigbluebutton.api.messaging.converters.messages.DestroyMeetingMessage import org.bigbluebutton.api.messaging.converters.messages.EndMeetingMessage; import org.bigbluebutton.api.messaging.messages.CreateBreakoutRoom; import org.bigbluebutton.api.messaging.messages.CreateMeeting; -import org.bigbluebutton.api.messaging.messages.EndBreakoutRoom; import org.bigbluebutton.api.messaging.messages.EndMeeting; import org.bigbluebutton.api.messaging.messages.GuestPolicyChanged; import org.bigbluebutton.api.messaging.messages.GuestStatusChangedEventMsg; @@ -78,13 +77,11 @@ import org.bigbluebutton.presentation.PresentationUrlDownloadService; import org.bigbluebutton.web.services.RegisteredUserCleanupTimerTask; import org.bigbluebutton.web.services.callback.CallbackUrlService; import org.bigbluebutton.web.services.callback.MeetingEndedEvent; -import org.bigbluebutton.web.services.turn.StunServer; import org.bigbluebutton.web.services.turn.StunTurnService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.gson.Gson; -import scala.Option; public class MeetingService implements MessageListener { private static Logger log = LoggerFactory.getLogger(MeetingService.class); @@ -222,13 +219,6 @@ public class MeetingService implements MessageListener { return valid; } - private void processMeetingForRemoval(Meeting m) { - kickOffProcessingOfRecording(m); - destroyMeeting(m.getInternalId()); - meetings.remove(m.getInternalId()); - removeUserSessions(m.getInternalId()); - } - private void removeUserSessions(String meetingId) { Iterator> iterator = sessions.entrySet().iterator(); while (iterator.hasNext()) { @@ -367,16 +357,17 @@ public class MeetingService implements MessageListener { message.authed, message.guestStatus); } - public Meeting getMeeting(String meetingId) { - if (meetingId == null) - return null; - for (String key : meetings.keySet()) { - if (key.startsWith(meetingId)) - return meetings.get(key); - } + public Meeting getMeeting(String meetingId) { + if (meetingId == null) + return null; + for (Map.Entry entry : meetings.entrySet()) { + String key = entry.getKey(); + if (key.startsWith(meetingId)) + return entry.getValue(); + } - return null; - } + return null; + } public Collection getMeetingsWithId(String meetingId) { if (meetingId == null) @@ -384,49 +375,39 @@ public class MeetingService implements MessageListener { Collection m = new HashSet<>(); - for (String key : meetings.keySet()) { - if (key.startsWith(meetingId)) - m.add(meetings.get(key)); + for (Map.Entry entry : meetings.entrySet()) { + String key = entry.getKey(); + if (key.startsWith(meetingId)) + m.add(entry.getValue()); } return m; } public Meeting getNotEndedMeetingWithId(String meetingId) { - if (meetingId == null) - return null; - for (String key : meetings.keySet()) { - if (key.startsWith(meetingId)) { - Meeting m = meetings.get(key); - if (!m.isForciblyEnded()) - return m; + if (meetingId == null) + return null; + for (Map.Entry entry : meetings.entrySet()) { + String key = entry.getKey(); + if (key.startsWith(meetingId)) { + Meeting m = entry.getValue(); + if (!m.isForciblyEnded()) + return m; + } } - } - - return null; + return null; } public String getRecordingTextTracks(String recordId) { return recordingService.getRecordingTextTracks(recordId); } - public String putRecordingTextTrack(String recordId, - String kind, - String lang, - File file, - String label, - String origFilename, - String trackId) { + public String putRecordingTextTrack(String recordId, String kind, String lang, File file, String label, + String origFilename, String trackId) { - UploadedTrack track = new UploadedTrack(recordId, - kind, - lang, - label, - origFilename, - file, - trackId, - getCaptionTrackInboxDir()); - return recordingService.putRecordingTextTrack(track); + UploadedTrack track = new UploadedTrack(recordId, kind, lang, label, origFilename, file, trackId, + getCaptionTrackInboxDir()); + return recordingService.putRecordingTextTrack(track); } public String getCaptionTrackInboxDir() { @@ -437,27 +418,6 @@ public class MeetingService implements MessageListener { return recordingService.getRecordings2x(idList, states, metadataFilters); } - - - private int getDurationRecording(String playbackDuration, String end, - String start) { - int duration; - try { - if (!"".equals(playbackDuration)) { - duration = (int) Math - .ceil((Long.parseLong(playbackDuration)) / 60000.0); - } else { - duration = (int) Math.ceil((Long.parseLong(end) - Long - .parseLong(start)) / 60000.0); - } - } catch (Exception e) { - log.debug(e.getMessage()); - duration = 0; - } - - return duration; - } - public boolean existsAnyRecording(List idList) { return recordingService.existAnyRecording(idList); } @@ -488,15 +448,6 @@ public class MeetingService implements MessageListener { recordingService.startIngestAndProcessing(meetingId); } - public boolean isMeetingWithVoiceBridgeExist(String voiceBridge) { - /* - * Collection confs = meetings.values(); for (Meeting c : - * confs) { if (voiceBridge == c.getVoiceBridge()) { return true; } } - */ - return false; - } - - public void endMeeting(String meetingId) { handle(new EndMeeting(meetingId)); } @@ -542,10 +493,6 @@ public class MeetingService implements MessageListener { } } - private void processEndBreakoutRoom(EndBreakoutRoom message) { - processEndMeeting(new EndMeeting(message.breakoutMeetingId)); - } - private void processEndMeeting(EndMeeting message) { gw.endMeeting(new EndMeetingMessage(message.meetingId)); } @@ -636,7 +583,6 @@ public class MeetingService implements MessageListener { log.info("Meeting restarted: data={}", logStr); } - return; } } @@ -659,8 +605,6 @@ public class MeetingService implements MessageListener { String logStr = gson.toJson(logData); log.info("Meeting destroyed: data={}", logStr); - - return; } } @@ -684,16 +628,14 @@ public class MeetingService implements MessageListener { log.info("Meeting ended: data={}", logStr); - String END_CALLBACK_URL = "endCallbackUrl".toLowerCase(); + String endCallbackUrl = "endCallbackUrl".toLowerCase(); Map metadata = m.getMetadata(); - if (metadata.containsKey(END_CALLBACK_URL)) { - String callbackUrl = metadata.get(END_CALLBACK_URL); + if (metadata.containsKey(endCallbackUrl)) { + String callbackUrl = metadata.get(endCallbackUrl); callbackUrlService.handleMessage(new MeetingEndedEvent(callbackUrl)); } processRemoveEndedMeeting(message); - - return; } } @@ -733,10 +675,7 @@ public class MeetingService implements MessageListener { Gson gson = new Gson(); String logStr = gson.toJson(logData); log.info("User joined meeting: data={}", logStr); - - return; } - return; } private void userLeft(UserLeft message) { @@ -775,11 +714,7 @@ public class MeetingService implements MessageListener { } else { log.info("User was not unregistered from meeting because it was not found"); } - - return; } - - return; } } @@ -789,9 +724,7 @@ public class MeetingService implements MessageListener { User user = m.getUserById(message.userId); if (user != null) { user.setStatus(message.status, message.value); - return; } - return; } } @@ -815,23 +748,15 @@ public class MeetingService implements MessageListener { User user = m.getUserById(message.userId); if (user != null) { user.setVoiceJoined(true); - return; } else { if (message.userId.startsWith("v_")) { // A dial-in user joined the meeting. Dial-in users by convention has userId that starts with "v_". - User vuser = new User(message.userId, - message.userId, - message.name, - "DIAL-IN-USER", - "no-avatar-url", - true, - GuestPolicy.ALLOW, - "DIAL-IN"); + User vuser = new User(message.userId, message.userId, message.name, "DIAL-IN-USER", "no-avatar-url", + true, GuestPolicy.ALLOW, "DIAL-IN"); vuser.setVoiceJoined(true); m.userJoined(vuser); } } - return; } } @@ -859,9 +784,7 @@ public class MeetingService implements MessageListener { User user = m.getUserById(message.userId); if (user != null) { user.setListeningOnly(message.listenOnly); - return; } - return; } } @@ -871,9 +794,7 @@ public class MeetingService implements MessageListener { User user = m.getUserById(message.userId); if (user != null) { user.addStream(message.stream); - return; } - return; } } @@ -883,9 +804,7 @@ public class MeetingService implements MessageListener { User user = m.getUserById(message.userId); if (user != null) { user.removeStream(message.stream); - return; } - return; } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java index cbca4a766b..f12134b523 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java @@ -146,142 +146,22 @@ public class ParamsProcessorUtil { errors.missingParamError(ApiParams.MEETING_ID); } } - - public void updateMeeting(Map updateParams, Meeting existing) { - // TODO: Assign new values to meeting. -/* - String meetingName = (String) updateParams.get("name"); - if (meetingName != null) { - existing.setM("name", meetingName); - } - - String viewerPass = params.get("attendeePW"); - if (! StringUtils.isEmpty(viewerPass) ) { - newParams.put("attendeePW", viewerPass); - } - - String modPass = params.get("moderatorPW"); - if (! StringUtils.isEmpty(modPass) ) { - newParams.put("moderatorPW", modPass); - } - - String telVoice = params.get("voiceBridge"); - if (! StringUtils.isEmpty(telVoice) ) { - newParams.put("voiceBridge", telVoice); - } - - String webVoice = params.get("webVoice"); - if (! StringUtils.isEmpty(webVoice)) { - newParams.put("webVoice", webVoice); - } - - String dialNumber = params.get("dialNumber"); - if (! StringUtils.isEmpty(dialNumber)) { - newParams.put("dialNumber", dialNumber); - } - - String logoutUrl = params.get("logoutURL"); - if (! StringUtils.isEmpty(logoutUrl)) { - newParams.put("logoutURL", logoutUrl); - } - - String record = params.get("record"); - if (! StringUtils.isEmpty(record)) { - newParams.put("record", record); - } - - String maxUsers = params.get("maxParticipants"); - if (! StringUtils.isEmpty(maxUsers)) { - newParams.put("maxParticipants", maxUsers); - } - - String meetingDuration = params.get("duration"); - if (! StringUtils.isEmpty(meetingDuration)) { - newParams.put("duration", meetingDuration); - } - - String welcomeMessage = params.get("welcome"); - if (! StringUtils.isEmpty(welcomeMessage)) { - newParams.put("welcome", welcomeMessage); - } - - // Collect metadata for this meeting that the third-party app wants to store if meeting is recorded. - Map meetingInfo = new HashMap(); - for (String key: params.keySet()) { - if (key.contains("meta")){ - String[] meta = key.split("_"); - if(meta.length == 2){ - meetingInfo.put(meta[1], params.get(key)); - } - } - } - - if (! meetingInfo.isEmpty()) { - newParams.put("metadata", meetingInfo); - } -*/ - } public Map processUpdateCreateParams(Map params) { Map newParams = new HashMap<>(); - - // Do we have a meeting name? If not, complain. - String meetingName = params.get(ApiParams.NAME); - if (! StringUtils.isEmpty(meetingName) ) { - newParams.put(ApiParams.NAME, meetingName); - } - - String viewerPass = params.get(ApiParams.ATTENDEE_PW); - if (! StringUtils.isEmpty(viewerPass) ) { - newParams.put(ApiParams.ATTENDEE_PW, viewerPass); - } - - String modPass = params.get(ApiParams.MODERATOR_PW); - if (! StringUtils.isEmpty(modPass) ) { - newParams.put(ApiParams.MODERATOR_PW, modPass); - } - - String telVoice = params.get(ApiParams.VOICE_BRIDGE); - if (! StringUtils.isEmpty(telVoice) ) { - newParams.put(ApiParams.VOICE_BRIDGE, telVoice); - } - - String webVoice = params.get(ApiParams.WEB_VOICE); - if (! StringUtils.isEmpty(webVoice)) { - newParams.put(ApiParams.WEB_VOICE, webVoice); - } - - String dialNumber = params.get(ApiParams.DIAL_NUMBER); - if (! StringUtils.isEmpty(dialNumber)) { - newParams.put(ApiParams.DIAL_NUMBER, dialNumber); - } - - String logoutUrl = params.get(ApiParams.LOGOUT_URL); - if (! StringUtils.isEmpty(logoutUrl)) { - newParams.put(ApiParams.LOGOUT_URL, logoutUrl); - } - - String record = params.get(ApiParams.RECORD); - if (! StringUtils.isEmpty(record)) { - newParams.put(ApiParams.RECORD, record); - } - - String maxUsers = params.get(ApiParams.MAX_PARTICIPANTS); - if (! StringUtils.isEmpty(maxUsers)) { - newParams.put(ApiParams.MAX_PARTICIPANTS, maxUsers); - } - - String meetingDuration = params.get(ApiParams.DURATION); - if (! StringUtils.isEmpty(meetingDuration)) { - newParams.put(ApiParams.DURATION, meetingDuration); - } - - String welcomeMessage = params.get(ApiParams.WELCOME); - if (! StringUtils.isEmpty(welcomeMessage)) { - newParams.put(ApiParams.WELCOME, welcomeMessage); - } - - // Collect metadata for this meeting that the third-party app wants to store if meeting is recorded. + + String[] createParams = { ApiParams.NAME, ApiParams.ATTENDEE_PW, ApiParams.MODERATOR_PW, ApiParams.VOICE_BRIDGE, + ApiParams.WEB_VOICE, ApiParams.DIAL_NUMBER, ApiParams.LOGOUT_URL, ApiParams.RECORD, + ApiParams.MAX_PARTICIPANTS, ApiParams.DURATION, ApiParams.WELCOME }; + + for (String paramName : createParams) { + String parameter = params.get(paramName); + if (!StringUtils.isEmpty(parameter)) { + newParams.put(paramName, parameter); + } + } + + // Collect metadata for this meeting that the third-party application wants to store if meeting is recorded. Map meetingInfo = new HashMap<>(); for (String key: params.keySet()) { if (key.contains(ApiParams.META)){ @@ -448,7 +328,7 @@ public class ParamsProcessorUtil { // meeting, the shared timestamp and the sequence number String timeStamp = StringUtils.substringAfter(internalMeetingId, "-"); String externalHash = DigestUtils - .sha1Hex((parentMeetingId + "-" + timeStamp + "-" + params.get("sequence"))); + .sha1Hex((parentMeetingId + "-" + timeStamp + "-" + params.get(ApiParams.SEQUENCE))); externalMeetingId = externalHash + "-" + timeStamp; } @@ -476,7 +356,7 @@ public class ParamsProcessorUtil { meeting.storeConfig(true, configXML); if (!StringUtils.isEmpty(params.get(ApiParams.MODERATOR_ONLY_MESSAGE))) { - String moderatorOnlyMessageTemplate = params.get("moderatorOnlyMessage"); + String moderatorOnlyMessageTemplate = params.get(ApiParams.MODERATOR_ONLY_MESSAGE); String moderatorOnlyMessage = substituteKeywords(moderatorOnlyMessageTemplate, dialNumber, telVoice, meetingName); meeting.setModeratorOnlyMessage(moderatorOnlyMessage); @@ -492,21 +372,21 @@ public class ParamsProcessorUtil { // Add extra parameters for breakout room if (isBreakout) { - meeting.setSequence(Integer.parseInt(params.get("sequence"))); - meeting.setFreeJoin(Boolean.parseBoolean(params.get("freeJoin"))); + meeting.setSequence(Integer.parseInt(params.get(ApiParams.SEQUENCE))); + meeting.setFreeJoin(Boolean.parseBoolean(params.get(ApiParams.FREE_JOIN))); meeting.setParentMeetingId(parentMeetingId); } - if (!StringUtils.isEmpty(params.get("logo"))) { - meeting.setCustomLogoURL(params.get("logo")); + if (!StringUtils.isEmpty(params.get(ApiParams.LOGO))) { + meeting.setCustomLogoURL(params.get(ApiParams.LOGO)); } - if (!StringUtils.isEmpty(params.get("copyright"))) { - meeting.setCustomCopyright(params.get("copyright")); + if (!StringUtils.isEmpty(params.get(ApiParams.COPYRIGHT))) { + meeting.setCustomCopyright(params.get(ApiParams.COPYRIGHT)); } Boolean muteOnStart = defaultMuteOnStart; - if (!StringUtils.isEmpty(params.get("muteOnStart"))) { - muteOnStart = Boolean.parseBoolean(params.get("muteOnStart")); + if (!StringUtils.isEmpty(params.get(ApiParams.MUTE_ON_START))) { + muteOnStart = Boolean.parseBoolean(params.get(ApiParams.MUTE_ON_START)); } meeting.setMuteOnStart(muteOnStart); @@ -694,20 +574,19 @@ public class ParamsProcessorUtil { return mDuration; } - public boolean isTestMeeting(String telVoice) { - return ((! StringUtils.isEmpty(telVoice)) && - (! StringUtils.isEmpty(testVoiceBridge)) && - (telVoice == testVoiceBridge)); - } + public boolean isTestMeeting(String telVoice) { + return ((!StringUtils.isEmpty(telVoice)) && (!StringUtils.isEmpty(testVoiceBridge)) + && (telVoice.equals(testVoiceBridge))); + } - public String getIntMeetingIdForTestMeeting(String telVoice) { - if ((testVoiceBridge != null) && (telVoice == testVoiceBridge)) { - if (StringUtils.isEmpty(testConferenceMock)) - return testConferenceMock; - } - - return ""; - } + public String getIntMeetingIdForTestMeeting(String telVoice) { + if ((testVoiceBridge != null) && (testVoiceBridge.equals(telVoice)) + && StringUtils.isEmpty(testConferenceMock)) { + return testConferenceMock; + } + + return ""; + } public boolean isConfigXMLChecksumSame(String meetingID, String configXML, String checksum) { if (StringUtils.isEmpty(securitySalt)) { @@ -755,7 +634,7 @@ public class ParamsProcessorUtil { cs = DigestUtils.sha256Hex(data); log.info("SHA256 {}", cs); } - if (cs == null || cs.equals(checksum) == false) { + if (cs == null || !cs.equals(checksum)) { log.info("query string after checksum removed: [{}]", queryString); log.info("checksumError: query string checksum failed. our: [{}], client: [{}]", cs, checksum); return false; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java index 3a50436148..6cae0aee06 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java @@ -46,10 +46,10 @@ import org.slf4j.LoggerFactory; public class RecordingService { private static Logger log = LoggerFactory.getLogger(RecordingService.class); - private String processDir = "/var/bigbluebutton/recording/process"; - private String publishedDir = "/var/bigbluebutton/published"; - private String unpublishedDir = "/var/bigbluebutton/unpublished"; - private String deletedDir = "/var/bigbluebutton/deleted"; + private static String processDir = "/var/bigbluebutton/recording/process"; + private static String publishedDir = "/var/bigbluebutton/published"; + private static String unpublishedDir = "/var/bigbluebutton/unpublished"; + private static String deletedDir = "/var/bigbluebutton/deleted"; private RecordingMetadataReaderHelper recordingServiceHelper; private String recordStatusDir; private String captionsDir; @@ -59,7 +59,7 @@ public class RecordingService { try { FileUtils.copyFile(presFile, dlownloadableFile); } catch (IOException ex) { - log.error("Failed to copy file: " + ex); + log.error("Failed to copy file: {}", ex); } } @@ -71,7 +71,7 @@ public class RecordingService { if (msg.downloadable) { String fileExt = FilenameUtils.getExtension(msg.presFilename); File presFile = new File(presDir.getAbsolutePath() + File.separatorChar + msg.presId + "." + fileExt); - log.info("Make file downloadable. " + downloadableFile.getAbsolutePath()); + log.info("Make file downloadable. {}", downloadableFile.getAbsolutePath()); copyPresentationFile(presFile, downloadableFile); } else { if (downloadableFile.exists()) { @@ -86,13 +86,10 @@ public class RecordingService { } public File getDownloadablePresentationFile(String meetingId, String presId, String presFilename) { - log.info("Find downloadable presentation for meetingId=" + meetingId + " presId=" + presId + " filename=" + presFilename); + log.info("Find downloadable presentation for meetingId={} presId={} filename={}", meetingId, presId, presFilename); File presDir = Util.getPresentationDir(presentationBaseDir, meetingId, presId); - - File downloadableFile = new File(presDir.getAbsolutePath() + File.separatorChar + presFilename); - log.info("Found downloadable presentation file " + downloadableFile.getAbsolutePath()); - return downloadableFile; + return new File(presDir.getAbsolutePath() + File.separatorChar + presFilename); } public void kickOffRecordingChapterBreak(String meetingId, Long timestamp) { @@ -103,9 +100,9 @@ public class RecordingService { try { doneFile.createNewFile(); if (!doneFile.exists()) - log.error("Failed to create file.", done); + log.error("Failed to create {} file.", done); } catch (IOException e) { - log.error("Failed to create {} file", done); + log.error("Exception occured when trying to create {} file", done); } } else { log.error("{} file already exists.", done); @@ -122,7 +119,7 @@ public class RecordingService { if (!doneFile.exists()) log.error("Failed to create {} file.", done); } catch (IOException e) { - log.error("Failed to create {} file.", done); + log.error("Exception occured when trying to create {} file.", done); } } else { log.error("{} file already exists.", done); @@ -170,8 +167,7 @@ public class RecordingService { private RecordingMetadata getRecordingMetadata(File dir) { File file = new File(dir.getPath() + File.separatorChar + "metadata.xml"); - RecordingMetadata rec = recordingServiceHelper.getRecordingMetadata(file); - return rec; + return recordingServiceHelper.getRecordingMetadata(file); } public boolean recordingMatchesMetadata(RecordingMetadata recording, Map metadataFilters) { @@ -579,8 +575,6 @@ public class RecordingService { } } } - - return; } public void updateRecordingMetadata(File srxMetadataXml, Map metaParams, File destMetadataXml) { diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/Util.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/Util.java index 8db607bf1a..1320d2be82 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/Util.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/Util.java @@ -5,6 +5,10 @@ import java.io.File; import org.apache.commons.codec.digest.DigestUtils; public final class Util { + + private Util() { + throw new IllegalStateException("Utility class"); + } public static String generatePresentationId(String name) { long timestamp = System.currentTimeMillis(); diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java index f997a06b41..465459e8f9 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java @@ -416,66 +416,70 @@ public class Meeting { } public User userLeft(String userid){ - return (User) users.remove(userid); + return users.remove(userid); } public User getUserById(String id){ return this.users.get(id); } - public User getUserWithExternalId(String externalUserId) { - for (String key : users.keySet()) { - User u = users.get(key); - if (u.getExternalUserId().equals(externalUserId)) { - return u; - } - } - return null; - } + public User getUserWithExternalId(String externalUserId) { + for (Map.Entry entry : users.entrySet()) { + User u = entry.getValue(); + if (u.getExternalUserId().equals(externalUserId)) { + return u; + } + } + return null; + } + public int getNumUsers(){ return this.users.size(); } - public int getNumModerators(){ - int sum = 0; - for (String key : users.keySet()) { - User u = users.get(key); - if (u.isModerator()) sum++; - } - return sum; - } + public int getNumModerators() { + int sum = 0; + for (Map.Entry entry : users.entrySet()) { + User u = entry.getValue(); + if (u.isModerator()) + sum++; + } + return sum; + } public String getDialNumber() { return dialNumber; } - public int getNumListenOnly() { - int sum = 0; - for (String key : users.keySet()) { - User u = users.get(key); - if (u.isListeningOnly()) sum++; - } - return sum; - } + public int getNumListenOnly() { + int sum = 0; + for (Map.Entry entry : users.entrySet()) { + User u = entry.getValue(); + if (u.isListeningOnly()) + sum++; + } + return sum; + } - public int getNumVoiceJoined() { - int sum = 0; - for (String key : users.keySet()) { - User u = users.get(key); - if (u.isVoiceJoined()) sum++; - } - return sum; - } + public int getNumVoiceJoined() { + int sum = 0; + for (Map.Entry entry : users.entrySet()) { + User u = entry.getValue(); + if (u.isVoiceJoined()) + sum++; + } + return sum; + } - public int getNumVideos() { - int sum = 0; - for (String key : users.keySet()) { - User u = users.get(key); - sum += u.getStreams().size(); - } - return sum; - } + public int getNumVideos() { + int sum = 0; + for (Map.Entry entry : users.entrySet()) { + User u = entry.getValue(); + sum += u.getStreams().size(); + } + return sum; + } public void addUserCustomData(String userID, Map data) { userCustomData.put(userID, data); diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/ReceivedMessageHandler.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/ReceivedMessageHandler.java index f5b66b6dc1..38690c4b1e 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/ReceivedMessageHandler.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/ReceivedMessageHandler.java @@ -46,7 +46,7 @@ public class ReceivedMessageHandler implements IReceivedOldMessageHandler { }; msgProcessorExec.execute(messageProcessor); } catch (Exception e) { - log.error("Error subscribing to channels: {}", e.getMessage()); + log.error("Error subscribing to channels: {}", e); } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/RedisStorageService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/RedisStorageService.java index f5e0f029e1..2045f2e95a 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/RedisStorageService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/RedisStorageService.java @@ -38,7 +38,7 @@ public class RedisStorageService { log.debug("Saving metadata in {}", meetingId); jedis.hmset("meeting:info:" + meetingId, info); } catch (Exception e) { - log.warn("Cannot record the info meeting:" + meetingId, e); + log.warn("Cannot record the info meeting: {}" + meetingId, e); } finally { jedis.close(); } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/common/messages/MessageBuilder.java b/bbb-common-web/src/main/java/org/bigbluebutton/common/messages/MessageBuilder.java index 074d86f2fd..f4fcbfd505 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/common/messages/MessageBuilder.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/common/messages/MessageBuilder.java @@ -2,6 +2,8 @@ package org.bigbluebutton.common.messages; import java.util.concurrent.TimeUnit; +import org.apache.commons.lang3.StringUtils; + import com.google.gson.Gson; public class MessageBuilder { @@ -21,7 +23,7 @@ public class MessageBuilder { header.put(NAME, name); header.put(VERSION, version); header.put(TIMESTAMP, generateTimestamp()); - if (replyTo != null && replyTo != "") + if (!StringUtils.isEmpty(replyTo)) header.put(REPLY_TO, replyTo); return header; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/ConversionMessageConstants.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/ConversionMessageConstants.java index 463d52d2ef..116c4551b6 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/ConversionMessageConstants.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/ConversionMessageConstants.java @@ -20,19 +20,23 @@ package org.bigbluebutton.presentation; public class ConversionMessageConstants { - public static final String OFFICE_DOC_CONVERSION_SUCCESS_KEY = "OFFICE_DOC_CONVERSION_SUCCESS"; - public static final String OFFICE_DOC_CONVERSION_FAILED_KEY = "OFFICE_DOC_CONVERSION_FAILED"; - public static final String OFFICE_DOC_CONVERSION_INVALID_KEY = "OFFICE_DOC_CONVERSION_INVALID"; - public static final String SUPPORTED_DOCUMENT_KEY = "SUPPORTED_DOCUMENT"; - public static final String UNSUPPORTED_DOCUMENT_KEY = "UNSUPPORTED_DOCUMENT"; - public static final String PAGE_COUNT_FAILED_KEY = "PAGE_COUNT_FAILED"; - public static final String PAGE_COUNT_EXCEEDED_KEY = "PAGE_COUNT_EXCEEDED"; - public static final String GENERATED_SLIDE_KEY = "GENERATED_SLIDE"; - public static final String GENERATING_THUMBNAIL_KEY = "GENERATING_THUMBNAIL"; - public static final String GENERATED_THUMBNAIL_KEY = "GENERATED_THUMBNAIL"; - public static final String GENERATING_TEXTFILES_KEY = "GENERATING_TEXTFILES"; - public static final String GENERATED_TEXTFILES_KEY = "GENERATED_TEXTFILES"; - public static final String GENERATING_SVGIMAGES_KEY = "GENERATING_SVGIMAGES"; - public static final String GENERATED_SVGIMAGES_KEY = "GENERATED_SVGIMAGES"; - public static final String CONVERSION_COMPLETED_KEY = "CONVERSION_COMPLETED"; + public static final String OFFICE_DOC_CONVERSION_SUCCESS_KEY = "OFFICE_DOC_CONVERSION_SUCCESS"; + public static final String OFFICE_DOC_CONVERSION_FAILED_KEY = "OFFICE_DOC_CONVERSION_FAILED"; + public static final String OFFICE_DOC_CONVERSION_INVALID_KEY = "OFFICE_DOC_CONVERSION_INVALID"; + public static final String SUPPORTED_DOCUMENT_KEY = "SUPPORTED_DOCUMENT"; + public static final String UNSUPPORTED_DOCUMENT_KEY = "UNSUPPORTED_DOCUMENT"; + public static final String PAGE_COUNT_FAILED_KEY = "PAGE_COUNT_FAILED"; + public static final String PAGE_COUNT_EXCEEDED_KEY = "PAGE_COUNT_EXCEEDED"; + public static final String GENERATED_SLIDE_KEY = "GENERATED_SLIDE"; + public static final String GENERATING_THUMBNAIL_KEY = "GENERATING_THUMBNAIL"; + public static final String GENERATED_THUMBNAIL_KEY = "GENERATED_THUMBNAIL"; + public static final String GENERATING_TEXTFILES_KEY = "GENERATING_TEXTFILES"; + public static final String GENERATED_TEXTFILES_KEY = "GENERATED_TEXTFILES"; + public static final String GENERATING_SVGIMAGES_KEY = "GENERATING_SVGIMAGES"; + public static final String GENERATED_SVGIMAGES_KEY = "GENERATED_SVGIMAGES"; + public static final String CONVERSION_COMPLETED_KEY = "CONVERSION_COMPLETED"; + + private ConversionMessageConstants() { + throw new IllegalStateException("ConversionMessageConstants is a utility class. Instanciation is forbidden."); + } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java index acee925bf6..dab81a405b 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/OfficeToPdfConversionSuccessFilter.java @@ -32,11 +32,10 @@ public class OfficeToPdfConversionSuccessFilter { private final IBbbWebApiGWApp gw; - private static Map conversionMessagesMap; + private static Map conversionMessagesMap = new HashMap(); public OfficeToPdfConversionSuccessFilter(IBbbWebApiGWApp m) { gw = m; - conversionMessagesMap = new HashMap(); conversionMessagesMap.put( ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY, "Office document successfully converted."); @@ -50,8 +49,7 @@ public class OfficeToPdfConversionSuccessFilter { public boolean didConversionSucceed(UploadedPresentation pres) { notifyProgressListener(pres); - return pres - .getConversionStatus() == ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY; + return ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY.equals(pres.getConversionStatus()); } private void notifyProgressListener(UploadedPresentation pres) { @@ -66,7 +64,7 @@ public class OfficeToPdfConversionSuccessFilter { msg.put("message", conversionMessagesMap.get(pres.getConversionStatus())); msg.put("messageKey", pres.getConversionStatus()); - log.info("Notifying of {} for ", pres.getConversionStatus(), pres.getUploadedFile().getAbsolutePath()); + log.info("Notifying of {} for {}", pres.getConversionStatus(), pres.getUploadedFile().getAbsolutePath()); sendProgress(pres); } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java index f20a24bf05..6fa0f289aa 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java @@ -31,7 +31,7 @@ public class PresentationUrlDownloadService { private static Logger log = LoggerFactory .getLogger(PresentationUrlDownloadService.class); - private final int maxRedirects = 5; + private static final int MAX_REDIRECTS = 5; private PageExtractor pageExtractor; private DocumentConversionService documentConversionService; private String presentationBaseURL; @@ -171,7 +171,7 @@ public class PresentationUrlDownloadService { private String followRedirect(String meetingId, String redirectUrl, int redirectCount, String origUrl) { - if (redirectCount > maxRedirects) { + if (redirectCount > MAX_REDIRECTS) { log.error("Max redirect reached for meeting=[{}] with url=[{}]", meetingId, origUrl); return null; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ExternalProcessExecutor.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ExternalProcessExecutor.java index 6ce1efe234..c92943eb4d 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ExternalProcessExecutor.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ExternalProcessExecutor.java @@ -37,10 +37,9 @@ public class ExternalProcessExecutor { private static Logger log = LoggerFactory.getLogger(ExternalProcessExecutor.class); public boolean exec(String COMMAND, long timeoutMillis) { - Timer timer = null; + Timer timer = new Timer(false); Process p = null; try { - timer = new Timer(false); InterruptTimerTask interrupter = new InterruptTimerTask(Thread.currentThread()); timer.schedule(interrupter, timeoutMillis); p = Runtime.getRuntime().exec(COMMAND); @@ -53,7 +52,9 @@ public class ExternalProcessExecutor { } catch(Exception e) { log.info("TIMEDOUT excuting : {}", COMMAND); - p.destroy(); + if (p != null) { + p.destroy(); + } } finally { timer.cancel(); // If the process returns within the timeout period, we have to stop the interrupter // so that it does not unexpectedly interrupt some other code later. diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageToSwfSlidesGenerationService.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageToSwfSlidesGenerationService.java index b1ffb7da4b..64fe4143f3 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageToSwfSlidesGenerationService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageToSwfSlidesGenerationService.java @@ -50,7 +50,7 @@ public class ImageToSwfSlidesGenerationService { private SvgImageCreator svgImageCreator; private ThumbnailCreator thumbnailCreator; private TextFileCreator textFileCreator; - private long MAX_CONVERSION_TIME = 5*60*1000; + private long MAX_CONVERSION_TIME = 5*60*1000L; private String BLANK_SLIDE; public ImageToSwfSlidesGenerationService() { @@ -187,7 +187,7 @@ public class ImageToSwfSlidesGenerationService { } public void setMaxConversionTime(int minutes) { - MAX_CONVERSION_TIME = minutes * 60 * 1000; + MAX_CONVERSION_TIME = minutes * 60 * 1000L; } public void setSwfSlidesGenerationProgressNotifier(SwfSlidesGenerationProgressNotifier notifier) { diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Office2PdfPageConverter.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Office2PdfPageConverter.java index 19d989b97a..6d48511915 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Office2PdfPageConverter.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Office2PdfPageConverter.java @@ -66,10 +66,10 @@ public class Office2PdfPageConverter { logData.put("presId", pres.getId()); logData.put("filename", pres.getName()); logData.put("message", "Failed to convert Office doc to PDF."); - logData.put("exception", e.getMessage()); + logData.put("exception", e); Gson gson = new Gson(); String logStr = gson.toJson(logData); - log.error("-- analytics -- " + logStr); + log.error("-- analytics -- {}", logStr); return false; } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Pdf2SwfPageConverter.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Pdf2SwfPageConverter.java index 43ae858628..c141ac15c9 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Pdf2SwfPageConverter.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Pdf2SwfPageConverter.java @@ -137,7 +137,7 @@ public class Pdf2SwfPageConverter implements PageConverter { log.error("-- analytics -- {}", logStr); } - long pdfStart = System.currentTimeMillis(); + // long pdfStart = System.currentTimeMillis(); // Step 1: Convert a PDF page to PNG using a raw pdftocairo NuProcessBuilder pbPng = new NuProcessBuilder( @@ -159,7 +159,7 @@ public class Pdf2SwfPageConverter implements PageConverter { //long pdfEnd = System.currentTimeMillis(); //log.debug("pdftocairo conversion duration: {} sec", (pdfEnd - pdfStart) / 1000); - long png2swfStart = System.currentTimeMillis(); + // long png2swfStart = System.currentTimeMillis(); // Step 2: Convert a PNG image to SWF // We need to update the file path as pdftocairo adds "-page.png" diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfToSwfSlidesGenerationService.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfToSwfSlidesGenerationService.java index fb4f757302..8810a0434d 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfToSwfSlidesGenerationService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfToSwfSlidesGenerationService.java @@ -54,13 +54,13 @@ public class PdfToSwfSlidesGenerationService { private TextFileCreator textFileCreator; private SvgImageCreator svgImageCreator; - private long MAX_CONVERSION_TIME = 5 * 60 * 1000; + private long MAX_CONVERSION_TIME = 5 * 60 * 1000L; private String BLANK_SLIDE; private int MAX_SWF_FILE_SIZE; private boolean svgImagesRequired; - private boolean generatePngs; + private boolean generatePngs; - private final long CONVERSION_TIMEOUT = 20000000000L; // 20s + private static final long CONVERSION_TIMEOUT = 20000000000L; // 20s public PdfToSwfSlidesGenerationService(int numConversionThreads) { executor = Executors.newFixedThreadPool(numConversionThreads); @@ -190,7 +190,7 @@ public class PdfToSwfSlidesGenerationService { Callable c = new Callable() { public PdfToSwfSlide call() { return slide.createSlide(); - }; + } }; Future f = executor.submit(c); @@ -348,7 +348,7 @@ public class PdfToSwfSlidesGenerationService { } public void setMaxConversionTime(int minutes) { - MAX_CONVERSION_TIME = minutes * 60 * 1000; + MAX_CONVERSION_TIME = minutes * 60 * 1000L; } public void setSwfSlidesGenerationProgressNotifier( diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java index 9ae9c14825..de9f1edfba 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java @@ -40,7 +40,7 @@ public class PngCreatorImp implements PngCreator { private String BLANK_PNG; private int slideWidth = 800; - private static String TEMP_PNG_NAME = "temp-png"; + private static final String TEMP_PNG_NAME = "temp-png"; public boolean createPng(UploadedPresentation pres) { boolean success = false; @@ -87,7 +87,7 @@ public class PngCreatorImp implements PngCreator { Gson gson = new Gson(); String logStr = gson.toJson(logData); - log.warn("-- analytics -- " + logStr); + log.warn("-- analytics -- {}", logStr); } return false; @@ -116,7 +116,7 @@ public class PngCreatorImp implements PngCreator { // 2. 1 ---> what we are interested in // 3. .png // We are interested in the second match. - int pageNum = Integer.valueOf(matcher.group(2).trim()).intValue(); + int pageNum = Integer.parseInt(matcher.group(2).trim()); String newFilename = "slide-" + (pageNum) + ".png"; File renamedFile = new File( dir.getAbsolutePath() + File.separator + newFilename); @@ -140,7 +140,7 @@ public class PngCreatorImp implements PngCreator { for (int i = 0; i < pageCount; i++) { File png = new File(pngsDir.getAbsolutePath() + File.separator + TEMP_PNG_NAME + "-" + i + ".png"); if (!png.exists()) { - log.info("Copying blank png for slide " + i); + log.info("Copying blank png for slide {}", i); copyBlankPng(png); } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/TextFileCreatorImp.java b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/TextFileCreatorImp.java index 24169a9a30..067b7aa8cd 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/TextFileCreatorImp.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/TextFileCreatorImp.java @@ -78,13 +78,13 @@ public class TextFileCreatorImp implements TextFileCreator { writer = new BufferedWriter(new FileWriter(file)); writer.write(text); } catch (IOException e) { - log.error("Error: " + e.getMessage()); + log.error("Error: {}", e); success = false; } finally { try { writer.close(); } catch (IOException e) { - log.error("Error: " + e.getMessage()); + log.error("Error: {}", e); success = false; } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/KeepAliveService.java b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/KeepAliveService.java index 494f7a15fa..3c73e65966 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/KeepAliveService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/KeepAliveService.java @@ -34,10 +34,10 @@ import org.slf4j.LoggerFactory; public class KeepAliveService implements MessageListener { private static Logger log = LoggerFactory.getLogger(KeepAliveService.class); - private final String KEEP_ALIVE_REQUEST = "KEEP_ALIVE_REQUEST"; + private static final String KEEP_ALIVE_REQUEST = "KEEP_ALIVE_REQUEST"; private IBbbWebApiGWApp gw; private long runEvery = 10000; - private int maxLives = 5; + private static int maxLives = 5; private KeepAliveTask task = new KeepAliveTask(); private volatile boolean processMessages = false; @@ -52,7 +52,7 @@ public class KeepAliveService implements MessageListener { private Long lastKeepAliveMessage = 0L; - private final String SYSTEM = "BbbWeb"; + private static final String SYSTEM = "BbbWeb"; public void start() { scheduledThreadPool.scheduleWithFixedDelay(task, 5000, runEvery, TimeUnit.MILLISECONDS); @@ -145,7 +145,7 @@ public class KeepAliveService implements MessageListener { } private void handleKeepAliveReply(String system, Long timestamp) { - if ("BbbWeb".equals(system)) { + if (SYSTEM.equals(system)) { KeepAlivePong pong = new KeepAlivePong(system, timestamp); queueMessage(pong); } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/RedisStorageService.java b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/RedisStorageService.java index f941fde056..3a45aedfd1 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/RedisStorageService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/RedisStorageService.java @@ -30,14 +30,14 @@ import redis.clients.jedis.JedisPool; public class RedisStorageService implements IStorageService{ JedisPool jedisPool; - private final String SEPARATOR = ":"; - private final String ID_SEED = "nextID"; + private static final String SEPARATOR = ":"; + private static final String ID_SEED = "nextID"; /* Meeting Patterns */ - private final String MEETING = "meeting"; - private final String POLL = "poll"; - private final String POLL_ANSWER = "answer"; - private final String POLL_RESULTS = "results"; + private static final String MEETING = "meeting"; + private static final String POLL = "poll"; + private static final String POLL_ANSWER = "answer"; + private static final String POLL_RESULTS = "results"; /* meeting::poll:list [1,2,3] <-- list diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java index 8044f00e88..3bcb1758b1 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java @@ -25,7 +25,7 @@ public class CallbackUrlService { private BlockingQueue receivedMessages = new LinkedBlockingQueue(); private volatile boolean processMessage = false; - private final int maxRedirects = 5; + private static final int MAX_REDIRECTS = 5; private final Executor msgProcessorExec = Executors.newSingleThreadExecutor(); private final Executor runExec = Executors.newSingleThreadExecutor(); @@ -55,7 +55,7 @@ public class CallbackUrlService { }; msgProcessorExec.execute(messageProcessor); } catch (Exception e) { - log.error("Error subscribing to channels: " + e.getMessage()); + log.error("Error subscribing to channels: {}", e); } } @@ -77,7 +77,7 @@ public class CallbackUrlService { private String followRedirect(String redirectUrl, int redirectCount, String origUrl) { - if (redirectCount > maxRedirects) { + if (redirectCount > MAX_REDIRECTS) { log.error("Max redirect reached for callback url=[{}]", origUrl); return null; } diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala index ee8b408443..665452bf2e 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala @@ -136,7 +136,6 @@ object RecMeta { val meta = getMeta(metaXml) val playback = getPlayback(metaXml) val breakout = getBreakout(metaXml) - val breakoutRoom = getBreakout(metaXml) val breakoutRooms = getBreakoutRooms(metaXml) val meetingId = meeting match { diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala index 1b8b648449..d8fbcebcbd 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala @@ -6,7 +6,6 @@ import java.nio.charset.StandardCharsets import java.util import com.google.gson.Gson -import org.apache.commons.io.FileUtils import org.bigbluebutton.api.domain.RecordingMetadata import org.bigbluebutton.api2.RecordingServiceGW import org.bigbluebutton.api2.domain._ @@ -15,16 +14,14 @@ import scala.xml.{Elem, PrettyPrinter, XML} import scala.collection.JavaConverters._ import scala.collection.mutable.{Buffer, ListBuffer, Map} import scala.collection.Iterable -import scala.collection.JavaConversions._ + +import java.io.IOException +import java.nio.charset.Charset +import java.nio.file.Files +import java.nio.file.Paths class RecMetaXmlHelper extends RecordingServiceGW with LogHelper { - import java.io.IOException - import java.nio.charset.Charset - import java.nio.file.Files - import java.nio.file.Paths - - val SUCCESS = "SUCCESS" val FAILED = "FAILED" val CAPTIONS_FILE = "captions.json" From ba6e7ad0f3aa8582d74b24dca62063aca92975eb Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Tue, 7 Aug 2018 10:02:26 +0100 Subject: [PATCH 05/54] Minor java improvements. --- .../org/bigbluebutton/api/MeetingService.java | 6 +---- .../api/ParamsProcessorUtil.java | 20 +++++++------- .../bigbluebutton/api/RecordingService.java | 2 +- .../services/callback/CallbackUrlService.java | 26 +++++++++---------- 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java index 5ac854fd0a..7e93392a34 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java @@ -20,7 +20,6 @@ package org.bigbluebutton.api; import java.io.File; import java.util.AbstractMap; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; @@ -414,7 +413,7 @@ public class MeetingService implements MessageListener { return recordingService.getCaptionTrackInboxDir(); } - public String getRecordings2x(ArrayList idList, ArrayList states, Map metadataFilters) { + public String getRecordings2x(List idList, List states, Map metadataFilters) { return recordingService.getRecordings2x(idList, states, metadataFilters); } @@ -771,10 +770,7 @@ public class MeetingService implements MessageListener { } else { user.setVoiceJoined(false); } - - return; } - return; } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java index f12134b523..c2799bab3c 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java @@ -163,11 +163,11 @@ public class ParamsProcessorUtil { // Collect metadata for this meeting that the third-party application wants to store if meeting is recorded. Map meetingInfo = new HashMap<>(); - for (String key: params.keySet()) { - if (key.contains(ApiParams.META)){ - String[] meta = key.split("_"); + for (Map.Entry entry : params.entrySet()) { + if (entry.getKey().contains(ApiParams.META)){ + String[] meta = entry.getKey().split("_"); if(meta.length == 2){ - meetingInfo.put(meta[1], params.get(key)); + meetingInfo.put(meta[1], entry.getValue()); } } } @@ -184,7 +184,7 @@ public class ParamsProcessorUtil { Matcher metaMatcher = META_VAR_PATTERN.matcher(param); if (metaMatcher.matches()) { return true; - } + } return false; } @@ -194,12 +194,12 @@ public class ParamsProcessorUtil { public static Map processMetaParam(Map params) { Map metas = new HashMap<>(); - for (String key : params.keySet()) { - if (isMetaValid(key)) { + for (Map.Entry entry : params.entrySet()) { + if (isMetaValid(entry.getKey())) { // Need to lowercase to maintain backward compatibility with // 0.81 - String metaName = removeMetaString(key).toLowerCase(); - metas.put(metaName, params.get(key)); + String metaName = removeMetaString(entry.getKey()).toLowerCase(); + metas.put(metaName, params.get(entry.getValue())); } } @@ -643,7 +643,7 @@ public class ParamsProcessorUtil { return true; } - public boolean isPostChecksumSame(String apiCall, HashMap params) { + public boolean isPostChecksumSame(String apiCall, Map params) { if (StringUtils.isEmpty(securitySalt)) { log.warn("Security is disabled in this service. Make sure this is intentional."); return true; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java index 6cae0aee06..57d5f2761a 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java @@ -159,7 +159,7 @@ public class RecordingService { return recordingServiceHelper.putRecordingTextTrack(track); } - public String getRecordings2x(ArrayList idList, ArrayList states, Map metadataFilters) { + public String getRecordings2x(List idList, List states, Map metadataFilters) { List recsList = getRecordingsMetadata(idList, states); ArrayList recs = filterRecordingsByMetadata(recsList, metadataFilters); return recordingServiceHelper.getRecordings2x(recs); diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java index 3bcb1758b1..f918896f51 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/web/services/callback/CallbackUrlService.java @@ -1,23 +1,21 @@ package org.bigbluebutton.web.services.callback; -import org.apache.http.HttpResponse; -import org.apache.http.HttpStatus; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.entity.ContentType; -import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; -import org.apache.http.impl.nio.client.HttpAsyncClients; -import org.apache.http.nio.client.methods.HttpAsyncMethods; -import org.apache.http.nio.client.methods.ZeroCopyConsumer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; import java.io.IOException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; -import java.util.concurrent.*; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.LinkedBlockingQueue; + +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; +import org.apache.http.impl.nio.client.HttpAsyncClients; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class CallbackUrlService { private static Logger log = LoggerFactory.getLogger(CallbackUrlService.class); From 25834dd4f8d3728af6626db1c7ae1892936822fe Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Mon, 13 Aug 2018 16:29:38 -0300 Subject: [PATCH 06/54] zoom calc based in flash --- .../imports/api/slides/server/methods.js | 4 +- .../ui/components/presentation/component.jsx | 10 ++- .../presentation-overlay/component.jsx | 82 +++++++++++++++++++ .../presentation-overlay/container.jsx | 7 +- .../presentation-toolbar/component.jsx | 25 +++++- .../presentation-toolbar/container.jsx | 2 + .../presentation-toolbar/service.js | 6 ++ .../presentation-toolbar/styles.scss | 1 + .../private/config/settings-development.json | 3 +- 9 files changed, 134 insertions(+), 6 deletions(-) diff --git a/bigbluebutton-html5/imports/api/slides/server/methods.js b/bigbluebutton-html5/imports/api/slides/server/methods.js index 5d69c6254d..8721201581 100644 --- a/bigbluebutton-html5/imports/api/slides/server/methods.js +++ b/bigbluebutton-html5/imports/api/slides/server/methods.js @@ -1,7 +1,9 @@ import { Meteor } from 'meteor/meteor'; import mapToAcl from '/imports/startup/mapToAcl'; import switchSlide from './methods/switchSlide'; +import zoomSlide from './methods/zoomSlide'; -Meteor.methods(mapToAcl(['methods.switchSlide'], { +Meteor.methods(mapToAcl(['methods.switchSlide', 'methods.zoomSlide'], { switchSlide, + zoomSlide, })); diff --git a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx index e94cbe9105..4aa98df2b3 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx @@ -148,7 +148,8 @@ export default class PresentationArea extends Component { viewBoxHeight, imageUri, } = slideObj.calculatedData; - + console.log(x, y); + return (
diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx index 176cb950a8..e0f81ab95b 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx @@ -2,6 +2,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; const CURSOR_INTERVAL = 16; +const MYSTERY_NUM = 2; +const HUNDRED_PERCENT = 100; export default class PresentationOverlay extends Component { constructor(props) { @@ -17,6 +19,9 @@ export default class PresentationOverlay extends Component { // id of the setInterval() this.intervalId = 0; + this.state = { + zoomValue: 100, + }; // Mobile Firefox has a bug where e.preventDefault on touchstart doesn't prevent // onmousedown from triggering right after. Thus we have to track it manually. @@ -35,6 +40,7 @@ export default class PresentationOverlay extends Component { this.mouseOutHandler = this.mouseOutHandler.bind(this); this.getTransformedSvgPoint = this.getTransformedSvgPoint.bind(this); this.svgCoordinateToPercentages = this.svgCoordinateToPercentages.bind(this); + this.mouseZoomHandler = this.mouseZoomHandler.bind(this); } // transforms the coordinate from window coordinate system // to the main svg coordinate system @@ -46,6 +52,7 @@ export default class PresentationOverlay extends Component { // transform a screen point to svg point const CTM = svgObject.getScreenCTM(); + return screenPoint.matrixTransform(CTM.inverse()); } @@ -56,6 +63,7 @@ export default class PresentationOverlay extends Component { const { currentClientX, currentClientY } = this; // retrieving a transformed coordinate let transformedSvgPoint = this.getTransformedSvgPoint(currentClientX, currentClientY); + // determining the cursor's coordinates as percentages from the slide's width/height transformedSvgPoint = this.svgCoordinateToPercentages(transformedSvgPoint); // updating last sent raw coordinates @@ -82,6 +90,78 @@ export default class PresentationOverlay extends Component { } + mouseZoomHandler(e) { + // calc for sliderZoom + // zoomSlide(zoom, (((slideLoader.content.width/2)*SlideViewModel.HUNDRED_PERCENT)/zoom), (((slideLoader.content.height/2)*SlideViewModel.HUNDRED_PERCENT)/zoom)); + const { + zoomSlide, + podId, + currentSlideNum, + slideWidth, + slideHeight, + adjustedSizes + } = this.props; + + const mouseX = e.clientX; + const mouseY = e.clientY; + + // console.error('event', x,y); + const _pageOrigW = slideWidth; + const _pageOrigH = slideHeight; + const viewportW = adjustedSizes.width; + const viewportH = adjustedSizes.height; + + let _calcPageW = viewportW/(100/HUNDRED_PERCENT); + let _calcPageH = viewportH/(100/HUNDRED_PERCENT); + let _calcPageX = (0/HUNDRED_PERCENT) * _calcPageW; + let _calcPageY = (0/HUNDRED_PERCENT) * _calcPageH; + + const svgPosition = this.getTransformedSvgPoint(mouseX, mouseY); + const svgPercentage = this.svgCoordinateToPercentages(svgPosition); + + // console.error('svgPosition', svgPosition.x, svgPosition.y); + // console.error('svgPercentage', svgPercentage.x, svgPercentage.y); + + const relXcoordInPage = (svgPercentage.x) / 100; + const relYcoordInPage = (svgPercentage.y) / 100; + + const zoomValue = this.state.zoomValue + 5; + + console.error(zoomValue); + console.error(mouseX, mouseY); + + _calcPageW = viewportW * zoomValue / HUNDRED_PERCENT; + _calcPageH = (_calcPageW / _pageOrigW) * _pageOrigH; + + console.error(_calcPageW, _calcPageH); + + const absXcoordInPage = relXcoordInPage * _calcPageW; + const absYcoordInPage = relYcoordInPage * _calcPageH; + + console.error(mouseX, mouseY); + console.error(svgPosition.x, svgPosition.y); + console.error(relXcoordInPage, relYcoordInPage); + console.error(absXcoordInPage, absYcoordInPage); + + _calcPageX = (absXcoordInPage - mouseX) / MYSTERY_NUM; + _calcPageY = (absYcoordInPage - mouseY) / MYSTERY_NUM; + + const offsetX = (_calcPageX * 100) / _calcPageW; + const offsetY = (_calcPageX * 100) / _calcPageW; + console.error(`(${_calcPageX} * 100) / ${_calcPageW}`, offsetX); + console.error(`(${_calcPageY} * 100) / ${_calcPageH}`, offsetY); + + this.setState( + { zoomValue }, + () => zoomSlide(currentSlideNum, podId, + (this.state.zoomValue - 100) - 100, + offsetX, + offsetY + ) + ); + } + + handleTouchStart(event) { // to prevent default behavior (scrolling) on devices (in Safari), when you draw a text box event.preventDefault(); @@ -201,6 +281,8 @@ export default class PresentationOverlay extends Component { onMouseOut={this.mouseOutHandler} onMouseEnter={this.mouseEnterHandler} onMouseMove={this.mouseMoveHandler} + onWheel={this.mouseZoomHandler} + onBlur={() => {}} style={{ width: '100%', height: '100%', touchAction: 'none' }} > {this.props.children} diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx index 89f5e39c6f..6665175b27 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { withTracker } from 'meteor/react-meteor-data'; import PresentationOverlayService from './service'; +import PresentationToolbarService from '../presentation-toolbar/service'; import PresentationOverlay from './component'; const PresentationOverlayContainer = ({ children, ...rest }) => ( @@ -10,8 +11,12 @@ const PresentationOverlayContainer = ({ children, ...rest }) => ( ); -export default withTracker(() => ({ +export default withTracker(({ podId, currentSlideNum, slide }) => ({ + slide, + podId, + currentSlideNum, updateCursor: PresentationOverlayService.updateCursor, + zoomSlide: PresentationToolbarService.zoomSlide, }))(PresentationOverlayContainer); PresentationOverlayContainer.propTypes = { diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx index 170b194e34..87627e8ea8 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx @@ -125,6 +125,7 @@ class PresentationToolbar extends Component { this.state = { sliderValue: 100 }; this.handleValuesChange = this.handleValuesChange.bind(this); this.handleSkipToSlideChange = this.handleSkipToSlideChange.bind(this); + this.handleZoom = this.handleZoom.bind(this); } handleSkipToSlideChange(event) { @@ -133,7 +134,10 @@ class PresentationToolbar extends Component { } handleValuesChange(event) { - this.setState({ sliderValue: event.target.value }); + this.setState({ sliderValue: event.target.value }, () => this.handleZoom(this.state.sliderValue)); + } + handleZoom(value) { + this.props.actions.zoomSlideHandler(value); } fitToWidthClickHandler() { @@ -216,6 +220,25 @@ class PresentationToolbar extends Component { hideLabel className={styles.skipSlide} /> +
100%
+ +
400%
+ {/* Fit to width button
); } From 09d0a620769a8f519d64eb8141d7e0e3c17608bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Francisco=20Siebel?= Date: Wed, 19 Sep 2018 11:00:36 -0300 Subject: [PATCH 36/54] Remove settings files --- .../private/config/settings-development.json | 401 ------------------ .../private/config/settings-production.json | 401 ------------------ 2 files changed, 802 deletions(-) delete mode 100755 bigbluebutton-html5/private/config/settings-development.json delete mode 100755 bigbluebutton-html5/private/config/settings-production.json diff --git a/bigbluebutton-html5/private/config/settings-development.json b/bigbluebutton-html5/private/config/settings-development.json deleted file mode 100755 index 710c0984c5..0000000000 --- a/bigbluebutton-html5/private/config/settings-development.json +++ /dev/null @@ -1,401 +0,0 @@ -{ - "public": { - - "app": { - "mobileFont": 16, - "desktopFont": 14, - "audioChatNotification": false, - "autoJoin": true, - "listenOnlyMode": true, - "forceListenOnly": false, - "skipCheck": false, - "clientTitle": "BigBlueButton", - "appName": "BigBlueButton HTML5 Client", - "bbbServerVersion": "2.0-rc", - "copyright": "©2018 BigBlueButton Inc.", - "html5ClientBuild": "HTML5_CLIENT_VERSION", - "lockOnJoin": true, - "basename": "/html5client", - "askForFeedbackOnLogout": false, - "defaultSettings": { - "application": { - "chatAudioAlerts": false, - "chatPushAlerts": false, - "fontSize": "16px", - "fallbackLocale": "en" - }, - "audio": { - "inputDeviceId": "undefined", - "outputDeviceId": "undefined" - }, - "dataSaving": { - "viewParticipantsWebcams": true, - "viewScreenshare": true - }, - "cc": { - "backgroundColor": "#FFFFFF", - "fontColor": "#000000", - "enabled": false, - "fontFamily": "Calibri", - "fontSize": "16px", - "takeOwnership": false - }, - "participants": { - "muteAll": false, - "lockAll": false, - "microphone": false, - "publicChat": false, - "privateChat": false, - "layout": false - } - }, - "shortcuts": { - "openOptions": {"accesskey": "O", "descId": "openOptions"}, - "toggleUserList": {"accesskey": "U", "descId": "toggleUserList"}, - "toggleMute": {"accesskey": "M", "descId": "toggleMute"}, - "joinAudio": {"accesskey": "J", "descId": "joinAudio"}, - "leaveAudio": {"accesskey": "L", "descId": "leaveAudio"}, - "togglePublicChat": {"accesskey": "P", "descId": "togglePublicChat"}, - "hidePrivateChat": {"accesskey": "H", "descId": "hidePrivateChat"}, - "closePrivateChat": {"accesskey": "G", "descId": "closePrivateChat"}, - "openActions": {"accesskey": "A", "descId": "openActions"}, - "openStatus": {"accesskey": "S", "descId": "openStatus"} - }, - "branding": { - "displayBrandingArea": false - }, - "allowHTML5Moderator": true, - "allowModeratorToUnmuteAudio": true, - "httpsConnection": false, - "connectionTimeout": 60000, - "showHelpButton": true - }, - - "kurento": { - "wsUrl": "HOST", - "chromeDefaultExtensionKey": "akgoaoikmbmhcopjgakkcepdgdgkjfbc", - "chromeDefaultExtensionLink": "https://chrome.google.com/webstore/detail/bigbluebutton-screenshare/akgoaoikmbmhcopjgakkcepdgdgkjfbc", - "chromeExtensionKey": "KEY", - "chromeExtensionLink": "LINK", - "chromeScreenshareSources": ["window", "screen"], - "firefoxScreenshareSource": "window", - "cameraConstraints": { - "width": { - "max": 640 - }, - "height": { - "max": 480 - } - }, - "enableScreensharing": false, - "enableVideo": false, - "enableVideoStats": false, - "enableListenOnly": false - }, - - "acl": { - "viewer": { - "subscriptions": [ - "users", - "cursor", - "screenshare", - "meetings", - "polls", - "chat", - "presentations", - "annotations", - "slides", - "captions", - "breakouts", - "voiceUsers", - "whiteboard-multi-user", - "presentation-pods", - "group-chat", - "group-chat-msg" - ], - "methods": [ - "listenOnlyToggle", - "userLogout", - "setEmojiStatus", - "toggleSelfVoice", - "publishVote", - "sendChat", - "createGroupChat", - "destroyGroupChat", - "sendGroupChatMsg" - ] - }, - "moderator": { - "methods": [ - "assignPresenter", - "removeUser", - "muteUser", - "unmuteUser", - "endMeeting", - "toggleVoice", - "clearPublicChatHistory", - "changeRole", - "ejectUserFromVoice", - "toggleRecording" - ] - }, - "presenter": { - "methods": [ - "assignPresenter", - "switchSlide", - "modifyWhiteboardAccess", - "undoAnnotation", - "clearWhiteboard", - "moveCursor", - "sendAnnotation", - "removePresentation", - "setPresentation", - "requestPresentationUploadToken" - ] - } - }, - - "chat": { - "min_message_length": 1, - "max_message_length": 5000, - "grouping_messages_window": 10000, - "type_system": "SYSTEM_MESSAGE", - "type_public": "PUBLIC_ACCESS", - "type_private": "PRIVATE_ACCESS", - "system_userid": "SYSTEM_MESSAGE", - "system_username": "SYSTEM_MESSAGE", - "public_id": "public", - "public_group_id": "MAIN-PUBLIC-GROUP-CHAT", - "public_userid": "public_chat_userid", - "public_username": "public_chat_username", - "storage_key": "UNREAD_CHATS", - "path_route": "users/chat/", - "system_messages_keys": { - "chat_clear": "PUBLIC_CHAT_CLEAR" - } - }, - - "media": { - "WebRTCHangupRetryInterval": 2000, - "vertoServerAddress": "HOST", - "freeswitchProfilePassword": "1234", - "vertoPort": "8082", - "useSIPAudio": true, - "stunTurnServersFetchAddress": "/bigbluebutton/api/stuns", - "mediaTag": "#remote-media", - "callTransferTimeout": 5000, - "callHangupTimeout": 2000, - "callHangupMaximumRetries": 10, - "echoTestNumber": "9196" - }, - - "presentation": { - "defaultPresentationFile": "default.pdf", - "uploadEndpoint": "/bigbluebutton/presentation/upload", - "uploadSizeMin": 0, - "uploadSizeMax": 50000000, - "uploadValidMimeTypes": [ - "application/vnd.ms-excel", - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", - "application/msword", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - "application/vnd.ms-powerpoint", - "application/vnd.openxmlformats-officedocument.presentationml.presentation", - "application/vnd.oasis.opendocument.text", - "application/rtf", - "text/plain", - "application/vnd.oasis.opendocument.spreadsheet", - "application/vnd.oasis.opendocument.presentation", - "application/vnd.oasis.opendocument.text", - "application/vnd.oasis.opendocument.graphics", - "application/vnd.oasis.opendocument.chart", - "application/vnd.oasis.opendocument.image", - "application/pdf", - "image/jpeg", - "image/png" - ] - }, - - "user": { - "role_moderator": "MODERATOR", - "role_viewer": "VIEWER", - "role_presenter": "PRESENTER" - }, - - "whiteboard": { - "annotations": { - "status": { - "start": "DRAW_START", - "update": "DRAW_UPDATE", - "end": "DRAW_END" - } - }, - "toolbar": { - "colors": [ - { - "label": "black", - "value": "#000000" - }, - { - "label": "white", - "value": "#ffffff" - }, - { - "label": "red", - "value": "#ff0000" - }, - { - "label": "orange", - "value": "#ff8800" - }, - { - "label": "eletricLime", - "value": "#ccff00" - }, - { - "label": "Lime", - "value": "#00ff00" - }, - { - "label": "Cyan", - "value": "#00ffff" - }, - { - "label": "dodgerBlue", - "value": "#0088ff" - }, - { - "label": "blue", - "value": "#0000ff" - }, - { - "label": "violet", - "value": "#8800ff" - }, - { - "label": "magenta", - "value": "#ff00ff" - }, - { - "label": "silver", - "value": "#c0c0c0" - } - ], - "thickness": [ - { - "value": 14 - }, - { - "value": 12 - }, - { - "value": 10 - }, - { - "value": 8 - }, - { - "value": 6 - }, - { - "value": 4 - }, - { - "value": 2 - }, - { - "value": 1 - } - ], - "font_sizes": [ - { - "value": 36 - }, - { - "value": 32 - }, - { - "value": 28 - }, - { - "value": 24 - }, - { - "value": 20 - }, - { - "value": 16 - } - ], - "tools": [ - { - "icon": "text_tool", - "value": "text" - }, - { - "icon": "line_tool", - "value": "line" - }, - { - "icon": "circle_tool", - "value": "ellipse" - }, - { - "icon": "triangle_tool", - "value": "triangle" - }, - { - "icon": "rectangle_tool", - "value": "rectangle" - }, - { - "icon": "pen_tool", - "value": "pencil" - }, - { - "icon": "pointer", - "value": "pointer" - } - ] - } - }, - "clientLog": { - "server": { "enabled": true, "level": "info" }, - "console": { "enabled": false, "level": "debug" }, - "external": { "enabled": false, "level": "info", "url": "https://LOG_HOST/html5Log", "method": "POST" } - } - }, - - "private": { - - "app": { - "captionsChunkLength": 1000, - "pencilChunkLength": 100 - }, - - "redis": { - "host": "127.0.0.1", - "post": "6379", - "timeout": 5000, - "debug": true, - "channels": { - "toAkkaApps": "to-akka-apps-redis-channel" - }, - "subscribeTo": [ - "to-html5-redis-channel", - "from-akka-apps-*" - ], - "async": [ - "from-akka-apps-wb-redis-channel" - ], - "ignored": [ - "CheckAlivePongSysMsg", - "DoLatencyTracerMsg" - ] - }, - - "serverLog": { - "level": "info" - } - } -} diff --git a/bigbluebutton-html5/private/config/settings-production.json b/bigbluebutton-html5/private/config/settings-production.json deleted file mode 100755 index 67a3c18088..0000000000 --- a/bigbluebutton-html5/private/config/settings-production.json +++ /dev/null @@ -1,401 +0,0 @@ -{ - "public": { - - "app": { - "mobileFont": 16, - "desktopFont": 14, - "audioChatNotification": false, - "autoJoin": true, - "listenOnlyMode": true, - "forceListenOnly": false, - "skipCheck": false, - "clientTitle": "BigBlueButton", - "appName": "BigBlueButton HTML5 Client", - "bbbServerVersion": "2.0-rc", - "copyright": "©2018 BigBlueButton Inc.", - "html5ClientBuild": "HTML5_CLIENT_VERSION", - "lockOnJoin": true, - "basename": "/html5client", - "askForFeedbackOnLogout": false, - "defaultSettings": { - "application": { - "chatAudioAlerts": false, - "chatPushAlerts": false, - "fontSize": "16px", - "fallbackLocale": "en" - }, - "audio": { - "inputDeviceId": "undefined", - "outputDeviceId": "undefined" - }, - "dataSaving": { - "viewParticipantsWebcams": true, - "viewScreenshare": true - }, - "cc": { - "backgroundColor": "#FFFFFF", - "fontColor": "#000000", - "enabled": false, - "fontFamily": "Calibri", - "fontSize": "16px", - "takeOwnership": false - }, - "participants": { - "muteAll": false, - "lockAll": false, - "microphone": false, - "publicChat": false, - "privateChat": false, - "layout": false - } - }, - "shortcuts": { - "openOptions": {"accesskey": "O", "descId": "openOptions"}, - "toggleUserList": {"accesskey": "U", "descId": "toggleUserList"}, - "toggleMute": {"accesskey": "M", "descId": "toggleMute"}, - "joinAudio": {"accesskey": "J", "descId": "joinAudio"}, - "leaveAudio": {"accesskey": "L", "descId": "leaveAudio"}, - "togglePublicChat": {"accesskey": "P", "descId": "togglePublicChat"}, - "hidePrivateChat": {"accesskey": "H", "descId": "hidePrivateChat"}, - "closePrivateChat": {"accesskey": "G", "descId": "closePrivateChat"}, - "openActions": {"accesskey": "A", "descId": "openActions"}, - "openStatus": {"accesskey": "S", "descId": "openStatus"} - }, - "branding": { - "displayBrandingArea": false - }, - "allowHTML5Moderator": true, - "allowModeratorToUnmuteAudio": true, - "httpsConnection": true, - "connectionTimeout": 10000, - "showHelpButton": true - }, - - "kurento": { - "wsUrl": "HOST", - "chromeDefaultExtensionKey": "akgoaoikmbmhcopjgakkcepdgdgkjfbc", - "chromeDefaultExtensionLink": "https://chrome.google.com/webstore/detail/bigbluebutton-screenshare/akgoaoikmbmhcopjgakkcepdgdgkjfbc", - "chromeExtensionKey": "KEY", - "chromeExtensionLink": "LINK", - "chromeScreenshareSources": ["window", "screen"], - "firefoxScreenshareSource": "window", - "cameraConstraints": { - "width": { - "max": 640 - }, - "height": { - "max": 480 - } - }, - "enableScreensharing": false, - "enableVideo": false, - "enableVideoStats": false, - "enableListenOnly": false - }, - - "acl": { - "viewer": { - "subscriptions": [ - "users", - "cursor", - "screenshare", - "meetings", - "polls", - "chat", - "presentations", - "annotations", - "slides", - "captions", - "breakouts", - "voiceUsers", - "whiteboard-multi-user", - "presentation-pods", - "group-chat", - "group-chat-msg" - ], - "methods": [ - "listenOnlyToggle", - "userLogout", - "setEmojiStatus", - "toggleSelfVoice", - "publishVote", - "sendChat", - "createGroupChat", - "destroyGroupChat", - "sendGroupChatMsg" - ] - }, - "moderator": { - "methods": [ - "assignPresenter", - "removeUser", - "muteUser", - "unmuteUser", - "endMeeting", - "toggleVoice", - "clearPublicChatHistory", - "changeRole", - "ejectUserFromVoice", - "toggleRecording" - ] - }, - "presenter": { - "methods": [ - "assignPresenter", - "switchSlide", - "modifyWhiteboardAccess", - "undoAnnotation", - "clearWhiteboard", - "moveCursor", - "sendAnnotation", - "removePresentation", - "setPresentation", - "requestPresentationUploadToken" - ] - } - }, - - "chat": { - "min_message_length": 1, - "max_message_length": 5000, - "grouping_messages_window": 10000, - "type_system": "SYSTEM_MESSAGE", - "type_public": "PUBLIC_ACCESS", - "type_private": "PRIVATE_ACCESS", - "system_userid": "SYSTEM_MESSAGE", - "system_username": "SYSTEM_MESSAGE", - "public_id": "public", - "public_group_id": "MAIN-PUBLIC-GROUP-CHAT", - "public_userid": "public_chat_userid", - "public_username": "public_chat_username", - "storage_key": "UNREAD_CHATS", - "path_route": "users/chat/", - "system_messages_keys": { - "chat_clear": "PUBLIC_CHAT_CLEAR" - } - }, - - "media": { - "WebRTCHangupRetryInterval": 2000, - "vertoServerAddress": "HOST", - "freeswitchProfilePassword": "1234", - "vertoPort": "8082", - "useSIPAudio": true, - "stunTurnServersFetchAddress": "/bigbluebutton/api/stuns", - "mediaTag": "#remote-media", - "callTransferTimeout": 5000, - "callHangupTimeout": 2000, - "callHangupMaximumRetries": 10, - "echoTestNumber": "9196" - }, - - "presentation": { - "defaultPresentationFile": "default.pdf", - "uploadEndpoint": "/bigbluebutton/presentation/upload", - "uploadSizeMin": 0, - "uploadSizeMax": 50000000, - "uploadValidMimeTypes": [ - "application/vnd.ms-excel", - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", - "application/msword", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - "application/vnd.ms-powerpoint", - "application/vnd.openxmlformats-officedocument.presentationml.presentation", - "application/vnd.oasis.opendocument.text", - "application/rtf", - "text/plain", - "application/vnd.oasis.opendocument.spreadsheet", - "application/vnd.oasis.opendocument.presentation", - "application/vnd.oasis.opendocument.text", - "application/vnd.oasis.opendocument.graphics", - "application/vnd.oasis.opendocument.chart", - "application/vnd.oasis.opendocument.image", - "application/pdf", - "image/jpeg", - "image/png" - ] - }, - - "user": { - "role_moderator": "MODERATOR", - "role_viewer": "VIEWER", - "role_presenter": "PRESENTER" - }, - - "whiteboard": { - "annotations": { - "status": { - "start": "DRAW_START", - "update": "DRAW_UPDATE", - "end": "DRAW_END" - } - }, - "toolbar": { - "colors": [ - { - "label": "black", - "value": "#000000" - }, - { - "label": "white", - "value": "#ffffff" - }, - { - "label": "red", - "value": "#ff0000" - }, - { - "label": "orange", - "value": "#ff8800" - }, - { - "label": "eletricLime", - "value": "#ccff00" - }, - { - "label": "Lime", - "value": "#00ff00" - }, - { - "label": "Cyan", - "value": "#00ffff" - }, - { - "label": "dodgerBlue", - "value": "#0088ff" - }, - { - "label": "blue", - "value": "#0000ff" - }, - { - "label": "violet", - "value": "#8800ff" - }, - { - "label": "magenta", - "value": "#ff00ff" - }, - { - "label": "silver", - "value": "#c0c0c0" - } - ], - "thickness": [ - { - "value": 14 - }, - { - "value": 12 - }, - { - "value": 10 - }, - { - "value": 8 - }, - { - "value": 6 - }, - { - "value": 4 - }, - { - "value": 2 - }, - { - "value": 1 - } - ], - "font_sizes": [ - { - "value": 36 - }, - { - "value": 32 - }, - { - "value": 28 - }, - { - "value": 24 - }, - { - "value": 20 - }, - { - "value": 16 - } - ], - "tools": [ - { - "icon": "text_tool", - "value": "text" - }, - { - "icon": "line_tool", - "value": "line" - }, - { - "icon": "circle_tool", - "value": "ellipse" - }, - { - "icon": "triangle_tool", - "value": "triangle" - }, - { - "icon": "rectangle_tool", - "value": "rectangle" - }, - { - "icon": "pen_tool", - "value": "pencil" - }, - { - "icon": "pointer", - "value": "pointer" - } - ] - } - }, - "clientLog": { - "server": { "enabled": true, "level": "info" }, - "console": { "enabled": false, "level": "debug" }, - "external": { "enabled": false, "level": "info", "url": "https://LOG_HOST/html5Log", "method": "POST" } - } - }, - - "private": { - - "app": { - "captionsChunkLength": 1000, - "pencilChunkLength": 100 - }, - - "redis": { - "host": "127.0.0.1", - "post": "6379", - "timeout": 5000, - "debug": true, - "channels": { - "toAkkaApps": "to-akka-apps-redis-channel" - }, - "subscribeTo": [ - "to-html5-redis-channel", - "from-akka-apps-*" - ], - "async": [ - "from-akka-apps-wb-redis-channel" - ], - "ignored": [ - "CheckAlivePongSysMsg", - "DoLatencyTracerMsg" - ] - }, - - "serverLog": { - "level": "info" - } - } -} From 3bfce893968bb4b02125f520914e9a112d6d5665 Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Wed, 19 Sep 2018 12:00:49 -0300 Subject: [PATCH 37/54] change the setting prod --- bigbluebutton-html5/private/config/settings-production.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/private/config/settings-production.json b/bigbluebutton-html5/private/config/settings-production.json index 40cde8bdf4..43e0ffcc73 100755 --- a/bigbluebutton-html5/private/config/settings-production.json +++ b/bigbluebutton-html5/private/config/settings-production.json @@ -354,8 +354,8 @@ "value": "pencil" }, { - "icon": "pointer", - "value": "pointer" + "icon": "hand", + "value": "hand" } ] } From 121e47982f49c78fe5d9734b60dfb52f45c70f76 Mon Sep 17 00:00:00 2001 From: Bobak Oftadeh Date: Tue, 18 Sep 2018 14:25:59 -0700 Subject: [PATCH 38/54] Changed chat-width from pixel to precent. --- .../imports/ui/components/app/component.jsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/app/component.jsx b/bigbluebutton-html5/imports/ui/components/app/component.jsx index b910edf0f6..7e0d605399 100755 --- a/bigbluebutton-html5/imports/ui/components/app/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/app/component.jsx @@ -223,12 +223,9 @@ class App extends Component { const { chat } = this.props; // Variables for resizing chat. - const CHAT_MIN_WIDTH_PX = 180; - const CHAT_MAX_WIDTH_PX = 600; - const CHAT_DEFAULT_WIDTH_RELATIVE = 25; - - // decide whether using pixel or percentage unit as a default width for chat - const CHAT_DEFAULT_WIDTH = (window.innerWidth * (CHAT_DEFAULT_WIDTH_RELATIVE / 100.0)) < CHAT_MAX_WIDTH_PX ? `${CHAT_DEFAULT_WIDTH_RELATIVE}%` : CHAT_MAX_WIDTH_PX; + const CHAT_MIN_WIDTH = '10%'; + const CHAT_MAX_WIDTH = '25%'; + const CHAT_DEFAULT_WIDTH = '15%'; if (!chat) return null; @@ -246,8 +243,8 @@ class App extends Component { return ( { this.resizableChat = node; }} className={styles.resizableChat} enable={resizableEnableOptions} From 1c12b380a2832e305e405a2a9c041bc5ae381f1f Mon Sep 17 00:00:00 2001 From: Oswaldo Acauan Date: Wed, 19 Sep 2018 14:48:15 -0300 Subject: [PATCH 39/54] Fix not clearing pods and token when removing a meeting --- .../server/modifiers/clearGroupChatMsg.js | 6 ++--- .../server/modifiers/removeMeeting.js | 5 ++-- .../server/modifiers/clearPresentationPods.js | 23 +++++++++++++++++++ .../server/modifiers/removePresentationPod.js | 2 ++ .../modifiers/clearPresentationUploadToken.js | 21 +++++++++++++++++ .../server/modifiers/clearPresentations.js | 4 ++-- 6 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/clearPresentationPods.js create mode 100644 bigbluebutton-html5/imports/api/presentation-upload-token/server/modifiers/clearPresentationUploadToken.js diff --git a/bigbluebutton-html5/imports/api/group-chat-msg/server/modifiers/clearGroupChatMsg.js b/bigbluebutton-html5/imports/api/group-chat-msg/server/modifiers/clearGroupChatMsg.js index 2ca13c2646..a58dcd5fac 100644 --- a/bigbluebutton-html5/imports/api/group-chat-msg/server/modifiers/clearGroupChatMsg.js +++ b/bigbluebutton-html5/imports/api/group-chat-msg/server/modifiers/clearGroupChatMsg.js @@ -9,7 +9,7 @@ export default function clearGroupChatMsg(meetingId, chatId) { const CHAT_CLEAR_MESSAGE = CHAT_CONFIG.system_messages_keys.chat_clear; if (chatId) { - GroupChatMsg.remove({ meetingId, chatId }, Logger.info(`Cleared GroupChat (${meetingId}, ${chatId})`)); + GroupChatMsg.remove({ meetingId, chatId }, Logger.info(`Cleared GroupChatMsg (${meetingId}, ${chatId})`)); const clearMsg = { color: '0', @@ -26,8 +26,8 @@ export default function clearGroupChatMsg(meetingId, chatId) { } if (meetingId) { - return GroupChatMsg.remove({ meetingId }, Logger.info(`Cleared GroupChat (${meetingId})`)); + return GroupChatMsg.remove({ meetingId }, Logger.info(`Cleared GroupChatMsg (${meetingId})`)); } - return GroupChatMsg.remove({}, Logger.info('Cleared GroupChat (all)')); + return GroupChatMsg.remove({}, Logger.info('Cleared GroupChatMsg (all)')); } diff --git a/bigbluebutton-html5/imports/api/meetings/server/modifiers/removeMeeting.js b/bigbluebutton-html5/imports/api/meetings/server/modifiers/removeMeeting.js index 26ec6f6bae..5613e739bd 100755 --- a/bigbluebutton-html5/imports/api/meetings/server/modifiers/removeMeeting.js +++ b/bigbluebutton-html5/imports/api/meetings/server/modifiers/removeMeeting.js @@ -8,14 +8,15 @@ import clearAnnotations from '/imports/api/annotations/server/modifiers/clearAnn import clearSlides from '/imports/api/slides/server/modifiers/clearSlides'; import clearPolls from '/imports/api/polls/server/modifiers/clearPolls'; import clearCaptions from '/imports/api/captions/server/modifiers/clearCaptions'; -import clearPresentations from '/imports/api/presentations/server/modifiers/clearPresentations'; +import clearPresentationPods from '/imports/api/presentation-pods/server/modifiers/clearPresentationPods'; import clearVoiceUsers from '/imports/api/voice-users/server/modifiers/clearVoiceUsers'; + export default function removeMeeting(meetingId) { return Meetings.remove({ meetingId }, () => { clearCaptions(meetingId); clearGroupChat(meetingId); - clearPresentations(meetingId); + clearPresentationPods(meetingId); clearBreakouts(meetingId); clearPolls(meetingId); clearAnnotations(meetingId); diff --git a/bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/clearPresentationPods.js b/bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/clearPresentationPods.js new file mode 100644 index 0000000000..0ab763f415 --- /dev/null +++ b/bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/clearPresentationPods.js @@ -0,0 +1,23 @@ +import PresentationPods from '/imports/api/presentation-pods'; +import Logger from '/imports/startup/server/logger'; +import clearPresentations from '/imports/api/presentations/server/modifiers/clearPresentations'; +import clearPresentationUploadToken from '/imports/api/presentation-upload-token/server/modifiers/clearPresentationUploadToken'; + +export default function clearPresentationPods(meetingId) { + if (meetingId) { + return PresentationPods.remove( + { meetingId }, + () => { + clearPresentations(meetingId); + clearPresentationUploadToken(meetingId); + Logger.info(`Cleared Presentations Pods (${meetingId})`); + }, + ); + } + + return PresentationPods.remove({}, () => { + clearPresentations(); + clearPresentationUploadToken(); + Logger.info('Cleared Presentations Pods (all)'); + }); +} diff --git a/bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/removePresentationPod.js b/bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/removePresentationPod.js index b56af57533..fe9b4b938a 100644 --- a/bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/removePresentationPod.js +++ b/bigbluebutton-html5/imports/api/presentation-pods/server/modifiers/removePresentationPod.js @@ -2,6 +2,7 @@ import { check } from 'meteor/check'; import PresentationPods from '/imports/api/presentation-pods'; import Logger from '/imports/startup/server/logger'; import clearPresentations from '/imports/api/presentations/server/modifiers/clearPresentations'; +import clearPresentationUploadToken from '/imports/api/presentation-upload-token/server/modifiers/clearPresentationUploadToken'; export default function removePresentationPod(meetingId, podId) { check(meetingId, String); @@ -21,6 +22,7 @@ export default function removePresentationPod(meetingId, podId) { if (podId) { Logger.info(`Removed presentation pod id=${podId} meeting=${meetingId}`); clearPresentations(meetingId, podId); + clearPresentationUploadToken(meetingId, podId); } }; diff --git a/bigbluebutton-html5/imports/api/presentation-upload-token/server/modifiers/clearPresentationUploadToken.js b/bigbluebutton-html5/imports/api/presentation-upload-token/server/modifiers/clearPresentationUploadToken.js new file mode 100644 index 0000000000..0bd38dec84 --- /dev/null +++ b/bigbluebutton-html5/imports/api/presentation-upload-token/server/modifiers/clearPresentationUploadToken.js @@ -0,0 +1,21 @@ +import PresentationUploadToken from '/imports/api/presentation-upload-token'; +import Logger from '/imports/startup/server/logger'; + +export default function clearPresentationUploadToken(meetingId, podId) { + if (meetingId && podId) { + return PresentationUploadToken.remove( + { meetingId, podId }, + Logger.info(`Cleared Presentations Upload Token (${meetingId}, ${podId})`), + ); + } + + if (meetingId) { + return PresentationUploadToken.remove( + { meetingId }, + Logger.info(`Cleared Presentations Upload Token (${meetingId})`), + ); + } + + // clearing presentations for the whole server + return PresentationUploadToken.remove({}, Logger.info('Cleared Presentations Upload Token (all)')); +} diff --git a/bigbluebutton-html5/imports/api/presentations/server/modifiers/clearPresentations.js b/bigbluebutton-html5/imports/api/presentations/server/modifiers/clearPresentations.js index 413a924f49..7631c9c4c7 100644 --- a/bigbluebutton-html5/imports/api/presentations/server/modifiers/clearPresentations.js +++ b/bigbluebutton-html5/imports/api/presentations/server/modifiers/clearPresentations.js @@ -6,14 +6,14 @@ export default function clearPresentations(meetingId, podId) { if (meetingId && podId) { return Presentations.remove( { meetingId, podId }, - Logger.info(`Cleared Presentations for the podId=${podId} and meetingId=${meetingId}`), + Logger.info(`Cleared Presentations (${meetingId}, ${podId})`), ); // clearing presentations for the whole meeting } else if (meetingId) { return Presentations.remove( { meetingId }, - Logger.info(`Cleared Presentations for the meetingId=${meetingId}`), + Logger.info(`Cleared Presentations (${meetingId})`), ); } From 750f1bc35ae1d9d1e5823f446ddf4315550e987d Mon Sep 17 00:00:00 2001 From: Oswaldo Acauan Date: Wed, 19 Sep 2018 14:57:39 -0300 Subject: [PATCH 40/54] Fix fuzzy chat font rendering. Closes #6012 --- bigbluebutton-html5/imports/ui/components/chat/styles.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/bigbluebutton-html5/imports/ui/components/chat/styles.scss b/bigbluebutton-html5/imports/ui/components/chat/styles.scss index 8889401573..4d643cd513 100755 --- a/bigbluebutton-html5/imports/ui/components/chat/styles.scss +++ b/bigbluebutton-html5/imports/ui/components/chat/styles.scss @@ -45,6 +45,7 @@ $background-active: darken($color-white, 5%); justify-content: space-around; overflow: hidden; height: 100vh; + transform: translateZ(0); } .header { From 61c4c62e5446092195570b93a128175d86beaa86 Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Wed, 19 Sep 2018 15:10:25 -0300 Subject: [PATCH 41/54] Zoom call only for presenter --- .../presentation/presentation-overlay/component.jsx | 4 +++- .../presentation/presentation-overlay/container.jsx | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx index f55c1c94b3..7b7ac2f31e 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/component.jsx @@ -287,9 +287,12 @@ export default class PresentationOverlay extends Component { zoomSlide, podId, currentSlideNum, + isPresenter, } = this.props; + if (!isPresenter) return; zoomSlide(currentSlideNum, podId, w, h, x, y); this.setState({ zoom }); + this.props.zoomChanger(zoom); } doZoomCall(zoom, mouseX, mouseY) { @@ -303,7 +306,6 @@ export default class PresentationOverlay extends Component { } = zoomData; this.zoomCall(zoom, viewedRegionW, viewedRegionH, viewedRegionX, viewedRegionY); - this.props.zoomChanger(zoom); } mouseZoomHandler(e) { diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx index 6665175b27..13ddaf8b5c 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-overlay/container.jsx @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import { withTracker } from 'meteor/react-meteor-data'; import PresentationOverlayService from './service'; import PresentationToolbarService from '../presentation-toolbar/service'; +import PresentationService from '../service'; import PresentationOverlay from './component'; const PresentationOverlayContainer = ({ children, ...rest }) => ( @@ -17,6 +18,7 @@ export default withTracker(({ podId, currentSlideNum, slide }) => ({ currentSlideNum, updateCursor: PresentationOverlayService.updateCursor, zoomSlide: PresentationToolbarService.zoomSlide, + isPresenter: PresentationService.isPresenter(podId), }))(PresentationOverlayContainer); PresentationOverlayContainer.propTypes = { From bb58a3fde624ef25d12146e714ecfab6ac655dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Francisco=20Siebel?= Date: Wed, 19 Sep 2018 17:32:17 -0300 Subject: [PATCH 42/54] let server handle parameters --- .../server/methods/addUserSettings.js | 38 +++++++++++++++++- .../imports/startup/client/auth.js | 40 +------------------ 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js b/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js index 2734149196..59a4cf2e22 100644 --- a/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js +++ b/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js @@ -5,11 +5,45 @@ import addUserSetting from '/imports/api/users-settings/server/modifiers/addUser export default function addUserSettings(credentials, meetingId, userId, settings) { check(meetingId, String); check(userId, String); - check(settings, Object); + check(settings, [Object]); + + const customData = settings.reduce((acc, data) => { + const key = Object.keys(data).shift(); + + const handledHTML5Parameters = [ + 'html5recordingbot', + // APP + 'autoJoin', + 'listenOnlyMode', + 'forceListenOnly', + 'skipCheck', + // 'clientTitle', + 'lockOnJoin', // NOT IMPLEMENTED YET + 'askForFeedbackOnLogout', + // BRANDING + 'displayBrandingArea', + // KURENTO + 'enableScreensharing', + 'enableVideo', + 'enableVideoStats', + // WHITEBOARD + ]; + if (!handledHTML5Parameters.includes(key)) { + return acc; + } + + let value = data[key]; + try { + value = JSON.parse(value); + } catch (e) { + console.log('error', `Caught: ${e.message}`); + } + return { ...acc, [key]: value }; + }, {}); const settingsAdded = []; - Object.entries(settings).forEach((el) => { + Object.entries(customData).forEach((el) => { const setting = el[0]; const value = el[1]; settingsAdded.push(addUserSetting(meetingId, userId, setting, value)); diff --git a/bigbluebutton-html5/imports/startup/client/auth.js b/bigbluebutton-html5/imports/startup/client/auth.js index 347fed1a45..723816d386 100755 --- a/bigbluebutton-html5/imports/startup/client/auth.js +++ b/bigbluebutton-html5/imports/startup/client/auth.js @@ -60,44 +60,8 @@ export function joinRouteHandler(nextState, replace, callback) { return { ...acc, [key]: value }; }, {}) : {}; - const customData = customdata.length - ? customdata.reduce((acc, data) => { - const key = Object.keys(data).shift(); - - const handledHTML5Parameters = [ - 'html5recordingbot', - // APP - 'autoJoin', - 'listenOnlyMode', - 'forceListenOnly', - 'skipCheck', - 'clientTitle', - 'lockOnJoin', // NOT IMPLEMENTED YET - 'askForFeedbackOnLogout', - // BRANDING - 'displayBrandingArea', - // KURENTO - 'enableScreensharing', - 'enableVideo', - 'enableVideoStats', - // WHITEBOARD - ]; - if (handledHTML5Parameters.indexOf(key) === -1) { - return acc; - } - - let value = data[key]; - try { - value = JSON.parse(value); - } catch (e) { - log('error', `Caught: ${e.message}`); - } - - return { ...acc, [key]: value }; - }, {}) : {}; - - if (Object.keys(customData).length > 0) { - makeCall('addUserSettings', meetingID, internalUserID, customData); + if (customdata.length) { + makeCall('addUserSettings', meetingID, internalUserID, customdata); } SessionStorage.setItem(METADATA_KEY, metakeys); From b832921be22d56c04e2a8ac42ebffbbf192224bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Francisco=20Siebel?= Date: Wed, 19 Sep 2018 17:34:23 -0300 Subject: [PATCH 43/54] fix settings list --- .../api/users-settings/server/methods/addUserSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js b/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js index 59a4cf2e22..23e12c888a 100644 --- a/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js +++ b/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js @@ -17,7 +17,7 @@ export default function addUserSettings(credentials, meetingId, userId, settings 'listenOnlyMode', 'forceListenOnly', 'skipCheck', - // 'clientTitle', + 'clientTitle', 'lockOnJoin', // NOT IMPLEMENTED YET 'askForFeedbackOnLogout', // BRANDING From b9f52a2438e7166c40a4cf5c2392d25dcf07101f Mon Sep 17 00:00:00 2001 From: jfederico Date: Thu, 20 Sep 2018 14:23:29 +0000 Subject: [PATCH 44/54] Script for fixing meeting tag in recordings migrated from BBB 1.0 and before --- .../core/scripts/bbb-1.1-meeting-tag | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100755 record-and-playback/core/scripts/bbb-1.1-meeting-tag diff --git a/record-and-playback/core/scripts/bbb-1.1-meeting-tag b/record-and-playback/core/scripts/bbb-1.1-meeting-tag new file mode 100755 index 0000000000..7187553938 --- /dev/null +++ b/record-and-playback/core/scripts/bbb-1.1-meeting-tag @@ -0,0 +1,89 @@ +#!/usr/bin/ruby + +require File.expand_path('../../lib/recordandplayback', __FILE__) +require 'trollop' + +props = YAML::load(File.open(File.expand_path('../bigbluebutton.yml', __FILE__))) +log_dir = props['log_dir'] +published_dir = props['published_dir'] +unpublished_dir = "#{published_dir}/../unpublished" + +opts = Trollop::options do + opt(:force, "Run script even if it has previously been run", + :default => false) + opt(:quiet, "Minimal output mode, for automated use", + :default => false) +end + +log_file = "#{log_dir}/bbb-1.1-meeting-tag.log" +done_file = "#{props['recording_dir']}/status/bbb-1.1-meeting-tag.done" + +logger = Logger.new(log_file) +logger.level = Logger::INFO +BigBlueButton.logger = logger + +if File.exist?(done_file) and !opts.force + if !opts.quiet + puts "Script has previously been run, doing nothing" + puts "Use the --force option to override" + end + exit 0 +end + +def do_update(recording_dir, format_dir) + match = /([^\/]*)$/.match(recording_dir) + meeting_id = match[1] + + match = /([^\/]*)$/.match(format_dir) + format = match[1] + + BigBlueButton.logger.info("Processing #{format} recording #{meeting_id}") + + xml_filename = "#{recording_dir}/metadata.xml" + doc = Nokogiri::XML(File.open(xml_filename)) { |x| x.noblanks } + return if ! doc.xpath("/recording/meeting").empty? + + node = Nokogiri::XML::Node.new "meeting", doc + node["id"] = doc.at_xpath("/recording/id").text || "" + node["externalId"] = doc.at_xpath("/recording/meta/meetingId").text || "" + node["name"] = doc.at_xpath("/recording/meta/meetingName").text || "" + node["breakout"] = "false" + + doc.at("/recording") << node + + xml_file = File.new(xml_filename, "w") + xml_file.write(doc.to_xml(:indent => 2)) + xml_file.close +end + +BigBlueButton.logger.info("Updating meeting tag for 1.1.0") + +puts "Updating meeting tag for 1.1.0..." + +num_recordings = 0 + +BigBlueButton.logger.info("Checking recordings in #{published_dir}") +Dir.glob("#{published_dir}/*").each do |format_dir| + Dir.glob("#{format_dir}/*-*").each do |recording_dir| + print '.' if num_recordings % 10 == 0 + num_recordings += 1 + do_update(recording_dir, format_dir) + end +end + +BigBlueButton.logger.info("Checking recordings in #{unpublished_dir}") +Dir.glob("#{unpublished_dir}/*").each do |format_dir| + Dir.glob("#{format_dir}/*-*").each do |recording_dir| + print '.' if num_recordings % 10 == 0 + num_recordings += 1 + do_update(recording_dir, format_dir) + end +end + +puts "done" + +puts "See the output in #{log_file} for details" + +BigBlueButton.logger.info("Processed #{num_recordings} recordings") + +IO.write(done_file, Time.now) From 7a64756bba1abcc467deb2282f00038e7123361f Mon Sep 17 00:00:00 2001 From: Calvin Walton Date: Fri, 21 Sep 2018 14:28:24 -0400 Subject: [PATCH 45/54] RaP: When generating poll image, grab the presentation name correctly. It was previously trying to get the presentation name from the wrong variable, which resulted in a nil value (which was treated as a blank string in filenames). This caused the poll images to not be inside the presentation subdirectories, and the poll image references in the svg contained a `//` path, which would break the recording if it was uploaded to e.g. AWS S3. --- .../presentation/scripts/publish/presentation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/record-and-playback/presentation/scripts/publish/presentation.rb b/record-and-playback/presentation/scripts/publish/presentation.rb index 50852d2f41..2601724984 100755 --- a/record-and-playback/presentation/scripts/publish/presentation.rb +++ b/record-and-playback/presentation/scripts/publish/presentation.rb @@ -368,7 +368,7 @@ def svg_render_shape_poll(g, slide, shape) result = JSON.load(shape[:result]) num_responders = shape[:num_responders] - presentation = shape[:presentation] + presentation = slide[:presentation] max_num_votes = result.map{ |r| r['num_votes'] }.max dat_file = "#{$process_dir}/poll_result#{poll_id}.dat" From 81e6e815d958a598d2cf1ff5a69e1ebf7974bbd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Francisco=20Siebel?= Date: Mon, 24 Sep 2018 14:51:07 -0300 Subject: [PATCH 46/54] remove .ini file --- .../private/config/settings.ini | 314 ------------------ 1 file changed, 314 deletions(-) delete mode 100644 bigbluebutton-html5/private/config/settings.ini diff --git a/bigbluebutton-html5/private/config/settings.ini b/bigbluebutton-html5/private/config/settings.ini deleted file mode 100644 index 740fa437f9..0000000000 --- a/bigbluebutton-html5/private/config/settings.ini +++ /dev/null @@ -1,314 +0,0 @@ -[public] - -[public.app] -mobileFont=16 -desktopFont=14 -audioChatNotification=false -autoJoin=true -listenOnlyMode=true -forceListenOnly=true -skipCheck=false -clientTitle=BigBlueButton -appName=BigBlueButton HTML5 Client -bbbServerVersion=2.0-rc -copyright=©2018 BigBlueButton Inc. -html5ClientBuild=HTML5_CLIENT_VERSION -lockOnJoin=true -basename=/html5client -askForFeedbackOnLogout=false -allowHTML5Moderator=true -allowModeratorToUnmuteAudio=true -httpsConnection=false -connectionTimeout=60000 -showHelpButton=true - -[public.app.defaultSettings] -[public.app.defaultSettings.application] -chatAudioAlerts=false -chatPushAlerts=false -fontSize=16px -fallbackLocale=en - -[public.app.defaultSettings.audio] -inputDeviceId=undefined -outputDeviceId=undefined - -[public.app.defaultSettings.dataSaving] -viewParticipantsWebcams=true -viewScreenshare=true - -[public.app.defaultSettings.cc] -backgroundColor='#FFFFFF' -fontColor='#000000' -enabled=false -fontFamily=Calibri -fontSize=16px -takeOwnership=false - -[public.app.defaultSettings.participants] -muteAll=false -lockAll=false -microphone=false -publicChat=false -privateChat=false -layout=false - -[public.app.shortcuts] -[public.app.shortcuts.openOptions] -accesskey=O -descId=openOptions - -[public.app.shortcuts.toggleUserList] -accesskey=U -descId=toggleUserList - -[public.app.shortcuts.toggleMute] -accesskey=M -descId=toggleMute - -[public.app.shortcuts.joinAudio] -accesskey=J -descId=joinAudio - -[public.app.shortcuts.leaveAudio] -accesskey=L -descId=leaveAudio - -[public.app.shortcuts.togglePublicChat] -accesskey=P -descId=togglePublicChat - -[public.app.shortcuts.hidePrivateChat] -accesskey=H -descId=hidePrivateChat - -[public.app.shortcuts.closePrivateChat] -accesskey=G -descId=closePrivateChat - -[public.app.shortcuts.openActions] -accesskey=A -descId=openActions - -[public.app.shortcuts.openStatus] -accesskey=S -descId=openStatus - -[public.app.branding] -displayBrandingArea=false - -[public.kurento] -wsUrl=HOST -chromeDefaultExtensionKey=akgoaoikmbmhcopjgakkcepdgdgkjfbc -chromeDefaultExtensionLink=https://chrome.google.com/webstore/detail/bigbluebutton-screenshare/akgoaoikmbmhcopjgakkcepdgdgkjfbc -chromeExtensionKey=KEY -chromeExtensionLink=LINK -chromeScreenshareSources[]=window -chromeScreenshareSources[]=screen -firefoxScreenshareSource=window -enableScreensharing=false -enableVideo=true -enableVideoStats=false -enableListenOnly=false - -[public.kurento.cameraConstraints] -[public.kurento.cameraConstraints.width] -max=640 -[public.kurento.cameraConstraints.height] -max=480 - -[public.acl] -[public.acl.viewer] -subscriptions[]=users -subscriptions[]=cursor -subscriptions[]=screenshare -subscriptions[]=meetings -subscriptions[]=polls -subscriptions[]=chat -subscriptions[]=presentations -subscriptions[]=annotations -subscriptions[]=slides -subscriptions[]=captions -subscriptions[]=breakouts -subscriptions[]=voiceUsers -subscriptions[]=whiteboard-multi-user -subscriptions[]=presentation-pods -subscriptions[]=group-chat -subscriptions[]=group-chat-msg -subscriptions[]=user-settings - -methods[]=listenOnlyToggle -methods[]=userLogout -methods[]=setEmojiStatus -methods[]=toggleSelfVoice -methods[]=publishVote -methods[]=sendChat -methods[]=createGroupChat -methods[]=destroyGroupChat -methods[]=sendGroupChatMsg - -[public.acl.moderator] -methods[]=assignPresenter -methods[]=removeUser -methods[]=muteUser -methods[]=unmuteUser -methods[]=endMeeting -methods[]=toggleVoice -methods[]=clearPublicChatHistory -methods[]=changeRole -methods[]=ejectUserFromVoice -methods[]=toggleRecording - -[public.acl.presenter] -methods[]=assignPresenter -methods[]=switchSlide -methods[]=modifyWhiteboardAccess -methods[]=undoAnnotation -methods[]=clearWhiteboard -methods[]=moveCursor -methods[]=sendAnnotation -methods[]=removePresentation -methods[]=setPresentation - -[public.chat] -min_message_length=1 -max_message_length=5000 -grouping_messages_window=10000 -type_system=SYSTEM_MESSAGE -type_public=PUBLIC_ACCESS -type_private=PRIVATE_ACCESS -system_userid=SYSTEM_MESSAGE -system_username=SYSTEM_MESSAGE -public_id=public -public_group_id=MAIN-PUBLIC-GROUP-CHAT -public_userid=public_chat_userid -public_username=public_chat_username -storage_key=UNREAD_CHATS -path_route=users/chat/ - -[public.chat.system_messages_keys] -chat_clear=PUBLIC_CHAT_CLEAR - -[public.media] -WebRTCHangupRetryInterval=2000 -vertoServerAddress=HOST -freeswitchProfilePassword=1234 -vertoPort=8082 -useSIPAudio=true -stunTurnServersFetchAddress=/bigbluebutton/api/stuns -mediaTag='#remote-media' -callTransferTimeout=5000 -callHangupTimeout=2000 -callHangupMaximumRetries=10 -echoTestNumber=9196 - -[public.presentation] -defaultPresentationFile=default.pdf -uploadEndpoint=/bigbluebutton/presentation/upload -uploadSizeMin=0 -uploadSizeMax=50000000 -uploadValidMimeTypes[]=application/vnd.ms-excel -uploadValidMimeTypes[]=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet -uploadValidMimeTypes[]=application/msword -uploadValidMimeTypes[]=application/vnd.openxmlformats-officedocument.wordprocessingml.document -uploadValidMimeTypes[]=application/vnd.ms-powerpoint -uploadValidMimeTypes[]=application/vnd.openxmlformats-officedocument.presentationml.presentation -uploadValidMimeTypes[]=application/vnd.oasis.opendocument.text -uploadValidMimeTypes[]=application/rtf -uploadValidMimeTypes[]=text/plain -uploadValidMimeTypes[]=application/vnd.oasis.opendocument.spreadsheet -uploadValidMimeTypes[]=application/vnd.oasis.opendocument.presentation -uploadValidMimeTypes[]=application/vnd.oasis.opendocument.text -uploadValidMimeTypes[]=application/vnd.oasis.opendocument.graphics -uploadValidMimeTypes[]=application/vnd.oasis.opendocument.chart -uploadValidMimeTypes[]=application/vnd.oasis.opendocument.image -uploadValidMimeTypes[]=application/pdf -uploadValidMimeTypes[]=image/jpeg -uploadValidMimeTypes[]=image/png - -[public.user] -role_moderator=MODERATOR -role_viewer=VIEWER -role_presenter=PRESENTER - -[public.whiteboard] -[public.whiteboard.annotations] -[public.whiteboard.annotations.status] -start=DRAW_START -update=DRAW_UPDATE -end=DRAW_END - -[public.whiteboard.toolbar] -; label | value -colors[]='black | #000000' -colors[]='white | #ffffff' -colors[]='red | #ff0000' -colors[]='orange | #ff8800' -colors[]='eletricLime | #ccff00' -colors[]='Lime | #00ff00' -colors[]='Cyan | #00ffff' -colors[]='dodgerBlue | #0088ff' -colors[]='blue | #0000ff' -colors[]='violet | #8800ff' -colors[]='magenta | #ff00ff' -colors[]='silver | #c0c0c0' - -thickness[]=1 -thickness[]=2 -thickness[]=4 -thickness[]=6 -thickness[]=8 -thickness[]=10 -thickness[]=12 -thickness[]=14 - -font_sizes[]=16 -font_sizes[]=20 -font_sizes[]=24 -font_sizes[]=28 -font_sizes[]=32 -font_sizes[]=36 - -; icon | value -tools[]=text_tool | text -tools[]=line_tool | line -tools[]=circle_tool | ellipse -tools[]=triangle_tool | triangle -tools[]=rectangle_tool | rectangle -tools[]=pen_tool | pencil -tools[]=pointer | pointer - -[public.clientLog] -[public.clientLog.server] -enabled=true -level=info -[public.clientLog.console] -enabled=false -level=debug -[public.clientLog.external] -enabled=false -level=info -url=https://LOG_HOST/html5Log -method=POST - -[private] -[private.app] -captionsChunkLength=1000 -pencilChunkLength=100 - -[private.redis] -host=127.0.0.1 -post=6379 -timeout=5000 -debug=true -subscribeTo[]=to-html5-redis-channel -subscribeTo[]=from-akka-apps-* -async[]=from-akka-apps-wb-redis-channel -ignored[]=CheckAlivePongSysMsg -ignored[]=DoLatencyTracerMsg - -[private.redis.channels] -toAkkaApps=to-akka-apps-redis-channel - -[private.serverLog] -level=info From 68aa29de686bbb69a99c3e083d60e467c775de10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Francisco=20Siebel?= Date: Tue, 25 Sep 2018 09:37:45 -0300 Subject: [PATCH 47/54] rename file and add users-settings subscription --- bigbluebutton-html5/imports/startup/server/index.js | 2 +- .../imports/startup/server/{iniSettings.js => settings.js} | 0 bigbluebutton-html5/private/config/settings.yml | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) rename bigbluebutton-html5/imports/startup/server/{iniSettings.js => settings.js} (100%) diff --git a/bigbluebutton-html5/imports/startup/server/index.js b/bigbluebutton-html5/imports/startup/server/index.js index 94b2d59334..243a7e3bff 100755 --- a/bigbluebutton-html5/imports/startup/server/index.js +++ b/bigbluebutton-html5/imports/startup/server/index.js @@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor'; import Langmap from 'langmap'; import Users from '/imports/api/users'; import fs from 'fs'; -import './iniSettings'; +import './settings'; import Logger from './logger'; import Redis from './redis'; diff --git a/bigbluebutton-html5/imports/startup/server/iniSettings.js b/bigbluebutton-html5/imports/startup/server/settings.js similarity index 100% rename from bigbluebutton-html5/imports/startup/server/iniSettings.js rename to bigbluebutton-html5/imports/startup/server/settings.js diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index 9d82a6213c..734d979aee 100644 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -117,6 +117,7 @@ public: - presentation-pods - group-chat - group-chat-msg + - users-settings methods: - listenOnlyToggle - userLogout From 494f9b345ad6aa356fd90ea56462223c8ef8681a Mon Sep 17 00:00:00 2001 From: jfederico Date: Tue, 25 Sep 2018 20:11:45 +0000 Subject: [PATCH 48/54] Added jwt and java_properties gems --- record-and-playback/core/Gemfile | 2 ++ record-and-playback/core/Gemfile.lock | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/record-and-playback/core/Gemfile b/record-and-playback/core/Gemfile index e9c9431338..0caeee9f23 100644 --- a/record-and-playback/core/Gemfile +++ b/record-and-playback/core/Gemfile @@ -27,3 +27,5 @@ gem "trollop" gem "open4" gem "fastimage" gem "absolute_time" +gem "jwt" +gem "java_properties" diff --git a/record-and-playback/core/Gemfile.lock b/record-and-playback/core/Gemfile.lock index 6c0b205d28..7e57f74f61 100644 --- a/record-and-playback/core/Gemfile.lock +++ b/record-and-playback/core/Gemfile.lock @@ -4,6 +4,8 @@ GEM absolute_time (1.0.0) builder (3.2.3) fastimage (2.1.0) + java_properties (0.0.4) + jwt (2.1.0) mini_portile2 (2.3.0) nokogiri (1.8.1) mini_portile2 (~> 2.3.0) @@ -19,6 +21,8 @@ DEPENDENCIES absolute_time builder fastimage + java_properties + jwt nokogiri open4 redis @@ -26,4 +30,4 @@ DEPENDENCIES trollop BUNDLED WITH - 1.13.7 + 1.15.4 From 33655682f0e587ec7fe2c021396448bb57c81f11 Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Tue, 25 Sep 2018 17:29:54 -0300 Subject: [PATCH 49/54] change modal overlay color for client consistency --- .../imports/ui/components/modal/simple/styles.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/modal/simple/styles.scss b/bigbluebutton-html5/imports/ui/components/modal/simple/styles.scss index b235b549c3..d23f43b9fc 100644 --- a/bigbluebutton-html5/imports/ui/components/modal/simple/styles.scss +++ b/bigbluebutton-html5/imports/ui/components/modal/simple/styles.scss @@ -41,5 +41,5 @@ .overlay { @extend .overlay; - background-color: rgba(0, 0, 0, .5); + background-color: rgba(6, 23, 42, 0.75); } From 90e3c6e360a0ae380b422f8bc1f7c06755f4cdc5 Mon Sep 17 00:00:00 2001 From: jfederico Date: Tue, 2 Oct 2018 18:57:15 +0000 Subject: [PATCH 50/54] Added script for recording ready notification --- .../post_publish_recording_ready_callback.rb | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 record-and-playback/core/scripts/post_publish/post_publish_recording_ready_callback.rb diff --git a/record-and-playback/core/scripts/post_publish/post_publish_recording_ready_callback.rb b/record-and-playback/core/scripts/post_publish/post_publish_recording_ready_callback.rb new file mode 100644 index 0000000000..f445f0168a --- /dev/null +++ b/record-and-playback/core/scripts/post_publish/post_publish_recording_ready_callback.rb @@ -0,0 +1,89 @@ +#!/usr/bin/ruby +# encoding: UTF-8 + +# +# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ +# +# Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 3.0 of the License, or (at your option) +# any later version. +# +# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with BigBlueButton; if not, see . +# + +require "trollop" +require 'net/http' +require "jwt" +require "java_properties" +require File.expand_path('../../../lib/recordandplayback', __FILE__) + +logger = Logger.new("/var/log/bigbluebutton/post_publish.log", 'weekly' ) +logger.level = Logger::INFO +BigBlueButton.logger = logger + +opts = Trollop::options do + opt :meeting_id, "Meeting id to archive", :type => String +end +meeting_id = opts[:meeting_id] + +processed_files = "/var/bigbluebutton/recording/process/presentation/#{meeting_id}" +meeting_metadata = BigBlueButton::Events.get_meeting_metadata("/var/bigbluebutton/recording/raw/#{meeting_id}/events.xml") + +# +# Main code +# +BigBlueButton.logger.info("Recording Ready Notify for [#{meeting_id}] starts") + +begin + callback_url = meeting_metadata["bbb-recording-ready-url"].value + + unless callback_url.nil? + BigBlueButton.logger.info("Making callback for recording ready notification") + + props = JavaProperties::Properties.new("/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties") + secret = props[:securitySalt] + external_meeting_id = meeting_metadata["meetingId"].value + + payload = { meeting_id: external_meeting_id, record_id: meeting_id } + payload_encoded = JWT.encode(payload, secret) + + uri = URI.parse(callback_url) + http = Net::HTTP.new(uri.host, uri.port) + http.use_ssl = (uri.scheme == 'https') + + BigBlueButton.logger.info("Sending request to #{uri.scheme}://#{uri.host}#{uri.request_uri}") + request = Net::HTTP::Post.new(uri.request_uri) + request.set_form_data({ signed_parameters: payload_encoded }) + + response = http.request(request) + code = response.code.to_i + + if code == 410 + BigBlueButton.logger.info("Notified for deleted meeting: #{meeting_id}") + # TODO: should we automatically delete the recording here? + elsif code == 404 + BigBlueButton.logger.info("404 error when notifying for recording: #{meeting_id}, ignoring") + elsif code < 200 || code >= 300 + BigBlueButton.logger.info("Callback HTTP request failed: #{response.code} #{response.message} (code #{code})") + else + BigBlueButton.logger.info("Recording notifier successful: #{meeting_id} (code #{code})") + end + end + +rescue => e + BigBlueButton.logger.info("Rescued") + BigBlueButton.logger.info(e.to_s) +end + +BigBlueButton.logger.info("Recording Ready notify ends") + +exit 0 From aa24a4b3b5c414b19ed599e84302367e582696b4 Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Tue, 2 Oct 2018 16:39:09 -0300 Subject: [PATCH 51/54] change intl label for have concistency with others options --- bigbluebutton-html5/private/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-html5/private/locales/en.json b/bigbluebutton-html5/private/locales/en.json index 11707bbef9..01521cbb1c 100755 --- a/bigbluebutton-html5/private/locales/en.json +++ b/bigbluebutton-html5/private/locales/en.json @@ -91,7 +91,7 @@ "app.waitingMessage": "Disconnected. Trying to reconnect in {0} seconds...", "app.navBar.settingsDropdown.optionsLabel": "Options", "app.navBar.settingsDropdown.fullscreenLabel": "Make fullscreen", - "app.navBar.settingsDropdown.settingsLabel": "Open settings", + "app.navBar.settingsDropdown.settingsLabel": "Settings", "app.navBar.settingsDropdown.aboutLabel": "About", "app.navBar.settingsDropdown.leaveSessionLabel": "Logout", "app.navBar.settingsDropdown.exitFullscreenLabel": "Exit fullscreen", From 265275018e6a8a4c3133a8eab12c58663696e5cb Mon Sep 17 00:00:00 2001 From: gustavotrott Date: Tue, 9 Oct 2018 10:43:22 -0300 Subject: [PATCH 52/54] Added compatibility with Electron Chromium --- .../client/compatibility/kurento-extension.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bigbluebutton-html5/client/compatibility/kurento-extension.js b/bigbluebutton-html5/client/compatibility/kurento-extension.js index 4ca52d78a9..e175423646 100644 --- a/bigbluebutton-html5/client/compatibility/kurento-extension.js +++ b/bigbluebutton-html5/client/compatibility/kurento-extension.js @@ -639,6 +639,29 @@ window.getScreenConstraints = function (sendSource, callback) { }); }; + if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) { + var sourceId = ipcRenderer.sendSync('screen-chooseSync'); + kurentoManager.kurentoScreenshare.extensionInstalled = true; + + // this statement sets gets 'sourceId" and sets "chromeMediaSourceId" + screenConstraints.video.chromeMediaSource = { exact: [sendSource] }; + screenConstraints.video.chromeMediaSourceId = sourceId; + screenConstraints.optional = [ + { googCpuOveruseDetection: true }, + { googCpuOveruseEncodeUsage: true }, + { googCpuUnderuseThreshold: 55 }, + { googCpuOveruseThreshold: 100 }, + { googPayloadPadding: true }, + { googScreencastMinBitrate: 600 }, + { googHighStartBitrate: true }, + { googHighBitrate: true }, + { googVeryHighBitrate: true }, + ]; + + console.log('getScreenConstraints for Chrome returns => ', screenConstraints); + return callback(null, screenConstraints); + } + if (isChrome) { const extensionKey = kurentoManager.getChromeExtensionKey(); getChromeScreenConstraints(extensionKey).then((constraints) => { From f780a43c449f8496ac38e9666d5cc04e1b289106 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Wed, 10 Oct 2018 11:38:31 -0700 Subject: [PATCH 53/54] - implement data metrics on metadata.xml --- .../bigbluebutton/api2/domain/Recording.scala | 67 ++++++++++++++++++- .../api2/util/RecMetaXmlHelper.scala | 6 +- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala index 665452bf2e..ef3ad2841b 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/Recording.scala @@ -101,6 +101,16 @@ object RecMeta { } } + def getDataMetrics(metaXml: Elem): Option[RecMetaDataMetrics] = { + val data = metaXml \ "data" + if (data.isEmpty) None + else { + val format = getText(data, "format", "unknown") + val link = getText(data, "link", "unknown") + Some(RecMetaDataMetrics(format, link)) + } + } + def getExtensions(playbackXml: NodeSeq): Option[NodeSeq] = { val extensions = playbackXml \ "extensions" if (extensions.isEmpty) None @@ -135,6 +145,7 @@ object RecMeta { val meeting = getMeeting(metaXml) val meta = getMeta(metaXml) val playback = getPlayback(metaXml) + val dataMetrics = getDataMetrics(metaXml) val breakout = getBreakout(metaXml) val breakoutRooms = getBreakoutRooms(metaXml) @@ -168,7 +179,7 @@ object RecMeta { Some(RecMeta(id, meetingId, internalMeetingId, meetingName, state, published, startTime, endTime, participants, rawSize, isBreakout, - meeting, meta, playback, breakout, breakoutRooms)) + meeting, meta, playback, dataMetrics, breakout, breakoutRooms)) } } @@ -176,7 +187,7 @@ case class RecMeta(id: String, meetingId: String, internalMeetingId: Option[ Str meetingName: String, state: String, published: Boolean, startTime: Long, endTime: Long, participants: Int, rawSize: Long, isBreakout: Boolean, meeting: Option[RecMetaMeeting], meta: Option[collection.immutable.Map[String, String]], playback: Option[RecMetaPlayback], - breakout: Option[RecMetaBreakout], breakoutRooms: Vector[String]) { + dataMetrics: Option[RecMetaDataMetrics], breakout: Option[RecMetaBreakout], breakoutRooms: Vector[String]) { def setState(state: String): RecMeta = this.copy(state = state) def setPublished(publish: Boolean): RecMeta = this.copy(published = publish) @@ -253,6 +264,8 @@ case class RecMeta(id: String, meetingId: String, internalMeetingId: Option[ Str } playback foreach(p => buffer += p.toXml()) + dataMetrics foreach(p => buffer += p.toXml()) + {buffer} } @@ -305,6 +318,8 @@ case class RecMeta(id: String, meetingId: String, internalMeetingId: Option[ Str playback foreach(p => buffer += p.toMetadataXml()) + dataMetrics foreach(p => buffer += p.toMetadataXml()) + buffer += rawSizeElem {buffer} @@ -390,6 +405,43 @@ case class RecMetaPlayback(format: String, link: String, processingTime: Int, } } +case class RecMetaDataMetrics(format: String, link: String) { + def toXml(): Elem = { + + val formatElem = {format} + val urlElem = {link} + + val buffer = new scala.xml.NodeBuffer + buffer += formatElem + buffer += urlElem + + {buffer} + } + + def toMetadataXml(): Elem = { + + val formatElem = {format} + val urlElem = {link} + + val buffer = new scala.xml.NodeBuffer + buffer += formatElem + buffer += urlElem + + + {buffer} + } + + // Merged data formats when responding to get recordings API call + def toFormatXml(): Elem = { + val buffer = new scala.xml.NodeBuffer + val formatElem = {format} + val urlElem = {link} + buffer += formatElem + buffer += urlElem + + {buffer} + } +} case class RecMetaImage(width: String, height: String, alt: String, link: String) @@ -429,6 +481,7 @@ case class RecMetaResponse( meeting: Option[RecMetaMeeting], meta: Option[collection.immutable.Map[String, String]], playbacks: ListBuffer[RecMetaPlayback], + data: ListBuffer[RecMetaDataMetrics], breakout: Option[RecMetaBreakout], breakoutRooms: Vector[String]) { @@ -438,6 +491,10 @@ case class RecMetaResponse( case Some(p) => this.playbacks += p case None => } + r.dataMetrics match { + case Some(p) => this.data += p + case None => + } this } @@ -498,6 +555,12 @@ case class RecMetaResponse( val playbackElem = {formats} buffer += playbackElem + // Iterate over all formats before include the data tag + val dataFormats = new scala.xml.NodeBuffer + data foreach(p => dataFormats += p.toFormatXml()) + val dataFormatElem = {dataFormats} + buffer += dataFormatElem + {buffer} } } diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala index d8fbcebcbd..e57516da92 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala @@ -10,7 +10,7 @@ import org.bigbluebutton.api.domain.RecordingMetadata import org.bigbluebutton.api2.RecordingServiceGW import org.bigbluebutton.api2.domain._ -import scala.xml.{Elem, PrettyPrinter, XML} +import scala.xml.{Elem, PrettyPrinter, XML} import scala.collection.JavaConverters._ import scala.collection.mutable.{Buffer, ListBuffer, Map} import scala.collection.Iterable @@ -123,6 +123,10 @@ class RecMetaXmlHelper extends RecordingServiceGW with LogHelper { case Some(p) => ListBuffer(p) case None => ListBuffer() }, + recMeta.dataMetrics match { + case Some(p) => ListBuffer(p) + case None => ListBuffer() + }, recMeta.breakout, recMeta.breakoutRooms ) From 4f607d304a0e768ac99ca56cbe89d8092007836c Mon Sep 17 00:00:00 2001 From: gustavotrott Date: Thu, 11 Oct 2018 10:24:12 -0300 Subject: [PATCH 54/54] Move duplicated parameters to a constant in the beginning --- .../client/compatibility/kurento-extension.js | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/bigbluebutton-html5/client/compatibility/kurento-extension.js b/bigbluebutton-html5/client/compatibility/kurento-extension.js index e175423646..bcd267e2d2 100644 --- a/bigbluebutton-html5/client/compatibility/kurento-extension.js +++ b/bigbluebutton-html5/client/compatibility/kurento-extension.js @@ -2,6 +2,7 @@ const isFirefox = typeof window.InstallTrigger !== 'undefined'; const isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; const isChrome = !!window.chrome && !isOpera; const isSafari = navigator.userAgent.indexOf('Safari') >= 0 && !isChrome; +const isElectron = navigator.userAgent.toLowerCase().indexOf(' electron/') > -1; const kurentoHandler = null; Kurento = function ( @@ -639,29 +640,31 @@ window.getScreenConstraints = function (sendSource, callback) { }); }; - if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) { + const optionalConstraints = [ + { googCpuOveruseDetection: true }, + { googCpuOveruseEncodeUsage: true }, + { googCpuUnderuseThreshold: 55 }, + { googCpuOveruseThreshold: 100 }, + { googPayloadPadding: true }, + { googScreencastMinBitrate: 600 }, + { googHighStartBitrate: true }, + { googHighBitrate: true }, + { googVeryHighBitrate: true }, + ]; + + if (isElectron) { var sourceId = ipcRenderer.sendSync('screen-chooseSync'); kurentoManager.kurentoScreenshare.extensionInstalled = true; // this statement sets gets 'sourceId" and sets "chromeMediaSourceId" screenConstraints.video.chromeMediaSource = { exact: [sendSource] }; screenConstraints.video.chromeMediaSourceId = sourceId; - screenConstraints.optional = [ - { googCpuOveruseDetection: true }, - { googCpuOveruseEncodeUsage: true }, - { googCpuUnderuseThreshold: 55 }, - { googCpuOveruseThreshold: 100 }, - { googPayloadPadding: true }, - { googScreencastMinBitrate: 600 }, - { googHighStartBitrate: true }, - { googHighBitrate: true }, - { googVeryHighBitrate: true }, - ]; + screenConstraints.optional = optionalConstraints; console.log('getScreenConstraints for Chrome returns => ', screenConstraints); return callback(null, screenConstraints); } - + if (isChrome) { const extensionKey = kurentoManager.getChromeExtensionKey(); getChromeScreenConstraints(extensionKey).then((constraints) => { @@ -677,17 +680,7 @@ window.getScreenConstraints = function (sendSource, callback) { // this statement sets gets 'sourceId" and sets "chromeMediaSourceId" screenConstraints.video.chromeMediaSource = { exact: [sendSource] }; screenConstraints.video.chromeMediaSourceId = sourceId; - screenConstraints.optional = [ - { googCpuOveruseDetection: true }, - { googCpuOveruseEncodeUsage: true }, - { googCpuUnderuseThreshold: 55 }, - { googCpuOveruseThreshold: 100 }, - { googPayloadPadding: true }, - { googScreencastMinBitrate: 600 }, - { googHighStartBitrate: true }, - { googHighBitrate: true }, - { googVeryHighBitrate: true }, - ]; + screenConstraints.optional = optionalConstraints; console.log('getScreenConstraints for Chrome returns => ', screenConstraints); return callback(null, screenConstraints);