Subject: [rtcweb] Fwd: Proof of concept: ROAP on top of JSEP - 184 lines and counting

From: Harald Alvestrand <[email-masked]>
Date: Mon, 05 Mar 2012 20:05:53 +0100

This might be of interest to people on rtcweb too.
Please keep the discussion on webrtc if at all possible, so that we 
don't do it in both places all the time.

               Harald

-------- Original Message --------
Subject: 	Proof of concept: ROAP on top of JSEP - 184 lines and counting
Resent-Date: 	Mon, 05 Mar 2012 13:02:06 +0000
Resent-From: 	[email-masked]
Date: 	Mon, 05 Mar 2012 14:01:25 +0100
From: 	Harald Alvestrand <[email-masked]>
To: 	[email-masked] <[email-masked]>

Hi,

my weekend project is now visible to the world:
I implemented a layer of Javascript code that allows you to program
against the ROAP interface while using a JSEP object underneath it.

I have not implemented all aspects, but it's enough to do some testing.
For instance, close() is not implemented :-) - and I also left out
retransmission and actual glare handling.

(Of course, since JSEP isn't implemented yet, I had to create a dummy
JSEP to run my code against... this is also included.)

There are several aspects that show some degree of DOM/JS ignorance, for
instance:

- I don't know how to dispatch a signal from Javascript. Instead, I use
window.setTimeout() to achieve a similar-looking result: Getting
something to happen after the current function finishes.

- I don't know the proper way to generate errors for throwing. So the
code throws text strings when something bad happens.

Still, it's a fairly self-contained piece of code; I think it
demonstrates the order of magnitude of the library that's needed to
allow people to use a ROAP programming model on top of JSEP.

Comments (and patches) welcome!

The code is here:

http://code.google.com/p/webrtc-samples/source/browse/#svn%2Ftrunk%2Froap-jsep

Have fun!

                         Harald