@@ -2,9 +2,10 @@ const remote = require('@electron/remote');
2
2
import { AVRecorder } from './avRecorder.js' ;
3
3
4
4
export class ScreenCaptureDevice {
5
-
6
- #label = "Screen Capture" ;
7
- #deviceId = "ScreenCaptureModule" ;
5
+ #deviceId = "ScreenCapture" ;
6
+ #groupId = "ScreenCapture" ;
7
+ #kind = "screencapture" ;
8
+ #label = "ScreenCapture" ;
8
9
#videoElement = null ;
9
10
#optionContainer = null ;
10
11
#sources = [ ]
@@ -27,10 +28,51 @@ export class ScreenCaptureDevice {
27
28
/**
28
29
* Constructor for a ScreenCaptureDevice object that captures stream of video/audio from user screens & windows.
29
30
*
31
+ * @param {string } deviceId - Identifier for the device used in input capture.
32
+ * @param {string } groupId - Identifier for the device group used in input capture.
33
+ * @param {string } kind - Identifier for type of input from device.
34
+ * @param {string } label - Name Identifier (Sensical to user for reading).
30
35
*/
31
- constructor ( ) {
32
- this . getCaptureSources ( ) ;
33
- }
36
+ constructor ( deviceId , groupId , kind , label ) {
37
+ this . #deviceId = "ScreenCapture" ;
38
+ this . #groupId = "ScreenCapture" ;
39
+ this . #kind = "screencapture" ;
40
+ this . #label = "ScreenCapture" ;
41
+
42
+ this . getCaptureSources ( ) ;
43
+ }
44
+
45
+ getPluginDiv ( ) {
46
+ let _pluginDiv = this . #pluginDiv;
47
+ return _pluginDiv ;
48
+ }
49
+
50
+ /**
51
+ * Getter function to retrieve the object's Group ID
52
+ *
53
+ * @return {string } - Group identifier used to connect it to other similar devices
54
+ */
55
+ getGroupId ( ) {
56
+ return this . #groupId;
57
+ }
58
+
59
+ /**
60
+ * Getter function to retrieve the object's "kind"
61
+ *
62
+ * @return {string } - Device identifier used to describe device output
63
+ */
64
+ getKind ( ) {
65
+ return this . #kind;
66
+ }
67
+
68
+ /**
69
+ * Getter function to retrieve the device recording status based on video and audio
70
+ *
71
+ * @return {string } - Device identifier used to describe device recording status
72
+ */
73
+ getRecordStatus ( ) {
74
+ return ( this . #videoCheckbox. checked ) ;
75
+ }
34
76
35
77
fixForMacOS ( ) {
36
78
if ( process . platform === "darwin" ) {
@@ -46,6 +88,8 @@ export class ScreenCaptureDevice {
46
88
return _pluginDiv ;
47
89
}
48
90
91
+
92
+
49
93
/**
50
94
* Collects all of the possible screen and window sources into an array for later use.
51
95
*
0 commit comments