Skip to content

fitraditya/sjc.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sjc.js

Simple janus client API. It aims to simplify janus client API.

Supported Plugins

  • Video Room

Examples

API

Video Room

Initialization

<script src="sjc.videoroom.js"></script>
videoroom = new VideoRoom("ws://localhost:8020");

Methods

Create Room

Parameter:

  • Room: integer
videoroom.createRoom(room);

Join Room

Parameter:

  • Room: integer
videoroom.joinRoom(room);

Publish

Parameter:

  • displayName: string
videoroom.publish(displayName);

Unpublish

videoroom.unpublish();

Subscribe

Parameter:

  • target: string
videoroom.string(target);

Events

videoroom.onReady = function() {}

Called when user connected to janus signaling server.

videoroom.onJoinRoom = function(data) {}

Called when user joined to room.

videoroom.onLocalStream = function(stream) {}

Called when user has a local video (stream).

videoroom.onRemoteStream = function(stream) {}

Called when user received a remote video (stream) after subscribing.

videoroom.onEvent = function(event, data) {}

Called when user received a janus event.

videoroom.onError = function(error) {}

Called when error occured.

About

Simple janus client API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published