Skip to content

Commit

Permalink
chore: Use @roamhq/wrtc instead of @koush/wrtc (#17819)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisamir98 authored Jul 25, 2024
1 parent 00661d5 commit b073edf
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 478 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@emotion/eslint-plugin": "11.11.0",
"@faker-js/faker": "8.4.1",
"@formatjs/cli": "6.2.12",
"@koush/wrtc": "0.5.3",
"@roamhq/wrtc": "0.8.0",
"@testing-library/dom": "^10.3.2",
"@testing-library/react": "16.0.0",
"@types/dexie-batch": "0.4.7",
Expand Down
10 changes: 5 additions & 5 deletions src/script/util/test/mock/WebRTCMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
*
*/

import wrtc from '@koush/wrtc';
import {nonstandard, RTCRtpSender, MediaStream} from '@roamhq/wrtc';

const {RTCAudioSource, RTCRtpSender} = wrtc.nonstandard;
const {RTCAudioSource} = nonstandard;

declare global {
interface Window {
MediaStream: typeof wrtc.MediaStream;
MediaStream: typeof MediaStream;
RTCAudioSource: typeof RTCAudioSource;
RTCRtpSender: typeof RTCRtpSender;
}
}
const RTCRtpSenderMock: Window['RTCRtpSender'] = {
const RTCRtpSenderMock = {
prototype: {createEncodedVideoStreams: {}, createEncodedStreams: {}, transform: {}},
};

Object.defineProperty(window, 'MediaStream', {
value: wrtc.MediaStream,
value: MediaStream,
writable: true,
});

Expand Down
Loading

0 comments on commit b073edf

Please sign in to comment.