custom cursor draw function

This commit is contained in:
Miroslav Šedivý
2021-10-18 11:14:05 +00:00
parent f69e3dfdb9
commit 3227e691ea
5 changed files with 112 additions and 66 deletions

View File

@ -1,5 +1,5 @@
import EventEmitter from 'eventemitter3'
import { WebRTCStats } from '../types/webrtc'
import { WebRTCStats, CursorPosition, CursorImage } from '../types/webrtc'
import { Logger } from '../utils/logger'
export const OPCODE = {
@ -23,8 +23,8 @@ export interface NekoWebRTCEvents {
track: (event: RTCTrackEvent) => void
candidate: (candidate: RTCIceCandidateInit) => void
stats: (stats: WebRTCStats) => void
['cursor-position']: (data: { x: number; y: number }) => void
['cursor-image']: (data: { width: number; height: number; x: number; y: number; uri: string }) => void
['cursor-position']: (data: CursorPosition) => void
['cursor-image']: (data: CursorImage) => void
}
export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {