Skip to content

Commit

Permalink
Peer-to-Peer calls
Browse files Browse the repository at this point in the history
Refactor bigInt
Refactor factorizing
  • Loading branch information
morethanwords committed Mar 23, 2022
1 parent 4d11480 commit 4725119
Show file tree
Hide file tree
Showing 181 changed files with 4,273 additions and 1,967 deletions.
360 changes: 140 additions & 220 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Expand Up @@ -20,6 +20,8 @@
"author": "",
"license": "GPL-3.0-only",
"dependencies": {
"@types/crypto-js": "^4.1.1",
"crypto-js": "^4.1.1",
"webpack-dev-server": "^3.11.2"
},
"devDependencies": {
Expand All @@ -35,13 +37,15 @@
"@cryptography/sha1": "^0.2.0",
"@cryptography/sha256": "^0.2.0",
"@peculiar/webcrypto": "^1.1.7",
"@types/big-integer": "^0.0.31",
"@types/chrome": "0.0.139",
"@types/jest": "^26.0.23",
"@types/serviceworker-webpack-plugin": "^1.0.2",
"autoprefixer": "^9.8.6",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-preset-es2015": "^6.24.1",
"big-integer": "^1.6.51",
"compression": "^1.7.4",
"css-loader": "^3.6.0",
"dotenv-webpack": "^7.0.3",
Expand Down
Binary file added public/assets/audio/call_busy.mp3
Binary file not shown.
Binary file added public/assets/audio/call_connect.mp3
Binary file not shown.
Binary file added public/assets/audio/call_end.mp3
Binary file not shown.
Binary file added public/assets/audio/call_incoming.mp3
Binary file not shown.
Binary file added public/assets/audio/call_outgoing.mp3
Binary file not shown.
Binary file removed public/assets/audio/voip_busy.mp3
Binary file not shown.
Binary file removed public/assets/audio/voip_end.mp3
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/animationIntersector.ts
Expand Up @@ -8,8 +8,8 @@ import rootScope from "../lib/rootScope";
import { IS_SAFARI } from "../environment/userAgent";
import { MOUNT_CLASS_TO } from "../config/debug";
import isInDOM from "../helpers/dom/isInDOM";
import { indexOfAndSplice } from "../helpers/array";
import RLottiePlayer from "../lib/rlottie/rlottiePlayer";
import indexOfAndSplice from "../helpers/array/indexOfAndSplice";

export interface AnimationItem {
el: HTMLElement,
Expand Down
5 changes: 3 additions & 2 deletions src/components/appMediaPlaybackController.ts
Expand Up @@ -13,15 +13,16 @@ import { MOUNT_CLASS_TO } from "../config/debug";
import appDownloadManager from "../lib/appManagers/appDownloadManager";
import simulateEvent from "../helpers/dom/dispatchEvent";
import type { SearchSuperContext } from "./appSearchSuper.";
import { copy, deepEqual } from "../helpers/object";
import { DocumentAttribute, Message, MessageMedia, PhotoSize } from "../layer";
import { DocumentAttribute, Message, PhotoSize } from "../layer";
import appPhotosManager from "../lib/appManagers/appPhotosManager";
import { IS_TOUCH_SUPPORTED } from "../environment/touchSupport";
import appAvatarsManager from "../lib/appManagers/appAvatarsManager";
import appPeersManager from "../lib/appManagers/appPeersManager";
import I18n from "../lib/langPack";
import SearchListLoader from "../helpers/searchListLoader";
import { onMediaLoad } from "../helpers/files";
import copy from "../helpers/object/copy";
import deepEqual from "../helpers/object/deepEqual";

// TODO: Safari: проверить стрим, включить его и сразу попробовать включить видео или другую песню
// TODO: Safari: попробовать замаскировать подгрузку последнего чанка
Expand Down
3 changes: 1 addition & 2 deletions src/components/appNavigationController.ts
Expand Up @@ -7,11 +7,10 @@
import { MOUNT_CLASS_TO } from "../config/debug";
import { IS_MOBILE_SAFARI } from "../environment/userAgent";
import { logger } from "../lib/logger";
import { doubleRaf } from "../helpers/schedulers";
import blurActiveElement from "../helpers/dom/blurActiveElement";
import { cancelEvent } from "../helpers/dom/cancelEvent";
import { indexOfAndSplice } from "../helpers/array";
import isSwipingBackSafari from "../helpers/dom/isSwipingBackSafari";
import indexOfAndSplice from "../helpers/array/indexOfAndSplice";

export type NavigationItem = {
type: 'left' | 'right' | 'im' | 'chat' | 'popup' | 'media' | 'menu' |
Expand Down
4 changes: 3 additions & 1 deletion src/components/appSearchSuper..ts
Expand Up @@ -4,7 +4,6 @@
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/

import { copy, getObjectKeysAndSort, safeAssign } from "../helpers/object";
import { escapeRegExp, limitSymbols } from "../helpers/string";
import appChatsManager from "../lib/appManagers/appChatsManager";
import appDialogsManager from "../lib/appManagers/appDialogsManager";
Expand Down Expand Up @@ -51,6 +50,9 @@ import { attachClickEvent, simulateClickEvent } from "../helpers/dom/clickEvent"
import { MyDocument } from "../lib/appManagers/appDocsManager";
import AppMediaViewer from "./appMediaViewer";
import lockTouchScroll from "../helpers/dom/lockTouchScroll";
import copy from "../helpers/object/copy";
import getObjectKeysAndSort from "../helpers/object/getObjectKeysAndSort";
import safeAssign from "../helpers/object/safeAssign";

//const testScroll = false;

Expand Down
5 changes: 3 additions & 2 deletions src/components/appSelectPeers.ts
Expand Up @@ -13,18 +13,19 @@ import Scrollable from "./scrollable";
import { FocusDirection } from "../helpers/fastSmoothScroll";
import CheckboxField from "./checkboxField";
import appProfileManager from "../lib/appManagers/appProfileManager";
import { safeAssign } from "../helpers/object";
import { i18n, LangPackKey, _i18n } from "../lib/langPack";
import findUpAttribute from "../helpers/dom/findUpAttribute";
import findUpClassName from "../helpers/dom/findUpClassName";
import PeerTitle from "./peerTitle";
import { cancelEvent } from "../helpers/dom/cancelEvent";
import replaceContent from "../helpers/dom/replaceContent";
import { filterUnique, indexOfAndSplice } from "../helpers/array";
import debounce from "../helpers/schedulers/debounce";
import windowSize from "../helpers/windowSize";
import appPeersManager, { IsPeerType } from "../lib/appManagers/appPeersManager";
import { generateDelimiter, SettingSection } from "./sidebarLeft";
import filterUnique from "../helpers/array/filterUnique";
import indexOfAndSplice from "../helpers/array/indexOfAndSplice";
import safeAssign from "../helpers/object/safeAssign";

type SelectSearchPeerType = 'contacts' | 'dialogs' | 'channelParticipants';

Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar.ts
Expand Up @@ -17,7 +17,7 @@ import appAvatarsManager from "../lib/appManagers/appAvatarsManager";
import AppMediaViewer from "./appMediaViewer";
import AppMediaViewerAvatar from "./appMediaViewerAvatar";
import { NULL_PEER_ID } from "../lib/mtproto/mtproto_config";
import { isObject } from "../helpers/object";
import isObject from "../helpers/object/isObject";

const onAvatarUpdate = (peerId: PeerId) => {
appAvatarsManager.removeFromAvatarsCache(peerId);
Expand Down

0 comments on commit 4725119

Please sign in to comment.