bredele / peer Goto Github PK
View Code? Open in Web Editor NEWWebRTC peer connection made easy
License: MIT License
WebRTC peer connection made easy
License: MIT License
Should it be in peer or in some plugins such as video, audio, etc?
method to to bind a peer connection to an other one (just event delegation)
Maybe use mood and expose peer states
create a private handler to generate sessions by type ('offer' or 'answer').
Peer initialize a peer connection and is independent from media implementation.
record
audio
virus
spider
constraints
detect
morse
some plugins extend a peer with some functions. For example channel add a send method to send data through a data channel.
peer.send = function(data) {
channel.send(data);
};
if the channel is not create yet, send will trigger an exception. Is there a way to have something cleaner?
May be send should be in the peer module and emit an event hook.
Some plugins can be asynchronous (like turn for example) and we could add a door in peer for these plugins which trigger a ready event once the door is unlocked. For example we don't want to start a handshake (signal) before we get the turn server information (turn).
trickle ice allows to accelerate the session handshake by sending ice candidates asynchronously (instead waiting the sdp to be ready). But we should not set the ice candidates until a remote description is set...there is two solutions:
Using a channel emitter would allows us to change the input and output of a data stream.
Peer.prototype.local = function(session) {
var sdp = session.sdp;
var split = sdp.split("b=AS:30");
if(split.length > 1) {
sdp = split[0] + "b=AS:1638400" + split[1];
}
session.sdp = sdp;
this.connection.setLocalDescription(new Session(session));
};
we should control the flow and the congestion
clean events and trigger an event that can be used by plugins.
Just add hooks 'before offer' and 'after offer'
The handler use
should accept streams. A good example is channel, the plugin channel should be a duplex stream but we should be able to add it as a plugin to peer.
'wedge' offer and answer constraints on offer/answer. It makes sense to create a constraint module which merge and format multiple constraints.
could be a fake constraint
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.