Skip to content

NeoRTC delivers a 1-n video / audio stream (conference) and InstantMessage functions to your web-app just using JavaScript. Just reference NeoRTC

License

Notifications You must be signed in to change notification settings

MagnusThor/NeoRTC

Repository files navigation

NeoRTC

TBD

Installation

clone this repo

git clone https://github.com/MagnusThor/NeoRTC.git

or reference the neortc.js for development purpose using

https://rawgit.com/MagnusThor/NeoRTC/master/src/neortc.js

Documentation

NeoRTC.Conference(?settings:RTCConfig): NeoRTC.App

var app = new NeoRTC.Conference();

NeoRTC.Settings

TBD

defaults to

    {
        iceTransports: 'all',
        iceServers: [
            {
                urls: "stun:stun.l.google.com:19302"
            }
        ]
    }

Methods

getUserMedia(constaints:MediaStreamConstraints,callback(mediastream):Function): void

When you call getUserMedia the browser prompts the clients for mediastream access based on the constaints parameter.

        app.getUserMedia( { video: true, audio: false },
            function (mediaStream) {
                // do op's with mediaStream
        });

ChangeContext(ctx:string)

TBD

app.ChangeContext("foo") ;

AddLocalStream(mediaStream:MediaStream):void

Add a mediastream to the local peer. the mediastream's you add will be shared with the other peers on the same context.

app.AddLocalStream(mediaStream);

sendInstantMessage(message:any): void

When you call sendInstantMessage you will pass the message:any to all clients connected to the same context.

app.sendInstantMessage({text:'Hello from Chat'})

Events

OnReady(): void

Fires when the NeoRTC.Conference is connected to the backend (service).

app.OnReady = function () {
        // do op
 }  

OnLocalStream(mediaStream;MediaStream): void

Fires when a local stream is added.

OnRemoteStream(mediaStream:MediaStream,connection:PeerConnection)

Fires when a remote mediastream is available.

OnRemoteStreamlost(mediastreamId:string): void

Fires when a mediastream is lost.

About

NeoRTC delivers a 1-n video / audio stream (conference) and InstantMessage functions to your web-app just using JavaScript. Just reference NeoRTC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published