parent
597375676e
commit
e15feca680
|
@ -24,7 +24,7 @@ export {};
|
|||
if (__build.target === "client") {
|
||||
/* do this so we don't get a react dev tools warning within the client */
|
||||
if (!('__REACT_DEVTOOLS_GLOBAL_HOOK__' in window)) {
|
||||
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {};
|
||||
(window as Window).__REACT_DEVTOOLS_GLOBAL_HOOK__ = {};
|
||||
}
|
||||
|
||||
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject = function () { };
|
||||
|
|
File diff suppressed because it is too large
Load Diff
129
package.json
129
package.json
|
@ -17,74 +17,75 @@
|
|||
"author": "TeaSpeak (WolverinDEV)",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.4",
|
||||
"@babel/plugin-transform-runtime": "^7.10.4",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"@babel/core": "^7.23.3",
|
||||
"@babel/plugin-transform-runtime": "^7.23.3",
|
||||
"@babel/preset-env": "^7.23.3",
|
||||
"@google-cloud/translate": "^5.3.0",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"@types/dompurify": "^2.0.1",
|
||||
"@types/ejs": "^3.0.2",
|
||||
"@types/emoji-mart": "^3.0.2",
|
||||
"@types/emscripten": "^1.38.0",
|
||||
"@types/fs-extra": "^8.0.1",
|
||||
"@types/dompurify": "^2.4.0",
|
||||
"@types/ejs": "^3.1.5",
|
||||
"@types/emoji-mart": "^3.0.12",
|
||||
"@types/emscripten": "^1.39.10",
|
||||
"@types/fs-extra": "^8.1.5",
|
||||
"@types/html-minifier": "^3.5.3",
|
||||
"@types/jquery": "^3.3.34",
|
||||
"@types/jquery": "^3.5.27",
|
||||
"@types/jsrender": "^1.0.5",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/lodash": "^4.14.201",
|
||||
"@types/moment": "^2.13.0",
|
||||
"@types/node": "^12.7.2",
|
||||
"@types/react-color": "^3.0.4",
|
||||
"@types/react-dom": "^16.9.5",
|
||||
"@types/react-grid-layout": "^1.1.1",
|
||||
"@types/remarkable": "^1.7.4",
|
||||
"@types/sdp-transform": "^2.4.4",
|
||||
"@types/sha256": "^0.2.0",
|
||||
"@types/twemoji": "^12.1.1",
|
||||
"@types/node": "^12.20.55",
|
||||
"@types/react": "^16.14.51",
|
||||
"@types/react-color": "^3.0.10",
|
||||
"@types/react-dom": "^16.9.22",
|
||||
"@types/react-grid-layout": "^1.3.5",
|
||||
"@types/remarkable": "^1.7.6",
|
||||
"@types/sdp-transform": "^2.4.9",
|
||||
"@types/sha256": "^0.2.2",
|
||||
"@types/twemoji": "^12.1.2",
|
||||
"@types/websocket": "0.0.40",
|
||||
"@types/xml-parser": "^1.2.29",
|
||||
"@wasm-tool/wasm-pack-plugin": "^1.3.1",
|
||||
"autoprefixer": "^10.2.5",
|
||||
"babel-loader": "^8.1.0",
|
||||
"circular-dependency-plugin": "^5.2.0",
|
||||
"clean-css": "^4.2.1",
|
||||
"@types/xml-parser": "^1.2.33",
|
||||
"@wasm-tool/wasm-pack-plugin": "^1.7.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"babel-loader": "^8.3.0",
|
||||
"circular-dependency-plugin": "^5.2.2",
|
||||
"clean-css": "^4.2.4",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^8.0.0",
|
||||
"copy-webpack-plugin": "^8.1.1",
|
||||
"css-loader": "^3.6.0",
|
||||
"css-minimizer-webpack-plugin": "^1.3.0",
|
||||
"exports-loader": "^0.7.0",
|
||||
"fast-xml-parser": "^3.17.4",
|
||||
"file-loader": "^6.0.0",
|
||||
"fast-xml-parser": "^3.21.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"fs-extra": "latest",
|
||||
"gulp": "^4.0.2",
|
||||
"html-loader": "^1.0.0",
|
||||
"html-loader": "^1.3.2",
|
||||
"html-minifier": "^4.0.0",
|
||||
"html-webpack-inline-source-plugin": "0.0.10",
|
||||
"html-webpack-plugin": "^5.3.1",
|
||||
"html-webpack-plugin": "^5.5.3",
|
||||
"inline-chunks-html-webpack-plugin": "^1.3.1",
|
||||
"mime-types": "^2.1.24",
|
||||
"mini-css-extract-plugin": "^1.3.9",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mime-types": "^2.1.35",
|
||||
"mini-css-extract-plugin": "^1.6.2",
|
||||
"mkdirp": "^0.5.6",
|
||||
"node-sass": "^4.14.1",
|
||||
"postcss": "^8.3.0",
|
||||
"postcss-loader": "^5.2.0",
|
||||
"potpack": "^1.0.1",
|
||||
"raw-loader": "^4.0.0",
|
||||
"postcss": "^8.4.31",
|
||||
"postcss-loader": "^5.3.0",
|
||||
"potpack": "^1.0.2",
|
||||
"raw-loader": "^4.0.2",
|
||||
"sass": "1.22.10",
|
||||
"sass-loader": "^8.0.2",
|
||||
"sha256": "^0.2.0",
|
||||
"style-loader": "^1.1.3",
|
||||
"style-loader": "^1.3.0",
|
||||
"svg-inline-loader": "^0.8.2",
|
||||
"terser": "^4.2.1",
|
||||
"terser": "^4.8.1",
|
||||
"terser-webpack-plugin": "4.2.3",
|
||||
"ts-loader": "^6.2.2",
|
||||
"ts-loader": "^8.4.0",
|
||||
"tsd": "^0.13.1",
|
||||
"typescript": "^4.2",
|
||||
"typescript": "^4.9.5",
|
||||
"url-loader": "^4.1.1",
|
||||
"wabt": "^1.0.13",
|
||||
"webpack": "^5.26.1",
|
||||
"webpack-bundle-analyzer": "^3.6.1",
|
||||
"webpack-cli": "^4.5.0",
|
||||
"webpack-dev-server": "^3.11.2",
|
||||
"wabt": "1.0.13",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-bundle-analyzer": "^3.9.0",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-dev-server": "^3.11.3",
|
||||
"webpack-svg-sprite-generator": "^5.0.4",
|
||||
"zip-webpack-plugin": "^4.0.1"
|
||||
},
|
||||
|
@ -97,33 +98,33 @@
|
|||
},
|
||||
"homepage": "https://www.teaspeak.de",
|
||||
"dependencies": {
|
||||
"@types/crypto-js": "^4.0.1",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"broadcastchannel-polyfill": "^1.0.1",
|
||||
"buffer": "^6.0.3",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
"crypto-js": "^4.0.0",
|
||||
"detect-browser": "^5.2.0",
|
||||
"dompurify": "^2.2.8",
|
||||
"emoji-mart": "git+https://github.com/WolverinDEV/emoji-mart.git",
|
||||
"emoji-regex": "^9.0.0",
|
||||
"highlight.js": "^10.1.1",
|
||||
"ip-regex": "^4.2.0",
|
||||
"jquery": "^3.5.1",
|
||||
"jsrender": "^1.0.7",
|
||||
"moment": "^2.24.0",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-grid-layout": "^1.2.2",
|
||||
"react-player": "^2.5.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"detect-browser": "^5.3.0",
|
||||
"dompurify": "^2.4.7",
|
||||
"emoji-mart": "^3.0.1",
|
||||
"emoji-regex": "^9.2.2",
|
||||
"highlight.js": "^10.7.3",
|
||||
"ip-regex": "^4.3.0",
|
||||
"jquery": "^3.7.1",
|
||||
"jsrender": "^1.0.13",
|
||||
"moment": "^2.29.4",
|
||||
"react": "^16.14.0",
|
||||
"react-dom": "^16.14.0",
|
||||
"react-grid-layout": "^1.4.3",
|
||||
"react-player": "^2.13.0",
|
||||
"remarkable": "^2.0.1",
|
||||
"resize-observer-polyfill": "git+https://github.com/albancreton/resize-observer-polyfill.git#patch-1",
|
||||
"sdp-transform": "^2.14.0",
|
||||
"sdp-transform": "^2.14.1",
|
||||
"simple-jsonp-promise": "^1.1.0",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"twemoji": "^13.0.0",
|
||||
"twemoji": "^13.1.1",
|
||||
"url-knife": "^3.1.3",
|
||||
"webcrypto-liner": "^1.2.4",
|
||||
"webpack-manifest-plugin": "^3.1.0",
|
||||
"webcrypto-liner": "^1.4.2",
|
||||
"webpack-manifest-plugin": "^3.2.0",
|
||||
"webrtc-adapter": "^7.5.1"
|
||||
}
|
||||
}
|
|
@ -89,7 +89,7 @@ export class AbstractKeyBoard implements KeyBoardBackend {
|
|||
return;
|
||||
}
|
||||
|
||||
this.registeredKeyHooks.remove(hook);
|
||||
this.registeredKeyHooks.remove(hook as RegisteredKeyHook);
|
||||
}
|
||||
|
||||
registerListener(listener: (event: KeyEvent) => void) {
|
||||
|
|
|
@ -16,10 +16,10 @@ import {getAudioBackend} from "tc-shared/audio/Player";
|
|||
const kSdpCompressionMode = 1;
|
||||
|
||||
declare global {
|
||||
interface RTCIceCandidate {
|
||||
/* Firefox has this */
|
||||
address: string | undefined;
|
||||
}
|
||||
// interface RTCIceCandidate {
|
||||
// /* Firefox has this */
|
||||
// address: string;
|
||||
// }
|
||||
|
||||
interface HTMLCanvasElement {
|
||||
captureStream(framed: number): MediaStream;
|
||||
|
@ -583,7 +583,6 @@ export class RTCConnection {
|
|||
this.peer.onicegatheringstatechange = undefined;
|
||||
this.peer.onnegotiationneeded = undefined;
|
||||
this.peer.onsignalingstatechange = undefined;
|
||||
this.peer.onstatsended = undefined;
|
||||
this.peer.ontrack = undefined;
|
||||
|
||||
this.peer.close();
|
||||
|
@ -928,7 +927,7 @@ export class RTCConnection {
|
|||
}
|
||||
|
||||
this.peer.onicecandidate = event => this.handleLocalIceCandidate(event.candidate);
|
||||
this.peer.onicecandidateerror = event => this.handleIceCandidateError(event);
|
||||
this.peer.onicecandidateerror = event => this.handleIceCandidateError(event as RTCPeerConnectionIceErrorEvent);
|
||||
this.peer.oniceconnectionstatechange = () => this.handleIceConnectionStateChanged();
|
||||
this.peer.onicegatheringstatechange = () => this.handleIceGatheringStateChanged();
|
||||
|
||||
|
@ -1130,10 +1129,10 @@ export class RTCConnection {
|
|||
private handleIceCandidateError(event: RTCPeerConnectionIceErrorEvent) {
|
||||
if (this.peer.iceGatheringState === "gathering") {
|
||||
logWarn(LogCategory.WEBRTC, tr("Received error while gathering the ice candidates: %d/%s for %s (url: %s)"),
|
||||
event.errorCode, event.errorText, event.hostCandidate, event.url);
|
||||
event.errorCode, event.errorText, event.address, event.url);
|
||||
} else {
|
||||
logTrace(LogCategory.WEBRTC, tr("Ice candidate %s (%s) errored: %d/%s"),
|
||||
event.url, event.hostCandidate, event.errorCode, event.errorText);
|
||||
event.url, event.address, event.errorCode, event.errorText);
|
||||
}
|
||||
}
|
||||
private handleIceConnectionStateChanged() {
|
||||
|
|
|
@ -107,7 +107,6 @@ export class RemoteRTPVideoTrack extends RemoteRTPTrack {
|
|||
track.onended = () => logTrace(LogCategory.VIDEO, "Track %d ended", ssrc);
|
||||
track.onmute = () => logTrace(LogCategory.VIDEO, "Track %d muted", ssrc);
|
||||
track.onunmute = () => logTrace(LogCategory.VIDEO, "Track %d unmuted", ssrc);
|
||||
track.onisolationchange = () => logTrace(LogCategory.VIDEO, "Track %d isolation changed", ssrc);
|
||||
}
|
||||
|
||||
getMediaStream(): MediaStream {
|
||||
|
|
|
@ -173,7 +173,7 @@ export class OwnAvatarStorage {
|
|||
const hasher = crypto.algo.MD5.create();
|
||||
await target.stream().pipeTo(new WritableStream({
|
||||
write(data) {
|
||||
hasher.update(crypto.lib.WordArray.create(data));
|
||||
hasher.update(crypto.lib.WordArray.create(Array.from(data)));
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
|
@ -82,8 +82,8 @@ export async function requestMediaStream(deviceId: string | undefined, groupId:
|
|||
}
|
||||
|
||||
export async function queryMediaPermissions(type: MediaStreamType, changeListener?: (value: PermissionState) => void): Promise<PermissionState> {
|
||||
if('permissions' in navigator && 'query' in navigator.permissions) {
|
||||
try {
|
||||
// @ts-ignore needed, as firefox doesn't allow microphone or camera, caught using the catch below
|
||||
const result = await navigator.permissions.query({ name: type === "audio" ? "microphone" : "camera" });
|
||||
if (changeListener) {
|
||||
result.addEventListener("change", () => {
|
||||
|
@ -92,8 +92,11 @@ export async function queryMediaPermissions(type: MediaStreamType, changeListene
|
|||
}
|
||||
return result.state;
|
||||
} catch (error) {
|
||||
logWarn(LogCategory.GENERAL, tr("Failed to query for %s permissions: %s"), type, error);
|
||||
// Firefox doesn't support querying for the camera / microphone permission, so return undetermined status
|
||||
if (error instanceof TypeError) {
|
||||
return "prompt";
|
||||
}
|
||||
logWarn(LogCategory.GENERAL, tr("Failed to query for %s permissions: %s"), type, error);
|
||||
}
|
||||
return "prompt";
|
||||
}
|
||||
|
|
|
@ -73,9 +73,6 @@ declare global {
|
|||
name: string,
|
||||
version: string
|
||||
};
|
||||
|
||||
mozGetUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
|
||||
webkitGetUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
|
||||
}
|
||||
|
||||
interface ObjectConstructor {
|
||||
|
|
|
@ -44,7 +44,7 @@ const useInviteLink = (linkId: string): LocalInviteInfo => {
|
|||
|
||||
const callback = () => setValue(localInviteCache[linkId].status);
|
||||
(localInviteCallbacks[linkId] || (localInviteCallbacks[linkId] = [])).push(callback);
|
||||
return () => localInviteCallbacks[linkId]?.remove(callback);
|
||||
return () => { localInviteCallbacks[linkId]?.remove(callback); }
|
||||
}, [linkId]);
|
||||
|
||||
return value;
|
||||
|
|
|
@ -928,7 +928,7 @@ export class ClientEntry<Events extends ClientEvents = ClientEvents> extends Cha
|
|||
return ClientType.CLIENT_UNDEFINED;
|
||||
}
|
||||
} else {
|
||||
switch(this.properties.client_type_exact) {
|
||||
switch (this.properties.client_type_exact as ClientType) {
|
||||
case 0:
|
||||
return ClientType.CLIENT_VOICE;
|
||||
|
||||
|
@ -943,7 +943,7 @@ export class ClientEntry<Events extends ClientEvents = ClientEvents> extends Cha
|
|||
|
||||
case 5:
|
||||
return ClientType.CLIENT_TEASPEAK;
|
||||
|
||||
// @ts-ignore
|
||||
case 2:
|
||||
/* 2 is the internal client type which should never be visible for the target user */
|
||||
default:
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,14 +8,27 @@
|
|||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": "../../",
|
||||
"paths": {
|
||||
"tc-shared/*": ["shared/js/*"],
|
||||
"tc-loader": ["loader/exports/loader.d.ts"],
|
||||
"svg-sprites/*": ["shared/svg-sprites/*"],
|
||||
"vendor/xbbcode/*": ["vendor/xbbcode/src/*"],
|
||||
"tc-events": ["vendor/TeaEventBus/src/index.ts"],
|
||||
"tc-services": ["vendor/TeaClientServices/src/index.ts"]
|
||||
"tc-shared/*": [
|
||||
"shared/js/*"
|
||||
],
|
||||
"tc-loader": [
|
||||
"loader/exports/loader.d.ts"
|
||||
],
|
||||
"svg-sprites/*": [
|
||||
"shared/svg-sprites/*"
|
||||
],
|
||||
"vendor/xbbcode/*": [
|
||||
"vendor/xbbcode/src/*"
|
||||
],
|
||||
"tc-events": [
|
||||
"vendor/TeaEventBus/src/index.ts"
|
||||
],
|
||||
"tc-services": [
|
||||
"vendor/TeaClientServices/src/index.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"sourceMap": true,
|
||||
"experimentalDecorators": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"plugins": [ /* ttypescript */
|
||||
{
|
||||
"transform": "../../tools/trgen/ttsc_transformer.js",
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"typeRoots": [],
|
||||
"types": [],
|
||||
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": [
|
||||
|
|
|
@ -4,20 +4,22 @@
|
|||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"sourceMap": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"removeComments": false,
|
||||
"esModuleInterop": true
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": [
|
||||
"webpack.config.ts",
|
||||
"webpack-client.config.ts",
|
||||
"webpack-web.config.ts",
|
||||
|
||||
"webpack/build-definitions.d.ts",
|
||||
"webpack/HtmlWebpackInlineSource.ts",
|
||||
"webpack/WatLoader.ts",
|
||||
"webpack/ManifestPlugin.ts",
|
||||
|
||||
"babel.config.ts",
|
||||
"postcss.config.ts",
|
||||
"file.ts"
|
||||
|
|
|
@ -5,19 +5,35 @@
|
|||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"sourceMap": true,
|
||||
"lib": ["ES7", "dom", "dom.iterable"],
|
||||
"lib": [
|
||||
"ES7",
|
||||
"dom",
|
||||
"dom.iterable"
|
||||
],
|
||||
"removeComments": true, /* we dont really need them within the target files */
|
||||
"jsx": "react",
|
||||
"esModuleInterop": true,
|
||||
"baseUrl": ".",
|
||||
"skipLibCheck": true,
|
||||
"paths": {
|
||||
"tc-shared/*": ["shared/js/*"],
|
||||
"tc-loader": ["loader/exports/loader.d.ts"],
|
||||
"tc-events": ["vendor/TeaEventBus/src/index.ts"],
|
||||
"tc-services": ["vendor/TeaClientServices/src/index.ts"],
|
||||
|
||||
"svg-sprites/*": ["shared/svg-sprites/*"],
|
||||
"vendor/xbbcode/*": ["vendor/xbbcode/src/*"]
|
||||
"tc-shared/*": [
|
||||
"shared/js/*"
|
||||
],
|
||||
"tc-loader": [
|
||||
"loader/exports/loader.d.ts"
|
||||
],
|
||||
"tc-events": [
|
||||
"vendor/TeaEventBus/src/index.ts"
|
||||
],
|
||||
"tc-services": [
|
||||
"vendor/TeaClientServices/src/index.ts"
|
||||
],
|
||||
"svg-sprites/*": [
|
||||
"shared/svg-sprites/*"
|
||||
],
|
||||
"vendor/xbbcode/*": [
|
||||
"vendor/xbbcode/src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
|
|
Loading…
Reference in New Issue