diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd4f2b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..fed4c96 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# PeerConnection + +## Warning + +This is fresh and untested! + + +## What is this? + +A tiny browser module that gives normalizes and simplifies the API for WebRTC peer connections. + +It gives us a cleaner (cross-browser) way to handle offer/answer and is based on an Event Emitter. + +If you're not using browserify or you want AMD support use `rtcpeerconnection.bundle.js`. + + +## Installing + +``` +npm install rtcpeerconnection +``` + +## How to use it + +## License + +MIT + +## Created By + +If you like this, follow: [@HenrikJoreteg](http://twitter.com/henrikjoreteg) on twitter. + diff --git a/build.js b/build.js new file mode 100644 index 0000000..8293b51 --- /dev/null +++ b/build.js @@ -0,0 +1,6 @@ +var bundle = require('browserify')(), + fs = require('fs'); + + +bundle.add('./rtcpeerconnection'); +bundle.bundle({standalone: 'PeerConnection'}).pipe(fs.createWriteStream('rtcpeerconnection.bundle.js')); diff --git a/index.html b/index.html new file mode 100644 index 0000000..6b2a1bd --- /dev/null +++ b/index.html @@ -0,0 +1,7 @@ + + + + Test + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..ca7b36d --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "rtcpeerconnection", + "version": "0.0.0", + "description": "A tiny browser module that gives normalizes and simplifies the API for WebRTC peer connections.", + "main": "rtcpeerconnection.js", + "repository": { + "type": "git", + "url": "https://github.com/HenrikJoreteg/RTCPeerConnection" + }, + "keywords": [ + "browser", + "RTCPeerConnection", + "WebRTC" + ], + "author": "Henrik Joreteg ", + "license": "MIT", + "dependencies": { + "wildemitter": "0.0.5" + }, + "devDependencies": { + "browserify": "2.x" + } +} diff --git a/rtcpeerconnection.bundle.js b/rtcpeerconnection.bundle.js new file mode 100644 index 0000000..66b8d9f --- /dev/null +++ b/rtcpeerconnection.bundle.js @@ -0,0 +1,257 @@ +(function(e){if("function"==typeof bootstrap)bootstrap("peerconnection",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makePeerConnection=e}else"undefined"!=typeof window?window.PeerConnection=e():global.PeerConnection=e()})(function(){var define,ses,bootstrap,module,exports; +return (function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s