Skip to content

Send raw bytes through data channel #608

@Ozzadar

Description

@Ozzadar

Component your feature request relates to

  • Signalling server
  • Frontend library
  • Frontend UI library
  • Matchmaker
  • SFU
  • This repo

Problem your feature solves? Please describe.
Currently, the only way I see to send arbitrary data through the data channel is to run everything through emitUIInteraction which runs everything throughJSON.stringify(). This makes sending arbitrary bytes through rather annoying.

Describe the solution you'd like

I'd like a function that sends a byte array ( Uint8Array.?) through the data channel without any processing.

    public emitBytes(bytes: Uint8Array) {
        if (!this._webRtcController.videoPlayer.isVideoReady()) {
            return false;
        }
        this._webRtcController.emitBytes(bytes);
        return true;
    }

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions