@ruc-lib/screen-recorder 3.1.0 → 3.2.0
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/README.md +174 -1
- package/esm2020/index.mjs +5 -0
- package/esm2020/lib/models/screen-recorder.models.mjs +20 -0
- package/esm2020/lib/ruclib-screen-recorder.module.mjs +20 -0
- package/esm2020/lib/screen-recorder/screen-recorder-constant.mjs +44 -0
- package/esm2020/lib/screen-recorder/screen-recorder.component.mjs +242 -0
- package/esm2020/lib/services/screen-recorder.service.mjs +333 -0
- package/esm2020/ruc-lib-screen-recorder.mjs +5 -0
- package/fesm2015/ruc-lib-screen-recorder.mjs +644 -0
- package/fesm2015/ruc-lib-screen-recorder.mjs.map +1 -0
- package/fesm2020/ruc-lib-screen-recorder.mjs +648 -0
- package/fesm2020/ruc-lib-screen-recorder.mjs.map +1 -0
- package/index.d.ts +4 -288
- package/lib/models/screen-recorder.models.d.ts +51 -0
- package/lib/ruclib-screen-recorder.module.d.ts +8 -0
- package/lib/screen-recorder/screen-recorder-constant.d.ts +27 -0
- package/lib/screen-recorder/screen-recorder.component.d.ts +100 -0
- package/lib/services/screen-recorder.service.d.ts +111 -0
- package/package.json +25 -13
- package/fesm2022/ruc-lib-screen-recorder.mjs +0 -636
- package/fesm2022/ruc-lib-screen-recorder.mjs.map +0 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { RecordingState } from '../models/screen-recorder.models';
|
|
3
|
+
import { ScreenRecorderConstants } from '../screen-recorder/screen-recorder-constant';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ScreenRecorderService {
|
|
6
|
+
screenRecordingConstant: ScreenRecorderConstants;
|
|
7
|
+
private stream;
|
|
8
|
+
private mediaRecorder;
|
|
9
|
+
private recordedBlobs;
|
|
10
|
+
private timerSubscription;
|
|
11
|
+
private currentRecordedTime;
|
|
12
|
+
private readonly recordingStateSubject;
|
|
13
|
+
readonly recordingState$: Observable<RecordingState>;
|
|
14
|
+
private readonly recordedTimeSubject;
|
|
15
|
+
readonly recordedTime$: Observable<number>;
|
|
16
|
+
private readonly recordedUrlSubject;
|
|
17
|
+
readonly recordedUrl$: Observable<string | null>;
|
|
18
|
+
private readonly recordingTimestampSubject;
|
|
19
|
+
readonly recordingTimestamp$: Observable<string>;
|
|
20
|
+
private readonly errorSubject;
|
|
21
|
+
readonly error$: Observable<string>;
|
|
22
|
+
constructor(screenRecordingConstant: ScreenRecorderConstants);
|
|
23
|
+
/**
|
|
24
|
+
* Starts the screen recording with optional audio
|
|
25
|
+
*
|
|
26
|
+
* @param options - Configuration options for recording
|
|
27
|
+
* @param options.audio - Whether to include audio in the recording
|
|
28
|
+
*
|
|
29
|
+
* @throws Error if recording is already in progress or if media access is denied
|
|
30
|
+
* @returns Promise<void>
|
|
31
|
+
*/
|
|
32
|
+
startRecording(options: {
|
|
33
|
+
audio: boolean;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the first supported MIME type for MediaRecorder
|
|
37
|
+
*
|
|
38
|
+
* @returns string|null - The supported MIME type or null if none found
|
|
39
|
+
*/
|
|
40
|
+
private getSupportedMimeType;
|
|
41
|
+
/**
|
|
42
|
+
* Internal method to stop the recording process
|
|
43
|
+
*
|
|
44
|
+
* @private
|
|
45
|
+
* @returns void
|
|
46
|
+
*/
|
|
47
|
+
private stopRecordingInternal;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @returns Promise<void>
|
|
51
|
+
* @throws Error if recording is not in progress
|
|
52
|
+
*/
|
|
53
|
+
stopRecording(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Pauses the current recording
|
|
56
|
+
*
|
|
57
|
+
* @returns Promise<void>
|
|
58
|
+
* @throws Error if recording is not in progress
|
|
59
|
+
*/
|
|
60
|
+
pauseRecording(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Resumes a paused recording
|
|
63
|
+
*
|
|
64
|
+
* @returns Promise<void>
|
|
65
|
+
* @throws Error if recording is not paused
|
|
66
|
+
*/
|
|
67
|
+
resumeRecording(): void;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @param fileName
|
|
71
|
+
*/
|
|
72
|
+
downloadRecording(fileName?: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Starts the recording timer
|
|
75
|
+
*
|
|
76
|
+
* @param startTime - Optional start time for the timer
|
|
77
|
+
* @private
|
|
78
|
+
* @returns void
|
|
79
|
+
*/
|
|
80
|
+
private startTimer;
|
|
81
|
+
/**
|
|
82
|
+
* Stops the recording timer
|
|
83
|
+
*
|
|
84
|
+
* @private
|
|
85
|
+
* @returns void
|
|
86
|
+
*/
|
|
87
|
+
private stopTimer;
|
|
88
|
+
/**
|
|
89
|
+
* Cleans up resources from previous recording
|
|
90
|
+
*
|
|
91
|
+
* @private
|
|
92
|
+
* @returns void
|
|
93
|
+
*/
|
|
94
|
+
private cleanupPreviousRecording;
|
|
95
|
+
/**
|
|
96
|
+
* Resets the recording state to idle
|
|
97
|
+
*
|
|
98
|
+
* @returns void
|
|
99
|
+
*/
|
|
100
|
+
resetToIdle(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Handles and broadcasts recording errors
|
|
103
|
+
*
|
|
104
|
+
* @private
|
|
105
|
+
* @param error - The error message to handle
|
|
106
|
+
* @returns void
|
|
107
|
+
*/
|
|
108
|
+
private handleError;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScreenRecorderService, never>;
|
|
110
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScreenRecorderService>;
|
|
111
|
+
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruc-lib/screen-recorder",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"peerDependencies": {
|
|
5
|
-
"@angular/
|
|
6
|
-
"@angular/
|
|
7
|
-
"@angular/
|
|
8
|
-
"@angular/
|
|
9
|
-
"@angular/
|
|
10
|
-
"@angular/
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
6
|
+
"@angular/material": "^15.2.0",
|
|
7
|
+
"@angular/animations": ">=15.0.0 <18.0.0",
|
|
8
|
+
"@angular/core": ">=15.0.0 <18.0.0",
|
|
9
|
+
"@angular/common": ">=15.0.0 <18.0.0",
|
|
10
|
+
"@angular/forms": ">=15.0.0 <18.0.0",
|
|
11
|
+
"@angular/platform-browser": ">=15.0.0 <18.0.0",
|
|
12
|
+
"@angular/platform-browser-dynamic": ">=15.0.0 <18.0.0",
|
|
13
|
+
"ngx-pagination": "^6.0.3",
|
|
14
|
+
"rxjs": ">=6.5.0 <8.0.0",
|
|
15
|
+
"zone.js": ">=0.11.4 <0.14.0"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"tslib": "^2.3.0"
|
|
18
19
|
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
19
23
|
"sideEffects": false,
|
|
20
|
-
"module": "
|
|
24
|
+
"module": "fesm2015/ruc-lib-screen-recorder.mjs",
|
|
25
|
+
"es2020": "fesm2020/ruc-lib-screen-recorder.mjs",
|
|
26
|
+
"esm2020": "esm2020/ruc-lib-screen-recorder.mjs",
|
|
27
|
+
"fesm2020": "fesm2020/ruc-lib-screen-recorder.mjs",
|
|
28
|
+
"fesm2015": "fesm2015/ruc-lib-screen-recorder.mjs",
|
|
21
29
|
"typings": "index.d.ts",
|
|
22
30
|
"exports": {
|
|
23
31
|
"./package.json": {
|
|
@@ -25,7 +33,11 @@
|
|
|
25
33
|
},
|
|
26
34
|
".": {
|
|
27
35
|
"types": "./index.d.ts",
|
|
28
|
-
"
|
|
36
|
+
"esm2020": "./esm2020/ruc-lib-screen-recorder.mjs",
|
|
37
|
+
"es2020": "./fesm2020/ruc-lib-screen-recorder.mjs",
|
|
38
|
+
"es2015": "./fesm2015/ruc-lib-screen-recorder.mjs",
|
|
39
|
+
"node": "./fesm2015/ruc-lib-screen-recorder.mjs",
|
|
40
|
+
"default": "./fesm2020/ruc-lib-screen-recorder.mjs"
|
|
29
41
|
}
|
|
30
42
|
}
|
|
31
43
|
}
|