fix(tracker): fix assist build
This commit is contained in:
parent
39ca414137
commit
3a1fb49866
4 changed files with 24 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker-assist",
|
||||
"description": "Tracker plugin for screen assistance through the WebRTC",
|
||||
"version": "7.0.0-beta.1",
|
||||
"version": "7.0.0-beta.2",
|
||||
"keywords": [
|
||||
"WebRTC",
|
||||
"assistance",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||
import {hasTag,} from '@openreplay/tracker/lib/app/guards'
|
||||
import type { Socket, } from 'socket.io-client'
|
||||
import { connect, } from 'socket.io-client'
|
||||
import Peer, { MediaConnection, } from 'peerjs'
|
||||
|
|
@ -7,6 +6,7 @@ import type { Properties, } from 'csstype'
|
|||
import { App, } from '@openreplay/tracker'
|
||||
|
||||
import RequestLocalStream, { LocalStream, } from './LocalStream.js'
|
||||
import {hasTag,} from './guards.js'
|
||||
import RemoteControl, { RCStatus, } from './RemoteControl.js'
|
||||
import CallWindow from './CallWindow.js'
|
||||
import AnnotationCanvas from './AnnotationCanvas.js'
|
||||
|
|
|
|||
21
tracker/tracker-assist/src/guards.ts
Normal file
21
tracker/tracker-assist/src/guards.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
type TagTypeMap = {
|
||||
html: HTMLHtmlElement
|
||||
body: HTMLBodyElement
|
||||
img: HTMLImageElement
|
||||
input: HTMLInputElement
|
||||
textarea: HTMLTextAreaElement
|
||||
select: HTMLSelectElement
|
||||
label: HTMLLabelElement
|
||||
iframe: HTMLIFrameElement
|
||||
style: HTMLStyleElement | SVGStyleElement
|
||||
link: HTMLLinkElement
|
||||
canvas: HTMLCanvasElement
|
||||
}
|
||||
export function hasTag<T extends keyof TagTypeMap>(
|
||||
el: Node,
|
||||
tagName: T,
|
||||
): el is TagTypeMap[typeof tagName] {
|
||||
// @ts-ignore
|
||||
return el.localName === tagName
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
export const pkgVersion = '7.0.0-beta.1'
|
||||
export const pkgVersion = '7.0.0-beta.2'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue