All Projects → ajb413 → pubnub-js-webrtc

ajb413 / pubnub-js-webrtc

Licence: MIT License
adambavosa.com/pubnub-js-webrtc/example/

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to pubnub-js-webrtc

Starrtc Android Demo
🚀starRTC,即时通讯(IM)系统,免费IM系统(含单聊,群聊,聊天室,文件传输),免费一对一视频聊天,VOIP,语音对讲(回音消除),直播连麦,视频直播,RTSP拉流,RTMP推流,webRTC服务端,在线教育,白板,小班课,在线会议,视频会议,视频监控,局域网直连(无需服务器),兼容webRTC, 支持webRTC加速,P2P高清传输,安卓、iOS、web互通,支持门禁对讲,可视对讲,电视盒子,树莓派,海思,全志,任天堂switch,云游戏,OTT设备,物联网平台,C语言自研方案,支持二次开发成类微信,类映客等APP,✨万水千山总是情,来个star行不行✨,更多示例请访问:
Stars: ✭ 3,038 (+18887.5%)
Mutual labels:  webrtc, video-chat
gise-video-chat
Video chat application for your own web server
Stars: ✭ 48 (+200%)
Mutual labels:  webrtc, video-chat
Decentralized Video Chat
🚀 Zipcall- Acquired @ 250k users 🚀 Peer to peer browser video calling platform with unmatched video quality and latency.
Stars: ✭ 3,284 (+20425%)
Mutual labels:  webrtc, video-chat
visual-ts-game-engine
Typescript project based on matter.ts implementation."This version 2 of visualjs game engine, totally different approach. Whole project is based fully dependency build. Main file is app.ts and ioc.ts. Class ioc saves singleton instances also bind. In this project html and css is also present, webpack helps and handle this type of files. GamePlay…
Stars: ✭ 15 (-6.25%)
Mutual labels:  webrtc, video-chat
Rtcmulticonnection
RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
Stars: ✭ 2,187 (+13568.75%)
Mutual labels:  webrtc, webrtc-javascript-library
q-municate-web
Q-municate Web chat application
Stars: ✭ 66 (+312.5%)
Mutual labels:  video-calls
CustomRPC
Set a custom rich presence status on Discord
Stars: ✭ 25 (+56.25%)
Mutual labels:  presence
lapdog
Take actions when specific devices appear/disappear from your LAN
Stars: ✭ 17 (+6.25%)
Mutual labels:  presence
samp-discord-plugin
SA:MP Discord Rich Presence plugin
Stars: ✭ 63 (+293.75%)
Mutual labels:  presence
WebRTC
Home Assistant custom component for viewing IP cameras RTSP stream in real time using WebRTC and MSE technology
Stars: ✭ 538 (+3262.5%)
Mutual labels:  webrtc
data-transport
A generic and responsible communication transporter(iframe/Broadcast/Web Worker/Service Worker/Shared Worker/WebRTC/Electron, etc.)
Stars: ✭ 27 (+68.75%)
Mutual labels:  webrtc
video-chat
Simple Web Application that offer you to create video meeting room using WebRTC and Socket.
Stars: ✭ 32 (+100%)
Mutual labels:  video-chat
ts-is-present
Solves the TypeScript filtering of undefined and null issue, amongst others: https://github.com/microsoft/TypeScript/issues/16069#issuecomment-565658443
Stars: ✭ 50 (+212.5%)
Mutual labels:  presence
tigase-swift
(M) Tigase Swift XMPP client library
Stars: ✭ 53 (+231.25%)
Mutual labels:  presence
laravel-video-chat
A Collection of Demo Applications with Laravel + WebRTC
Stars: ✭ 116 (+625%)
Mutual labels:  video-chat
ros-gst-bridge
a bidirectional ros to gstreamer bridge and utilities for dynamic pipelines
Stars: ✭ 46 (+187.5%)
Mutual labels:  webrtc
IEvangelist.VideoChat
Imagine two Twilio SDKs, ASP.NET Core/C#, Angular/TypeScript, SignalR, etc... Yeah, amazing!
Stars: ✭ 66 (+312.5%)
Mutual labels:  video-chat
Sofia
Cutomize your discord profile.
Stars: ✭ 18 (+12.5%)
Mutual labels:  presence
WebRTC-Python-Open-Source-Application-for-1-to-1-video-chat
This Sample Python Application demonstrates the use of EnableX Platform Server APIs and JavaScript Toolkit to develop basic one to one video chat application. It allows developers to ramp up on app development by hosting on their own devices.
Stars: ✭ 12 (-25%)
Mutual labels:  webrtc
ascii-chat
A terminal-based peer-to-peer (P2P) end-to-end-encrypted (E2EE) video chat application with text messaging, written in OCaml. Supports up to 4 clients. Supports connections over internet and LAN.
Stars: ✭ 20 (+25%)
Mutual labels:  video-chat

JavaScript WebRTC Video Chat Package with PubNub

Adds the ability to do 1-to-1 WebRTC audio/video calls with PubNub. The PubNub key set must have PubNub Presence enabled. The example folder app uses Xirsys to get TURN server access via a PubNub Function.

WebRTC with PubNub Chat in JavaScript Screenshot

For education on WebRTC, and also a how-to for making your own app with this repository see these blog posts:

Initialization of the WebRTC Phone

let pubnub = new PubNub({
    publishKey: 'your-publish-api-key-here',
    subscribeKey: 'your-subscribe-api-key-here'
});

// set up all event handlers ...

// WebRTC phone object configuration.
let config = {
    rtcConfig,
    ignoreNonTurn: false,
    myStream: myAudioVideoStream,
    onPeerStream,   // is required
    onIncomingCall, // is required
    onCallResponse, // is required
    onDisconnect,   // is required
    pubnub          // is required
};

webRtcPhone = new WebRtcPhone(config);

Items that are provided to the WebRtcPhone constructor via the config object

// Standard WebRTC constructor config parameter (this data is for example purposes and will not work)
let rtcConfig = {
    iceServers: [
        {
            urls: "stun:stun.example.com",
            username: "[email protected]", 
            credential: "webrtcdemo"
        }, {
            urls: ["stun:stun.example.com", "stun:stun-1.example.com"]
        }
    ]
};

// WebRTC phone object event for when the remote peer's video becomes available.
const onPeerStream = (webRTCTrackEvent) => {
    console.log('Peer audio/video stream now available');
    const peerStream = webRTCTrackEvent.streams[0];
    window.peerStream = peerStream;
    remoteVideo.srcObject = peerStream; // HTML <video> element
};

// WebRTC phone object event for when a remote peer attempts to call you.
const onIncomingCall = (fromUuid, callResponseCallback) => {
    let username = 'Bob';
    incomingCall(username).then((acceptedCall) => {
        if (acceptedCall) {
            // End an already open call before opening a new one
            webRtcPhone.disconnect();
            // Update your UI for showing peer video feed
        }

        callResponseCallback({ acceptedCall });
    });
};

// WebRTC phone object event for when the remote peer responds to your call request.
const onCallResponse = (acceptedCall) => {
    console.log('Call response: ', acceptedCall ? 'accepted' : 'rejected');
    if (acceptedCall) {
        // Update your UI for showing peer video feed
    }
};

// WebRTC phone object event for when a call disconnects or timeouts.
const onDisconnect = () => {
    console.log('Call disconnected');
    // Update your UI for hiding peer video feed
};

Send a call request to another user

webRtcPhone.callUser("Alice", {
    myStream: myAudioVideoStream // Get this stream with `navigator.mediaDevices.getUserMedia()`
});

Frequently Asked Questions (FAQ) about the PubNub JS WebRTC Package

What is WebRTC?

WebRTC is a free and open source project that enables web browsers and mobile devices to provide a simple real-time communication API. Please read this PubNub blog to learn more about WebRTC and how to implement the code in this repository.

What is PubNub? Why is PubNub relevant to WebRTC?

PubNub is a global Data Stream Network (DSN) and realtime network-as-a-service. PubNub's primary product is a realtime publish/subscribe messaging API built on a global data stream network which is made up of a replicated network with multiple points of presence around the world.

PubNub is a low cost, easy to use, infrastructure API that can be implemented rapidly as a WebRTC signaling service. The signaling service is responsible for delivering messages to WebRTC peer clients. See the next question for the specific signals that PubNub's publish/subscribe API handles.

Does PubNub stream audio or video data?

No. PubNub pairs very well with WebRTC as a signaling service. This means that PubNub signals events from client to client using the Pub/Sub messaging over TCP. These events include:

  • I, User A, would like to call you, User B
  • User A is currently trying to call you, User B
  • I, User B, accept your call User A
  • I, User B, reject your call User A
  • I, User B, would like to end our call User A
  • I, User A, would like to end our call User B
  • Text instant messaging like in Slack, Google Hangouts, Skype, Facebook Messenger, etc.

Is this package officially part of PubNub?

No. It is an open source project that is community supported. If you want to report a bug, do so on the GitHub Issues page.

Can I make a group call with more than 2 participants?

Group calling is possible to develop with WebRTC and PubNub, however, the current PubNub WebRTC package can connect only 2 users in a private call. The community may develop this feature in the future but there are no plans for development to date.

I found a bug in the package. Where do I report it?

The PubNub WebRTC package is an open source, community supported project. This means that the best place to report bugs is on the GitHub Issues page in for the code repository. The community will tackle the bug fix at will, so there is no guarantee that a fix will be made. If you wish to provide a code fix, fork the GitHub repository to your GitHub account, push fixes, and make a pull request (process documented on GitHub).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].