Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
matrix-js-sdk
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Matrix.org
matrix-js-sdk
Commits
54e8f3c9
Unverified
Commit
54e8f3c9
authored
2 months ago
by
Michael Telatynski
Committed by
GitHub
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Simplify global types (#4831)
Signed-off-by:
Michael Telatynski
<
7t3chguy@gmail.com
>
parent
1fcc375d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/@types/global.d.ts
+7
-31
7 additions, 31 deletions
src/@types/global.d.ts
src/webrtc/mediaHandler.ts
+1
-1
1 addition, 1 deletion
src/webrtc/mediaHandler.ts
with
8 additions
and
32 deletions
src/@types/global.d.ts
+
7
−
31
View file @
54e8f3c9
...
...
@@ -14,9 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// this is needed to tell TS about globalThis.Olm
import
"
@matrix-org/olm
"
;
export
{};
declare
global
{
...
...
@@ -34,39 +31,18 @@ declare global {
}
}
interface
MediaDevices
{
// This is experimental and types don't know about it yet
// https://github.com/microsoft/TypeScript/issues/33232
getDisplayMedia
(
constraints
:
MediaStreamConstraints
|
DesktopCapturerConstraints
):
Promise
<
MediaStream
>
;
getUserMedia
(
constraints
:
MediaStreamConstraints
|
DesktopCapturerConstraints
):
Promise
<
MediaStream
>
;
}
interface
DesktopCapturerConstraints
{
audio
:
|
boolean
|
{
mandatory
:
{
// Chrome-specific getUserMedia constraints
interface
MediaTrackConstraints
{
mandatory
?:
{
chromeMediaSource
:
string
;
chromeMediaSourceId
:
string
;
};
};
video
:
|
boolean
|
{
mandatory
:
{
chromeMediaSource
:
string
;
chromeMediaSourceId
:
string
;
};
};
}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface
DummyInterfaceWeShouldntBeUsingThis
{}
interface
Navigator
{
// We check for the webkit-prefixed getUserMedia to detect if we're
// on webkit: we should check if we still need to do this
webkitGetUserMedia
?:
DummyInterfaceWeShouldntBeUsingThis
;
webkitGetUserMedia
?:
unknown
;
}
export
interface
Uint8ArrayToBase64Options
{
...
...
This diff is collapsed.
Click to expand it.
src/webrtc/mediaHandler.ts
+
1
−
1
View file @
54e8f3c9
...
...
@@ -462,7 +462,7 @@ export class MediaHandler extends TypedEventEmitter<
};
}
private
getScreenshareContraints
(
opts
:
IScreensharingOpts
):
DesktopCapturer
Constraints
{
private
getScreenshareContraints
(
opts
:
IScreensharingOpts
):
MediaStream
Constraints
{
const
{
desktopCapturerSourceId
,
audio
}
=
opts
;
if
(
desktopCapturerSourceId
)
{
return
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment