matterbridge-example-camera 0.0.4-dev-20260719-49470d3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -28,19 +28,6 @@ If you like this project and find it useful, please consider giving it a star on
28
28
 
29
29
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
30
30
 
31
- ## [0.0.5] - Dev branch
32
-
33
- ## Added
34
-
35
- - [wirift]: Add codec negotiation and ffmpeg windows path.
36
-
37
- ## Changed
38
-
39
- - [package]: Update dependencies.
40
- - [package]: Upgrade package.
41
-
42
- <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
43
-
44
31
  ## [0.0.4] - 2026-07-19
45
32
 
46
33
  ### Added
@@ -1,9 +1,8 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { createSocket } from 'node:dgram';
3
3
  import { constants } from 'node:fs';
4
- import { access, readdir } from 'node:fs/promises';
5
- import path from 'node:path';
6
- import { RTCPeerConnection, RTCRtpCodecParameters, useH264, useOPUS, usePCMU, useVP8 } from 'werift';
4
+ import { access } from 'node:fs/promises';
5
+ import { RTCPeerConnection, RTCRtpCodecParameters } from 'werift';
7
6
  import { navigator } from 'werift/nonstandard';
8
7
  export class WeriftWebRtcSession {
9
8
  peerConnection;
@@ -13,7 +12,7 @@ export class WeriftWebRtcSession {
13
12
  testVideoUdpDisposer;
14
13
  testVideoAttached = false;
15
14
  constructor(logger, label = 'WebRTC session') {
16
- this.peerConnection = new RTCPeerConnection({ codecs: { audio: [useOPUS(), usePCMU()], video: [useVP8(), useH264()] } });
15
+ this.peerConnection = new RTCPeerConnection();
17
16
  this.logger = logger;
18
17
  this.label = label;
19
18
  this.log('debug', 'Created RTCPeerConnection');
@@ -53,43 +52,8 @@ export class WeriftWebRtcSession {
53
52
  }
54
53
  return false;
55
54
  }
56
- async getWindowsCommandCandidates(command) {
57
- if (process.platform !== 'win32')
58
- return [];
59
- const commandName = command.toLowerCase().replace(/\.exe$/, '');
60
- const executable = command.toLowerCase().endsWith('.exe') ? command : `${command}.exe`;
61
- const candidates = [];
62
- if (commandName === 'ffmpeg' && process.env.LOCALAPPDATA) {
63
- const wingetPackages = path.join(process.env.LOCALAPPDATA, 'Microsoft', 'WinGet', 'Packages');
64
- try {
65
- const packageDirs = await readdir(wingetPackages, { withFileTypes: true });
66
- for (const packageDir of packageDirs) {
67
- if (!packageDir.isDirectory() || !packageDir.name.startsWith('Gyan.FFmpeg_'))
68
- continue;
69
- const packagePath = path.join(wingetPackages, packageDir.name);
70
- try {
71
- const versionDirs = await readdir(packagePath, { withFileTypes: true });
72
- for (const versionDir of versionDirs) {
73
- if (versionDir.isDirectory() && versionDir.name.startsWith('ffmpeg-'))
74
- candidates.push(path.join(packagePath, versionDir.name, 'bin', executable));
75
- }
76
- }
77
- catch {
78
- }
79
- }
80
- }
81
- catch {
82
- }
83
- }
84
- for (const programFiles of [process.env.ProgramFiles, process.env['ProgramFiles(x86)']]) {
85
- if (!programFiles)
86
- continue;
87
- candidates.push(path.join(programFiles, 'ffmpeg', 'bin', executable), path.join(programFiles, 'Gyan', 'FFmpeg', 'bin', executable));
88
- }
89
- return candidates;
90
- }
91
55
  async resolveCommand(command) {
92
- const candidates = [command, `/usr/bin/${command}`, `/bin/${command}`, `/usr/local/bin/${command}`, ...(await this.getWindowsCommandCandidates(command))];
56
+ const candidates = [command, `/usr/bin/${command}`, `/bin/${command}`, `/usr/local/bin/${command}`];
93
57
  for (const candidate of candidates) {
94
58
  if (candidate.includes('/')) {
95
59
  try {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-camera",
3
- "version": "0.0.4-dev-20260719-49470d3",
3
+ "version": "0.0.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-camera",
9
- "version": "0.0.4-dev-20260719-49470d3",
9
+ "version": "0.0.4",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.3.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-camera",
3
- "version": "0.0.4-dev-20260719-49470d3",
3
+ "version": "0.0.4",
4
4
  "description": "Matterbridge camera example plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",