Type-safe version of EventEmitter

Hierarchy (view full)

Properties

externalStats: any = undefined

外部上报的数据

rttSamples: number[] = []
showStatus: boolean = false
topics: Record<string | number | symbol, ITopic<any>[]> = ...

Methods

  • Returns void

  • Parameters

    • newData: IBusinessMetric[]

      需要添加到 stats 的数据

    Returns void

    Description

    业务增加需要在 stats 中显示的数据

  • 注入收集函数

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • 移除所有的监听事件

    Returns void

  • 获取当前的 FPS

    Returns number

  • 获取RTC收帧FPS

    Returns undefined | number

  • 获取当前的 Rtc RTT,ms

    Returns number

  • 获取SDK版本

    Returns string

  • 获取最新的 Stats 数据

    Returns {
        activeAnimation: number;
        activeBones: number;
        activeParticles: number;
        animationTime: number;
        appId: string;
        audioCount: number;
        avatar: IAvatarStats;
        avatarNumber: number;
        avgJoystickDiff: number;
        beforeCameraRenderTime: number;
        browser: string;
        browserEngine: string;
        browserVersion: string;
        bufReadyNotUse: number;
        bufWaitGPU: number;
        bufferDropCount: number;
        bweKbps: number;
        centerDiff: string;
        decoderStats: StatData;
        drawcall: number;
        drawcallTime: number;
        engineVersion: string;
        env: string;
        fps: number;
        interFrameTime: number;
        joystickProtoMode: EJoystickProtoMode;
        mainTickRunning: boolean;
        maxJoystickDiff: number;
        maxVideoJump: number;
        meanReadPixelDeltaTime: string;
        meshSelectTime: number;
        model: string;
        movementTriggerMode: IMovementTriggerMode;
        networkQuality: MainNetworkQualityDetail;
        oldFrameDueWaitGPU: number;
        onlinePathType: EOnlinePathType;
        os: string;
        osVersion: string;
        quality: string;
        readPixelRunning: boolean;
        readPixelTimeMean: number;
        registerAfterCount: number;
        registerAfterRenderTime: number;
        registerBeforeCount: number;
        registerBeforeRenderTime: number;
        releaseId: string;
        renderAvatarTriangle: number;
        renderDeltaTime: number;
        renderFrameTime: number;
        renderTargetRenderTime: number;
        resolution: string;
        scaling: string;
        sdJoystickDiff: number;
        sdkVersion: string;
        skeletonAvatarNumber: number;
        softSkinningTime: number;
        systemBenchmark: string;
        terminalType: string;
        timerCount: number;
        totalGeometries: number;
        totalLowpolyTriangle: number;
        totalMaterials: number;
        totalMeshes: number;
        totalRootNodes: number;
        totalTextures: number;
        transportState: ITransportState;
        triangle: number;
        userId: string;
        vatAvatarNumber: number;
        vender: string;
        videoCount: number;
        videoFrameJumpCount: number;
        videoJumpRatio: number;
        webgl: string;
        worldStage: EWorldStage;
        xmitStats: any;
        xrtcStats: IRTCStats;
    }

    • activeAnimation: number
    • activeBones: number
    • activeParticles: number
    • animationTime: number
    • appId: string
    • audioCount: number
    • avatar: IAvatarStats
    • avatarNumber: number
    • avgJoystickDiff: number
    • beforeCameraRenderTime: number
    • browser: string
    • browserEngine: string
    • browserVersion: string
    • bufReadyNotUse: number
    • bufWaitGPU: number
    • bufferDropCount: number
    • bweKbps: number
    • centerDiff: string
    • decoderStats: StatData
    • drawcall: number
    • drawcallTime: number
    • engineVersion: string
    • env: string
    • fps: number
    • interFrameTime: number
    • joystickProtoMode: EJoystickProtoMode
    • mainTickRunning: boolean
    • maxJoystickDiff: number
    • maxVideoJump: number
    • meanReadPixelDeltaTime: string
    • meshSelectTime: number
    • model: string
    • movementTriggerMode: IMovementTriggerMode
    • networkQuality: MainNetworkQualityDetail
    • oldFrameDueWaitGPU: number
    • onlinePathType: EOnlinePathType
    • os: string
    • osVersion: string
    • quality: string
    • readPixelRunning: boolean
    • readPixelTimeMean: number
    • registerAfterCount: number
    • registerAfterRenderTime: number
    • registerBeforeCount: number
    • registerBeforeRenderTime: number
    • releaseId: string
    • renderAvatarTriangle: number
    • renderDeltaTime: number
    • renderFrameTime: number
    • renderTargetRenderTime: number
    • resolution: string
    • scaling: string
    • sdJoystickDiff: number
    • sdkVersion: string
    • skeletonAvatarNumber: number
    • softSkinningTime: number
    • systemBenchmark: string
    • terminalType: string
    • timerCount: number
    • totalGeometries: number
    • totalLowpolyTriangle: number
    • totalMaterials: number
    • totalMeshes: number
    • totalRootNodes: number
    • totalTextures: number
    • transportState: ITransportState
    • triangle: number
    • userId: string
    • vatAvatarNumber: number
    • vender: string
    • videoCount: number
    • videoFrameJumpCount: number
    • videoJumpRatio: number
    • webgl: string
    • worldStage: EWorldStage
    • xmitStats: any
    • xrtcStats: IRTCStats
  • 获取网络质量评分

    Returns MainNetworkQualityDetail

  • 获取当前的 xmit RTT,ms

    Returns number

  • 关闭 stats 控件

    Returns void

  • Returns void

  • 移除监听事件

    Type Parameters

    • K extends string | number | symbol

    Parameters

    • topic: K
    • Optional listener: IListener<any>

    Returns void

  • 添加事件监听器

    Type Parameters

    • K extends string | number | symbol

    Parameters

    • topic: K
    • listener: IListener<any>
    • Optional order: number

    Returns {
        unsub: (() => void);
    }

    • unsub: (() => void)
        • (): void
        • Returns void

  • 添加事件监听器,单个 listener 只执行1次

    Type Parameters

    • K extends string | number | symbol

    Parameters

    • topic: K
    • listener: IListener<any>
    • Optional order: number

    Returns {
        unsub: (() => void);
    }

    • unsub: (() => void)
        • (): void
        • Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • 外部上报额外统计数据

    Parameters

    • data: Record<string, any>

    Returns void

  • 展示 stats 控件

    Returns void

Generated using TypeDoc