1.0.0 • Published 3 years ago

@p1xel.tv/webrtc-player v1.0.0

Weekly downloads
182
License
MIT
Repository
github
Last release
3 years ago

WebRTCPlayer

WebRTC peer connection video Player written in typescript

This project is heavily inspired by the Unreal Engine 4 Pixelstreaming Example https://docs.unrealengine.com/en-US/SharingAndReleasing/PixelStreaming/index.html

install

yarn add @p1xel.tv/webrtcplayer or npm i @p1xel.tv/webrtcplayer

example

import {WebRTCPlayer} from "@p1xel.tv/webrtcplayer";

let rtcPlayer = new WebRTCPlayer(htmlElement, options, webSocket)
rtcPlayer.onWebRtcOffer = (offer: RTCSessionDescriptionInit) => {
    //send offer to Signalling/PeerConnection
};
rtcPlayer.onWebRtcCandidate = (candidate: RTCIceCandidate) => {
    //send candidate to Signalling/PeerConnection
};
rtcPlayer.onDataChannelConnected = () => {
    //...;
};
rtcPlayer.onDataChannelMessage = (data: ArrayBufferLike) => {
    //...
};
rtcPlayer.onVideoInitialised = () => {
    //...
};

Development

  • Use yarn because of the lock file

yarn

Creating a bundle

yarn wp

Publishing

yarn pub

1.0.0

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago