AutorÃa | Ultima modificación | Ver Log |
{"version":3,"file":"commands_screen.min.js","sources":["../src/commands_screen.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Tiny Record RTC - record screen command.\n *\n * @module tiny_recordrtc/commands_screen\n * @copyright 2024 The Open University\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n *
/\n\nimport {getString} from 'core/str';\nimport {getButtonImage as getScreenIcon} from 'editor_tiny/utils';\nimport {\n screenButtonName,\n component,\n} from './common';\nimport {isScreenAllowed} from './options';\nimport Recorder from './screen_recorder';\n\nexport default async() => {\n if (!Recorder.isBrowserCompatible()) {\n // The browser doesn't support the plugin, so just don't show it.\n return () => false;\n }\n\n const [\n screenButtonTitle,\n buttonImage,\n ] = await Promise.all([\n getString('screenbuttontitle', component),\n getScreenIcon('screen', component),\n ]);\n\n return (editor) => {\n // Screen recording is not currently supported on mobile devices.\n // Therefore, it will be disabled and should be considered for future implementation.\n if (!isScreenAllowed(editor) || !editor.editorManager.Env.deviceType.isDesktop()) {\n return;\n }\n\n const icon = 'screen';\n editor
.ui.registry.addIcon(icon, buttonImage.html);\n editor.ui.registry.addButton(screenButtonName, {\n icon,\n tooltip: screenButtonTitle,\n onAction: () => Recorder.display(editor),\n });\n\n editor.ui.registry.addMenuItem(screenButtonName, {\n icon,\n text: screenButtonTitle,\n onAction: () => Recorder.display(editor),\n });\n };\n};\n"],"names":["async","Recorder","isBrowserCompatible","screenButtonTitle","buttonImage","Promise","all","component","editor","editorManager","Env","deviceType","isDesktop","ui","registry","addIcon","html","addButton","screenButtonName","icon","tooltip","onAction","display","addMenuItem","text"],"mappings":";;;;;;;uLAgCeA,cACNC,yBAASC,4BAEH,KAAM,QAIbC,kBACAC,mBACMC,QAAQC,IAAI,EAClB,kBAAU,oBAAqBC,oBAC/B,yBAAc,SAAUA,4BAGpBC,cAGC,4BAAgBA,UAAYA,OAAOC,cAAcC,IAAIC,WAAWC,mBAKrEJ,OAAOK,GAAGC,SAASC,QADN,SACoBX,YAAYY,MAC7CR,OAAOK,GAAGC,SAASG,UAAUC,yBAAkB,CAC3CC,KAHS,SAITC,QAASjB,kBACTkB,SAAU,IAAM
pB,yBAASqB,QAAQd,UAGrCA,OAAOK,GAAGC,SAASS,YAAYL,yBAAkB,CAC7CC,KATS,SAUTK,KAAMrB,kBACNkB,SAAU,IAAMpB,yBAASqB,QAAQd"}