File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed
Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,10 @@ export default class Peer {
266266 private addDataChannel ( channel : RTCDataChannel ) {
267267 // setup data channel events
268268 channel . onopen = ( ) => this . emit ( 'channelOpen' , { channel } ) ;
269- channel . onerror = ( error : RTCErrorEvent ) => this . emit ( 'channelError' , { channel, error } ) ;
269+ channel . onerror = ( ev : Event ) => {
270+ const event = ev as RTCErrorEvent ;
271+ this . emit ( 'channelError' , { channel, event } ) ;
272+ } ;
270273 channel . onclose = ( ) => {
271274 this . channels . delete ( channel . label ) ;
272275 this . emit ( 'channelClosed' , { channel } ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export interface PeerEvents {
2727 // RTCDataChannel
2828 channelOpen : ( data : { channel : RTCDataChannel } ) => void ;
2929 channelClosed : ( data : { channel : RTCDataChannel } ) => void ;
30- channelError : ( data : { channel : RTCDataChannel ; error : RTCErrorEvent } ) => void ;
30+ channelError : ( data : { channel : RTCDataChannel ; event : RTCErrorEvent } ) => void ;
3131 channelData : ( data : {
3232 channel : RTCDataChannel ;
3333 source : 'incoming' | 'outgoing' ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export function randomHex(n: number) {
2020
2121export const filterTracksAV =
2222 ( video : boolean , audio : boolean ) : FilterTracksFunc =>
23- ( track : MediaStreamTrack ) => {
23+ ( track ) => {
2424 const isVideo = video && track ?. kind === 'video' ;
2525 const isAudio = audio && track ?. kind === 'audio' ;
2626 return isVideo || isAudio ;
Original file line number Diff line number Diff line change 77 "skipLibCheck" : true ,
88 "sourceMap" : true ,
99 "stripInternal" : true ,
10+ "strictBindCallApply" : true ,
11+ "strictFunctionTypes" : true ,
1012 "strictNullChecks" : true ,
1113 "esModuleInterop" : true ,
1214 "outDir" : " dist" ,
You can’t perform that action at this time.
0 commit comments