Ver código fonte

Use full window on mobile devices

Penar Musaraj 4 anos atrás
pai
commit
ff8add958a

+ 4 - 2
assets/javascripts/discourse/initializers/bbb.js.es6

@@ -3,9 +3,11 @@ import showModal from "discourse/lib/show-modal";
 import { iconHTML } from "discourse-common/lib/icon-library";
 import { ajax } from "discourse/lib/ajax";
 import { popupAjaxError } from "discourse/lib/ajax-error";
+import { isAppWebview } from "discourse/lib/utilities";
 
 function launchBBB($elem, fullWindow) {
-  const data = $elem.data();
+  const data = $elem.data(),
+    site = Discourse.__container__.lookup("site:main");
 
   ajax("/bbb/create.json", {
     type: "POST",
@@ -13,7 +15,7 @@ function launchBBB($elem, fullWindow) {
   })
     .then((res) => {
       if (res.url) {
-        if (fullWindow) {
+        if (fullWindow || site.mobileView || isAppWebview()) {
           window.location.href = res.url;
         } else {
           $elem.children().hide();

+ 1 - 1
config/locales/server.en.yml

@@ -3,6 +3,6 @@ en:
     bbb_enabled: "Enable BigBlueButton integration"
     bbb_endpoint: "BigBlueButton Server URL (must include `api/`, as in: mysite.com/bigbluebutton/api/)."
     bbb_secret: "BigBlueButton Shared Secret"
-    bbb_full_window: "If unchecked, video conference will load in an iframe."
+    bbb_full_window: "If unchecked, video conference will load in an iframe on desktop clients."
     bbb_staff_only: "Only show toolbar button to staff members."
     bbb_moderator_group_name: "Add the name of a group whose members should log in as moderators in video conferences."