@scaleflex/widget-screen-capture 4.0.7 → 4.1.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/CHANGELOG.md +6914 -6902
- package/LICENSE +21 -21
- package/README.md +156 -156
- package/dist/style.css +77 -48
- package/dist/style.min.css +1 -1
- package/lib/RecordButton.js +2 -2
- package/lib/SubmitButton.js +2 -2
- package/lib/index.js +2 -2
- package/lib/style.scss +149 -149
- package/package.json +3 -3
- package/types/index.d.ts +25 -25
package/lib/style.scss
CHANGED
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
// packages/@scaleflex/widget-screen-capture/src/CaptureScreen.jsx
|
|
2
|
-
@import '@scaleflex/widget-core/lib/_utils.scss';
|
|
3
|
-
@import '@scaleflex/widget-core/lib/_variables.scss';
|
|
4
|
-
|
|
5
|
-
.filerobot-ScreenCapture-container {
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
align-items: center;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.filerobot-ScreenCapture-videoContainer {
|
|
15
|
-
width: 100%;
|
|
16
|
-
flex: 1;
|
|
17
|
-
flex-grow: 1;
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
background-color: $darkgrey;
|
|
20
|
-
text-align: center;
|
|
21
|
-
position: relative;
|
|
22
|
-
|
|
23
|
-
.filerobot-size--md & {
|
|
24
|
-
max-width: 100%;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.filerobot-ScreenCapture-video {
|
|
29
|
-
max-width: 100%;
|
|
30
|
-
max-height: 100%;
|
|
31
|
-
position: absolute;
|
|
32
|
-
top: 0;
|
|
33
|
-
right: 0;
|
|
34
|
-
bottom: 0;
|
|
35
|
-
left: 0;
|
|
36
|
-
margin: auto;
|
|
37
|
-
outline: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.filerobot-ScreenCapture-buttonContainer {
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 75px;
|
|
43
|
-
border-top: 1px solid $gray-200;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
padding: 0 20px;
|
|
48
|
-
background-color: $white;
|
|
49
|
-
|
|
50
|
-
[data-filerobot-theme="dark"] & {
|
|
51
|
-
background-color: $gray-900;
|
|
52
|
-
border-top: 1px solid $gray-800;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.filerobot-ScreenCapture-button {
|
|
57
|
-
@include blue-border-focus;
|
|
58
|
-
width: 45px;
|
|
59
|
-
height: 45px;
|
|
60
|
-
border-radius: 50%;
|
|
61
|
-
color: $white;
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
transition: all 0.3s;
|
|
64
|
-
|
|
65
|
-
[data-filerobot-theme="dark"] & {
|
|
66
|
-
@include blue-border-focus--dark;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.filerobot-size--md & {
|
|
70
|
-
width: 60px;
|
|
71
|
-
height: 60px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
background-color: darken($red, 5%);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.filerobot-ScreenCapture-button svg {
|
|
80
|
-
width: 30px;
|
|
81
|
-
height: 30px;
|
|
82
|
-
max-width: 100%;
|
|
83
|
-
max-height: 100%;
|
|
84
|
-
display: inline-block;
|
|
85
|
-
vertical-align: text-top;
|
|
86
|
-
overflow: hidden;
|
|
87
|
-
fill: currentColor;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.filerobot-ScreenCapture-button--submit {
|
|
91
|
-
background-color: $blue;
|
|
92
|
-
margin-left: 12px;
|
|
93
|
-
|
|
94
|
-
&:hover {
|
|
95
|
-
background-color: darken($blue, 5%);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&:disabled {
|
|
99
|
-
background-color: $gray-500;
|
|
100
|
-
cursor: default;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&:disabled:hover {
|
|
104
|
-
background-color: $gray-200;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.filerobot-ScreenCapture-title {
|
|
109
|
-
font-size: 22px;
|
|
110
|
-
line-height: 1.35;
|
|
111
|
-
font-weight: 400;
|
|
112
|
-
margin: 0;
|
|
113
|
-
margin-bottom: 5px;
|
|
114
|
-
padding: 0 15px;
|
|
115
|
-
max-width: 500px;
|
|
116
|
-
text-align: center;
|
|
117
|
-
color: $gray-800;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.filerobot-ScreenCapture-icon--stream {
|
|
121
|
-
position: absolute;
|
|
122
|
-
right: 0;
|
|
123
|
-
top: 0;
|
|
124
|
-
margin: 1rem;
|
|
125
|
-
z-index:1;
|
|
126
|
-
|
|
127
|
-
svg {
|
|
128
|
-
fill: $gray-500;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.filerobot-ScreenCapture-icon--streamActive svg {
|
|
133
|
-
animation: filerobot-ScreenCapture-icon--blink 1s cubic-bezier(0.47, 0, 0.75, 0.72) infinite;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@keyframes filerobot-ScreenCapture-icon--blink {
|
|
137
|
-
0% { fill: $blue;}
|
|
138
|
-
50% { fill: $gray-500; }
|
|
139
|
-
100% { fill: $blue; }
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.filerobot-ScreenCapture-button--video {
|
|
143
|
-
color: $white;
|
|
144
|
-
background: $red;
|
|
145
|
-
|
|
146
|
-
&:hover {
|
|
147
|
-
background-color: darken($red, 10%);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
1
|
+
// packages/@scaleflex/widget-screen-capture/src/CaptureScreen.jsx
|
|
2
|
+
@import '@scaleflex/widget-core/lib/_utils.scss';
|
|
3
|
+
@import '@scaleflex/widget-core/lib/_variables.scss';
|
|
4
|
+
|
|
5
|
+
.filerobot-ScreenCapture-container {
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.filerobot-ScreenCapture-videoContainer {
|
|
15
|
+
width: 100%;
|
|
16
|
+
flex: 1;
|
|
17
|
+
flex-grow: 1;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
background-color: $darkgrey;
|
|
20
|
+
text-align: center;
|
|
21
|
+
position: relative;
|
|
22
|
+
|
|
23
|
+
.filerobot-size--md & {
|
|
24
|
+
max-width: 100%;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.filerobot-ScreenCapture-video {
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
max-height: 100%;
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
right: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
margin: auto;
|
|
37
|
+
outline: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.filerobot-ScreenCapture-buttonContainer {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 75px;
|
|
43
|
+
border-top: 1px solid $gray-200;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
padding: 0 20px;
|
|
48
|
+
background-color: $white;
|
|
49
|
+
|
|
50
|
+
[data-filerobot-theme="dark"] & {
|
|
51
|
+
background-color: $gray-900;
|
|
52
|
+
border-top: 1px solid $gray-800;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.filerobot-ScreenCapture-button {
|
|
57
|
+
@include blue-border-focus;
|
|
58
|
+
width: 45px;
|
|
59
|
+
height: 45px;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
color: $white;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
transition: all 0.3s;
|
|
64
|
+
|
|
65
|
+
[data-filerobot-theme="dark"] & {
|
|
66
|
+
@include blue-border-focus--dark;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.filerobot-size--md & {
|
|
70
|
+
width: 60px;
|
|
71
|
+
height: 60px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
background-color: darken($red, 5%);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.filerobot-ScreenCapture-button svg {
|
|
80
|
+
width: 30px;
|
|
81
|
+
height: 30px;
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
max-height: 100%;
|
|
84
|
+
display: inline-block;
|
|
85
|
+
vertical-align: text-top;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
fill: currentColor;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.filerobot-ScreenCapture-button--submit {
|
|
91
|
+
background-color: $blue;
|
|
92
|
+
margin-left: 12px;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
background-color: darken($blue, 5%);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:disabled {
|
|
99
|
+
background-color: $gray-500;
|
|
100
|
+
cursor: default;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&:disabled:hover {
|
|
104
|
+
background-color: $gray-200;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.filerobot-ScreenCapture-title {
|
|
109
|
+
font-size: 22px;
|
|
110
|
+
line-height: 1.35;
|
|
111
|
+
font-weight: 400;
|
|
112
|
+
margin: 0;
|
|
113
|
+
margin-bottom: 5px;
|
|
114
|
+
padding: 0 15px;
|
|
115
|
+
max-width: 500px;
|
|
116
|
+
text-align: center;
|
|
117
|
+
color: $gray-800;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.filerobot-ScreenCapture-icon--stream {
|
|
121
|
+
position: absolute;
|
|
122
|
+
right: 0;
|
|
123
|
+
top: 0;
|
|
124
|
+
margin: 1rem;
|
|
125
|
+
z-index:1;
|
|
126
|
+
|
|
127
|
+
svg {
|
|
128
|
+
fill: $gray-500;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.filerobot-ScreenCapture-icon--streamActive svg {
|
|
133
|
+
animation: filerobot-ScreenCapture-icon--blink 1s cubic-bezier(0.47, 0, 0.75, 0.72) infinite;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes filerobot-ScreenCapture-icon--blink {
|
|
137
|
+
0% { fill: $blue;}
|
|
138
|
+
50% { fill: $gray-500; }
|
|
139
|
+
100% { fill: $blue; }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.filerobot-ScreenCapture-button--video {
|
|
143
|
+
color: $white;
|
|
144
|
+
background: $red;
|
|
145
|
+
|
|
146
|
+
&:hover {
|
|
147
|
+
background-color: darken($red, 10%);
|
|
148
|
+
}
|
|
149
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/widget-screen-capture",
|
|
3
3
|
"description": "Scaleflex plugin that captures video from display or application.",
|
|
4
|
-
"version": "4.0
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"style": "dist/style.min.css",
|
|
8
8
|
"types": "types/index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@scaleflex/widget-utils": "^4.0
|
|
10
|
+
"@scaleflex/widget-utils": "^4.1.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"react": "^19.0.0",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"/lib",
|
|
28
28
|
"/types"
|
|
29
29
|
],
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "471120d67066617a0d8824eae11b07d1f2259473"
|
|
31
31
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import Filerobot = require("@scaleflex/widget-core");
|
|
2
|
-
|
|
3
|
-
declare module ScreenCapture {
|
|
4
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#Properties_of_shared_screen_tracks
|
|
5
|
-
interface DisplayMediaStreamConstraints {
|
|
6
|
-
audio?: boolean | MediaTrackConstraints;
|
|
7
|
-
video?:
|
|
8
|
-
| boolean
|
|
9
|
-
| (MediaTrackConstraints & {
|
|
10
|
-
cursor?: "always" | "motion" | "never";
|
|
11
|
-
displaySurface?: "application" | "browser" | "monitor" | "window";
|
|
12
|
-
logicalSurface?: boolean;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ScreenCaptureOptions extends Filerobot.PluginOptions {
|
|
17
|
-
displayMediaConstraints?: DisplayMediaStreamConstraints;
|
|
18
|
-
userMediaConstraints?: MediaStreamConstraints;
|
|
19
|
-
preferredVideoMimeType?: string;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare class ScreenCapture extends Filerobot.Plugin<ScreenCapture.ScreenCaptureOptions> {}
|
|
24
|
-
|
|
25
|
-
export = ScreenCapture;
|
|
1
|
+
import Filerobot = require("@scaleflex/widget-core");
|
|
2
|
+
|
|
3
|
+
declare module ScreenCapture {
|
|
4
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#Properties_of_shared_screen_tracks
|
|
5
|
+
interface DisplayMediaStreamConstraints {
|
|
6
|
+
audio?: boolean | MediaTrackConstraints;
|
|
7
|
+
video?:
|
|
8
|
+
| boolean
|
|
9
|
+
| (MediaTrackConstraints & {
|
|
10
|
+
cursor?: "always" | "motion" | "never";
|
|
11
|
+
displaySurface?: "application" | "browser" | "monitor" | "window";
|
|
12
|
+
logicalSurface?: boolean;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ScreenCaptureOptions extends Filerobot.PluginOptions {
|
|
17
|
+
displayMediaConstraints?: DisplayMediaStreamConstraints;
|
|
18
|
+
userMediaConstraints?: MediaStreamConstraints;
|
|
19
|
+
preferredVideoMimeType?: string;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class ScreenCapture extends Filerobot.Plugin<ScreenCapture.ScreenCaptureOptions> {}
|
|
24
|
+
|
|
25
|
+
export = ScreenCapture;
|