Giter Club home page Giter Club logo

jitsi-meet-electron-sdk's Introduction

Jitsi Meet Electron SDK

SDK for integrating Jitsi Meet into Electron applications.

Supported Electron versions: >= 16.

Installation

Install from npm:

npm install @jitsi/electron-sdk

Note: This package contains native code on Windows for the remote control module. Binary prebuilds are packaged with prebuildify as part of the npm package.

Usage

Remote Control

Requirements: The remote control utility requires iframe HTML Element that will load Jitsi Meet.

Enable the remote control:

In the render electron process of the window where Jitsi Meet is displayed:

const {
    RemoteControl
} = require("@jitsi/electron-sdk");

// iframe - the Jitsi Meet iframe
const remoteControl = new RemoteControl(iframe);

To disable the remote control:

remoteControl.dispose();

NOTE: dispose method will be called automatically when the Jitsi Meet iframe unload.

In the main electron process:

const {
    RemoteControlMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance of the window where Jitsi Meet is loaded.
const remoteControl = new RemoteControlMain(mainWindow);

Screen Sharing

Requirements: The screen sharing utility requires iframe HTML Element that will load Jitsi Meet.

Enable the screen sharing:

In the render electron process of the window where Jitsi Meet is displayed:

const {
    setupScreenSharingRender
} = require("@jitsi/electron-sdk");

// api - The Jitsi Meet iframe api object.
setupScreenSharingRender(api);

In the main electron process:

const {
    setupScreenSharingMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance of the window where Jitsi Meet is loaded.
// appName - Application name which will be displayed inside the content sharing tracking window
// i.e. [appName] is sharing your screen.
// osxBundleId - Mac Application bundleId for which screen capturer permissions will be reset if user denied them.  
setupScreenSharingMain(mainWindow, appName, osxBundleId);

Always On Top

Displays a small window with the current active speaker video when the main Jitsi Meet window is not focused.

Requirements:

  1. Jitsi Meet should be initialized through our iframe API
  2. The BrowserWindow instance where Jitsi Meet is displayed should use the Chrome's window.open implementation (set nativeWindowOpen option of BrowserWindow's constructor to true).
  3. If you have a custom handler for opening windows you have to filter the always on top window. You can do this by its frameName argument which will be set to AlwaysOnTop.

Enable the aways on top:

In the main electron process:

const {
    setupAlwaysOnTopMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance
// of the window where Jitsi Meet is loaded.
setupAlwaysOnTopMain(jitsiMeetWindow);

In the render electron process of the window where Jitsi Meet is displayed:

const {
    setupAlwaysOnTopRender
} = require("@jitsi/electron-sdk");

const api = new JitsiMeetExternalAPI(...);
const alwaysOnTop = setupAlwaysOnTopRender(api);

alwaysOnTop.on('will-close', handleAlwaysOnTopClose);

setupAlwaysOnTopRender return an instance of EventEmitter with the following events:

  • dismissed - emitted when the always on top window is explicitly dismissed via its close button

  • will-close - emitted right before the always on top window is going to close

Power Monitor

Provides a way to query electron for system idle and receive power monitor events.

enable power monitor: In the main electron process:

const {
    setupPowerMonitorMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance
// of the window where Jitsi Meet is loaded.
setupPowerMonitorMain(jitsiMeetWindow);

In the render electron process of the window where Jitsi Meet is displayed:

const {
    setupPowerMonitorRender
} = require("@jitsi/electron-sdk");

const api = new JitsiMeetExternalAPI(...);
setupPowerMonitorRender(api);

NOTE:

You'll need to add 'disable-site-isolation-trials' switch because of electron/electron#18214:

app.commandLine.appendSwitch('disable-site-isolation-trials')

Example

For examples of installation and usage checkout the Jitsi Meet Electron project.

Development

Enable husky to avoid accidental pushes to the main branch:

npx husky install

To rebuild the native code, use:

npx node-gyp rebuild

Publishing

On every push to main branch, the .github/workflows/ci.yml will create a new version and publish to npm.

If a major or minor release is required, use respective key words in the commit message, see https://github.com/phips28/gh-action-bump-version#workflow

jitsi-meet-electron-sdk's People

Contributors

akshitkrnagpal avatar andrei-gavrilescu avatar andreieftimie avatar bgrozev avatar csett86 avatar damencho avatar dependabot[bot] avatar dudumanbogdan avatar egm0121 avatar gabiborlea avatar gimre avatar horymury avatar hristoterezov avatar marshallofsound avatar mzanfirescu avatar quitrk avatar saghul avatar virtuacoplenny avatar yanas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jitsi-meet-electron-sdk's Issues

Remote Control

Hi, I want to test remote control but I could not activate it. What steps do I need to follow in this regard?

usage remote control
In which file do I need to apply the codes specified in this address?

Regards,

Getting cannot read properties of undefined (reading 'setupScreenSharingRender') with react and electron

Getting the below error when I am trying to load
import { setupScreenSharingRender } from '@jitsi/electron-sdk';

I am using this boilerplate for electron and react: https://github.com/electron-react-boilerplate/electron-react-boilerplate

TypeError: Cannot read properties of undefined (reading 'setupScreenSharingRender')
Call Stack
 handleApiReady
  main.fd626d8d05b4da9fc04b.hot-update.js:112:65
 onApiReady
  main.fd626d8d05b4da9fc04b.hot-update.js:213:41
 undefined
  renderer.dev.js:27887:49
 undefined
  renderer.dev.js:27913:17
 commitHookEffectListMount
  renderer.dev.js:149820:26
 commitPassiveMountOnFiber
  renderer.dev.js:151596:13
 commitPassiveMountEffects_complete
  renderer.dev.js:151561:9
 commitPassiveMountEffects_begin
  renderer.dev.js:151548:7
 commitPassiveMountEffects
  renderer.dev.js:151536:3
 flushPassiveEffectsImpl
  renderer.dev.js:153709:3

Missing prebuilts

Looks like the last few releases have missing prebuilt artifacts.

ScreenShare: window.JitsiMeetElectron is undefined due to loading external Jitsi Meets domain

Hello,

In the screensharing/renderer.js an attempt is made to add JitsiMeetElectron property to contentWindow of the current iframe.

https://github.com/jitsi/jitsi-meet-electron-sdk/blob/master/screensharing/render.js

However, since my Electron app is loading a React app server running on localhost. And the React app is instantiating a Jitsi Meets iframe with a different source url, it is unable to add the property. Or at least that's my leading theory of why the property is not being properly added to the external Jitsi Meets iframe window. If I log the content of this._iframe.contentWindow.JitsiMeetElectron directly after setting it in the renderer.js file, it shows up as undefined. And when the desktoppicker of the jitsi meets API attempts to access it when the user attempts to screen share, it just shows up as undefined.

I am puzzled on how this is supposed to work, as I assume my scenario should be a common one, given that electron apps run locally, and should load external jitsi meeting pages from other domains? I did disable web security already for all of my Electron Windows. And I added the special cors commands mentioned in the README. Is it more common that the jitsi meet and Electron app window are running on the same domain?

Could this issue be the same as #325 ?

Screen Sharing & Remote Control

Both clients on Linux Fedora 32 screen share and remote control do not work. Neither through the Appimage of jitsi-meet-electron, nor building from source.

I had to change const ENABLE_REMOTE_CONTROL = false; to const ENABLE_REMOTE_CONTROL = true in /app/features/conference/Conference.js to get the remote control option to show. It does correctly ask the other user for permission to grant control, though it does not actually send any input to the other system.

Screen share only works for showing individual applications, but not the whole screen. The UI functions, but it shows available screens as black, and when sharing screens the others in the call only see the black screen.

I am not sure what to look for to fix this issue, but please let me know how I can help!

Question: failed to introduce the project

Error: The module '\?\G:\ZZF\electron-vue-template-SynchronizedUpdates\node_modules\jitsi-meet-electron-utils\node_modules\robotjs\build\Release\robotjs.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at process.func (electron/js2c/asar.js:138:31)
at process.func [as dlopen] (electron/js2c/asar.js:138:31)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18)
at Object.func (electron/js2c/asar.js:138:31)
at Object.func [as .node] (electron/js2c/asar.js:138:31)
at Module.load (internal/modules/cjs/loader.js:645:32)
at Function.Module._load (internal/modules/cjs/loader.js:560:12)
at Module.require (internal/modules/cjs/loader.js:685:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (G:\ZZF\electron-vue-template-SynchronizedUpdates\node_modules\jitsi-meet-electron-utils\node_modules\robotjs\index.js:1:15)

Release prebuilt robotjs packages

Do so in https://github.com/jitsi/robotjs which we were using before. We might need to publish the package on npm I think, we can do that as @jitsi/robotjs. The package has been "orphaned" for years, AFAICT, and we have no intention of becoming the maintainers, but providing prebuilt packages, which can be done with a GH action easily would simplify things.

Error: No native build was found for platform

Hi. After importing and calling setupScreenSharingMain in my electron/main/index.ts file I get an error (after running the electron app).

index.ts:
import { setupScreenSharingMain } from '@jitsi/electron-sdk'
setupScreenSharingMain(mainWindow, appName, osxBundleId)

Error:

Error: No native build was found for platform=win32 arch=x64 runtime=electron abi=118 uv=1 libc=glibc node=18.17.1 electron=27.0.3
    loaded from: C:\Users\...\Documents\...\out\main
    at load.path (C:\Users\...\Documents\...\out\main\index.js:51321:9)
    at load (C:\Users\...\Documents\...\out\main\index.js:51284:30)
    at C:\Users\...\Documents\...\out\main\index.js:51675:18
    at Object.<anonymous> (C:\Users\...\Documents\...\out\main\index.js:51708:3)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Object..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at loadApplicationPackage (C:\Users\...\Documents\...\node_modules\electron\dist\resources\default_app.asar\main.js:121:16)

I tried already to downgrade electron to several older versions, each giving the same error (with of course different electron versions). I also tried the @electron/rebuild library with no success. Any idea what I can do to call the setupScreenSharingMain function without crashing? :)

I am using Windows 11.

Opened app with deep link and Error: Called JitsiMeetElectron.obtainDesktopStreams but it is not defined

Jitsi electron app works fine when run from a terminal or packaged version in Windows. But can't start screen sharing once I join the meeting from a DEEP LINK where the above error throws up. The following segment is part of the createJitsiMeetWindow function where I handle the deep link:

const options = {
        x: windowState.x,
        y: windowState.y,
        width: windowState.width,
        height: windowState.height,
        icon: path.resolve(basePath, './resources/icon.png'),
        minWidth: 800,
        minHeight: 600,
        show: false,
        webPreferences: {
            enableBlinkFeatures: 'WebAssemblyCSP',
            showDevTools: false,
            contextIsolation: false,
            nodeIntegration: false,
            enableRemoteModule: true,
            preload: path.resolve(basePath, './build/preload.js'),
            sandbox: false,
            webSecurity: false
        }
    };

mainWindow = new BrowserWindow(options);
    windowState.manage(mainWindow);
 setupScreenSharingMain(mainWindow, config.default.appName, pkgJson.build.appId);
    const urlMatch = DeepLinkDetector.isJoinMeetingDeepLink(process.argv)
    let meetingId;
    let pwd;
    let pmu;
    log.info("IS IT MATCHED ============1", urlMatch, typeof urlMatch);
    if (urlMatch) {
        // log.info("DEBUG LOG", 1);
        [, meetingId, pmu, pwd] = urlMatch
        // log.info("DEBUG LOG", 2);
        const loadUrl = `${config.default.baseUrl}m/j/${meetingId}/${pmu}?pwd=${pwd}`
        log.info("CHECK URL  =========1", loadUrl)
        mainWindow.maximize();
        mainWindow.setMenu(null);
        mainWindow.loadURL(loadUrl);
        process.argv.pop()
        return;
    }

The preload script is loaded in the web preferences before the deep link, once the app is loaded with the deep link i can join the meeting but the variable JitsiMeetElectron inside the window object is missing and cant do screen share.

Error when building with electron-builder on windows

Hello guys,
I'm trying to build my app for windows (32bits & 64bits) with electron-builder but it's failing with this error:

 cannot build native dependency  reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
                                    cause=exit status 1
                                    errorOut=prebuild-install info begin Prebuild-install version 5.3.3
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for cached prebuild @ /Users/abrantes/.npm/_prebuilds/ac4c73-jitsi-meet-electron-utils-v2.0.1-electron-v76-win32-x64.tar.gz
    prebuild-install http request GET https://github.com/jitsi/jitsi-meet-electron-utils/releases/download/v2.0.1/jitsi-meet-electron-utils-v2.0.1-electron-v76-win32-x64.tar.gz
    prebuild-install http 404 https://github.com/jitsi/jitsi-meet-electron-utils/releases/download/v2.0.1/jitsi-meet-electron-utils-v2.0.1-electron-v76-win32-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=8.2.1 runtime=electron arch=x64 libc= platform=win32)
    
                                    command=/usr/local/bin/node /Users/abrantes/Documents/projects/my-app-desktop/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=8.2.1 --runtime=electron --verbose --force
                                    workingDir=/Users/abrantes/Documents/projects/my-app-desktop/node_modules/jitsi-meet-electron-utils
  ⨯ /Users/abrantes/Documents/projects/my-app-desktop/node_modules/app-builder-lib/node_modules/app-builder-bin/mac/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE  stackTrace=
                                                                                                                                                                                      Error: /Users/abrantes/Documents/projects/my-app-desktop/node_modules/app-builder-lib/node_modules/app-builder-bin/mac/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
                                                                                                                                                                                          at ChildProcess.childProcess.once.code (/Users/abrantes/Documents/projects/my-app-desktop/node_modules/app-builder-lib/node_modules/builder-util/src/util.ts:239:14)

I'm using :
NodeJs 10.18.0
MAC OS 10.15
Electron 8.2.1

Looks like the binaries for robotjs cannot be found. Do you have any idea of what I'm doing wrong ?

Integrate with API

Hi
I am trying to call Jitsi Meet inside my application using Jitsi meet API. I wanted to know how i can implement Always on top , Screen Sharing and Transcribe.

Screen Sharing is working when i try in the Browser but When i try inside Electron App its not working ( it calls the screen share pop up but doesnt initialize the screen sharing.

Please help

Prem

Context Isolation error

For IPC message exchange context isolation is the best practice, but the following error throws up after enabling context isolation:

Uncaught Error: An object could not be cloned.
at Conference._loadConference (Conference.js:176:25)

the error is thrown in the following cone snippet of Conference.js:

// Setup Jitsi Meet Electron SDK on this renderer.
    window.jitsiNodeAPI.setupRenderer(this._api, {
      enableRemoteControl: ENABLE_REMOTE_CONTROL,
      enableAlwaysOnTopWindow: this.props._alwaysOnTopWindowEnabled
 });

After digging further, found the cause which is the setupRenderer function takes in the API native class which is not supported by the structured clone algorithm.
Please comment if anyone know any work around, Thanks!

jitsi with jetty on ubuntu 16.04

For my jitsi meet on my private platform I would like to use the electron utils for changing the welcome page and eventually remote controlling jitsi. The webserver is jetty.
Thanks for advice.
Best regards
Toni

error Import this project jitsi-meet-electron-utils

  1. my project name Electron-vue ,Import this project jitsi-meet-electron-utils

  2. package.js --->
    "dependencies": {
    "electron": "^6.0.12",
    "jitsi-meet-electron-utils": "github:jitsi/jitsi-meet-electron-utils#v1.0.2"
    ......

  3. npm install github:jitsi/jitsi-meet-electron-utils#v1.0.2

  4. error:
    Error: C:\Program Files\nodejs\node.exe exited with code 1
    Error output:
    × Install fail! Error: EEXIST: file already exists, symlink 'G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_robotjs@0.5.1@robotjs' -> 'G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\robotjs'
    Error: EEXIST: file already exists, symlink 'G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_robotjs@0.5.1@robotjs' -> 'G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\robotjs'
    npminstall version: 3.23.0
    npminstall args: C:\Program Files\nodejs\node.exe C:\Users\mynames\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js rebuild [email protected] [email protected] [email protected]

    at ChildProcess. (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\builder-util\src\util.ts:244:14)
    at Object.onceWrapper (events.js:300:26)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
    From previous event:
    at _rebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\src\util\yarn.ts:179:5)
    at rebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\out\util\yarn.js:163:19)
    at G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\src\util\yarn.ts:20:11
    From previous event:
    at _installOrRebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\out\util\yarn.js:71:28)
    at installOrRebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\out\util\yarn.js:55:28)
    at G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\src\cli\install-app-deps.ts:58:9
    at Generator.next ()
    at processImmediate (internal/timers.js:439:21)
    From previous event:
    at _installAppDeps (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\out\cli\install-app-deps.js:177:26)
    at installAppDeps (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\out\cli\install-app-deps.js:146:26)
    at G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\src\cli\cli.ts:49:19
    [npminstall:runscript:error] [email protected] scripts.postinstall run "electron-builder install-app-deps" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c electron-builder install-app-deps" error, exit code 1
    at ChildProcess. (C:\Users\mynames\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
    name: 'RunScriptError',
    stdio: [Object]
    }
    × Install fail! RunScriptError: post install error, please remove node_modules before retry!
    Run "C:\Windows\system32\cmd.exe /d /s /c electron-builder install-app-deps" error, exit code 1
    RunScriptError: Run "C:\Windows\system32\cmd.exe /d /s /c electron-builder install-app-deps" error, exit code 1
    at ChildProcess. (C:\Users\mynames\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
    npminstall version: 3.23.0
    npminstall args: C:\Program Files\nodejs\node.exe C:\Users\mynames\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\mynames.cnpmrc --disturl=https://npm.taob
    ao.org/mirrors/node --registry=https://r.npm.taobao.org

G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project>npm run postinstall

[email protected] postinstall G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project
electron-builder install-app-deps

• electron-builder version=20.44.4
• loaded configuration file=package.json ("build" field)
• rebuilding native production dependencies platform=win32 arch=x64
Error: C:\Program Files\nodejs\node.exe exited with code 1
Output:

[email protected] install G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_jitsi-meet-electron-utils@1.0.2@jitsi-meet-electron-utils
prebuild-install || node-gyp rebuild

G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_jitsi-meet-electron-utils@1.0.2@jitsi-meet-electron-utils>"node" "G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_jitsi-meet-electron-utils@1.0.2@ji
tsi-meet-electron-utils\node_modules.bin\......_prebuild-install@5.3.2@prebuild-install\bin.js"

[email protected] install G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_robotjs@0.5.1@robotjs
node-gyp rebuild

G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_robotjs@0.5.1@robotjs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\nod
e-gyp\bin\node-gyp.js" rebuild ) else (node "node C:\Users\me\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

Error output:
internal/modules/cjs/loader.js:797
throw err;
^

Error: Cannot find module 'G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules_robotjs@0.5.1@robotjs\node C:\Users\me\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mynames\AppData\Roaming\npm-cache_logs\2019-10-18T08_03_59_992Z-debug.log

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11 {
at ChildProcess.<anonymous> (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\builder-util\src\util.ts:244:14)
at Object.onceWrapper (events.js:300:26)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

From previous event:
at _rebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\src\util\yarn.ts:179:5)
at rebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\out\util\yarn.js:163:19)
at G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\src\util\yarn.ts:20:11
From previous event:
at _installOrRebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\out\util\yarn.js:71:28)
at installOrRebuild (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\app-builder-lib\out\util\yarn.js:55:28)
at G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\src\cli\install-app-deps.ts:58:9
at Generator.next ()
at processImmediate (internal/timers.js:439:21)
From previous event:
at _installAppDeps (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\out\cli\install-app-deps.js:177:26)
at installAppDeps (G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\out\cli\install-app-deps.js:146:26)
at G:\webstromProject\MoNaoXiaoMi\XiaoMiCode\my-project\node_modules\electron-builder\src\cli\cli.ts:49:19
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: electron-builder install-app-deps
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mynames\AppData\Roaming\npm-cache_logs\2019-10-18T08_04_00_086Z-debug.log

Import errors (path related) in angular 2.

Hello,

I've follow the instructions to import this in an electron app but I do want to import it inside Angular 2.

Here's my configuration and the import path errors I keep getting:

errors:
https://i.imgur.com/2aFalVM.png

package.json

{
  "name": "angular2-quickstart",
  "version": "1.0.0",
  "scripts": {
    "start": "\"npm run tsc:w\" ",
    "lite": "lite-server",
    "postinstall": "typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings"
  },
  "license": "ISC",
  "dependencies": {
    "@angular/common": "4.2.3",
    "@angular/compiler": "4.2.3",
    "@angular/compiler-cli": "4.2.3",
    "@angular/core": "4.2.3",
    "@angular/forms": "4.2.3",
    "@angular/http": "4.2.3",
    "@angular/platform-browser": "4.2.3",
    "@angular/platform-browser-dynamic": "4.2.3",
    "@angular/router": "4.2.3",
    "@angular/upgrade": "4.2.3",
    "bootstrap": "^3.3.6",
    "core-js": "^2.5.1",
    "jitsi-meet-electron-utils": "github:jitsi/jitsi-meet-electron-utils",
    "reflect-metadata": "^0.1.10",
    "rxjs": "5.4.1",
    "systemjs": "0.20.14",
    "zone.js": "^0.8.18"
  },
  "devDependencies": {
    "concurrently": "^3.5.0",
    "electron": "1.7.8",
    "electron-rebuild": "^1.6.0",
    "lite-server": "^2.3.0",
    "typescript": "^2.6.1",
    "typings": "^2.1.1"
  }
}

My system.config.js

/**
 * System configuration for Angular 2 samples
 * Adjust as necessary for your application needs.
 */
(function (global) {
  System.config({
    paths: {
      // paths serve as alias
      'npm:': 'assets/scripts/node_modules/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: '',
      // angular bundles
      '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
      '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
      '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
      '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
      // other libraries
      'rxjs':                       'npm:rxjs',
      'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
      'electron': 'npm:electron',
      'jitsi-meet-electron-utils': 'npm:jitsi-meet-electron-utils',
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      app: {
        main: 'assets/scripts/app/main.js',
        defaultExtension: 'js'
      },
      rxjs: {
        defaultExtension: 'js'
      },
      'angular2-in-memory-web-api': {
        main: './index.js',
        defaultExtension: 'js'
      },
      'jitsi-meet-electron-utils': {
        main: './index.js',
        defaultExtension: 'js'
      },
      'electron': {
        main: './index.js',
        defaultExtension: 'js'
      }
    }
  });
})(this);

Any help would be appreciated.

Thanks.

I got error with electron forge

Hi,

When I try "electron-forge make" on electron forge initial project I got electron rebuild error about @jitsi/electron-sdk 3.3.6 version.

Ekran Resmi 2022-12-21 09 29 42

Weird windows (about:blank) pop-up when desktop app put in background (AOT feature)

@hristoterezov I am seeing this weird window popup issue when my desktop app put in background (AOT). I have my own windows electron desktop app and I use jitsi-meet-electron-utils package for always on top feature. I noticed this line in the code:

// Intentionally open about:blank. Otherwise if an origin is set, a // cross-origin redirect can cause any set global variables to be blown // away. this._alwaysOnTopWindow = window.open('', 'AlwaysOnTop');
Not sure, if this is causing the issue, but it seems bit frustrating for windows user. Any idea, how could we solve it?

Below is the Popup image I see:
Screenshot 2021-06-30 at 3 28 32 PM

More details here: https://community.jitsi.org/t/weird-windows-pop-up-when-desktop-app-put-in-background-always-on-top-feature/102151

Release 3.0.0

I no longer have any blockers. The migration to a module needs a bit more work, we can do that later. I opened a draft PR.

Turn the package into a module

Replace require's with import and make it type: module in package.json. This will allow us to strop adding exceptions for it in webpack config and tree-shaking should just work.

We might also want to get rid of index.js and have the main and renderer helpers be completely separate import paths.

Screen Share dialog showing loading ....

I am using Jitsi electron project using angular. My application has a problem with the screen share both on mac and windows.
Screenshot 2022-01-27 at 2 23 12 AM

The logs are showing following error
Screenshot 2022-01-27 at 2 23 50 AM
Screenshot 2022-01-27 at 2 23 38 AM

When I used jistsi meet electron SDK the app is stuck when I used setupScreenSharingRender(this.api)

I am using the latest SDK and apis.

Please help me resolving this issue.

Regards

Importing jitsi-meet-electron-utils in Angular 9

I'm trying to import this module into Angular 9 project but i cant seem to find a clear way to do it.

What i had success with was including the node_modules JavaScript file directly in index.html of the Angular project and declaring it as a const and using it elsewhere. The problem is with this i think when the bundle / build process will happen i'm not sure if it will include it in the build.

<script src="/node_modules/jitsi-meet-electron-utils/index.js"></script>
<script type="text/javascript">const jitsiMeetElectronUtils = require('jitsi-meet-electron-utils');</script>

Can you provide insight on how to import jitsi-meet-electron-utils in Angular 9 please?

remote control errors

I want to test and use jitsi's remote control.
First, I download jitsi-meet-electron v2022.7.1
Then I changed main.js & app/features/conference/components/Conference.js
[ENABLE_REMOTE_CONTROL]
const ENABLE_REMOTE_CONTROL = true;

Second,I build the electron app.
I open a meeting use [https://meet.jit.si/] [UserA] and jion the meeting use jitsi-meet-electron [UserB], then [UserB] accept 'remote control'.
After [UserB] choosed a screen ,The electron App report error,and hang up.

1659320014380
The detail error happened on this:
const parsedSourceId = sourceId.replace('screen:', '');

I found the [node_modules@jitsi\electron-sdk\remotecontrol\render.js] sourceId is null .
sourceId null
sourceId null2

SO the RemoteControlMain function could not working

ipcMain.on('jitsi-remotecontrol-get-display', (event, sourceId) => {
       event.returnValue = this._getDisplay(sourceId);
});

I don't know why it is?
I think maybe the sourceId should get it manually,I try to use my poor js ability ...,but could not success.

--update 0808
I found what happen, the jitsi-meet
react/features/base/tracks/actions.js Funciton sendStartRequest
getLocalVideoTrack should change to getLocalDesktopTrack
And Now new commit already cover it.
jitsi/jitsi-meet@4d41d36
1659929718846

So maybe next release,I can use It.

Screen sharing with Electron that load url

Hi everyone.

I developed a small Electron Dekstop application that handle's login on my webapp and then "load" the webapp through an Electron loadUrl().

We already implemented Jitsi meet in that webapp (with specific UI etc). Everything works fine except the screen sharing.
(The first development was years ago, and since Electron did not allowed custom chrome extension we just didn't bother to make the screen sharing work).

Since then a lot of changes happened and it seems like this project managed to make it work.

I am aware of the solution that allows electron to use the jitsi screen sharing through @jitsi/electron-sdk but i'm wondering whether a solution exists in my case (AKA Jitsi not being implemented directly in Electron, but through a loadUrl()).

Is there a chrome extension that I could add to my electron project allowing chromium to get the JitsiMeetElectron.obtainDesktopStreams function ?

Or is the only solution to implement from scratch jitsi in our Electron project ?

Thanks in advance.

Replace electron remote API to be ready for Electron 14+

Electron 14 removes the deprecated remote API: https://www.electronjs.org/docs/breaking-changes#removed-remote-module

At the same time Microsoft requires Chrome-based apps (including Electron) to be not older than 2 major versions for the Microsoft Store: https://www.electronjs.org/blog/8-week-cadence/ (in effect since July 28th)

Thus the goal to remove or replace all remote API calls from jitsi-meet-electron-utils.

@electron/remote is not a drop-in replacement, as it cannot be "required" on the main thread, thus it needs to be carefully "required" only inside functions that are on the render thread (via @electron/remote) and on the main thread (via @electron/remote/main).

Autopublish?

Some time ago I created this, which we use on some of our JS packages: https://github.com/jitsi/gh-action-autopublish

The idea is simple: bbump the minor and create a new npm release when a PR gets merged.

If a PR needs to change the minor / major, that can be done as part of the PR and the script notices it and skips the bump.

Thoughts on adding it here?

Does the "alwaysOnTop" small window support setting avatar?

Hello. When I integrated jitsi-meet-electron-sdk, I found that when using the alwaysOnTop api, I set the avatar in the large window, but when the window lost the cursor and generated a small window, the small window failed to inherit the avatar set by the large window, but displayed the default avatar of letters.

I looked at the SDK source code and couldn't find any api and code implementation that can set the avatar.

Is there any way to set a small window user avatar?

large window:
image

small window:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.