A few months ago I made an OpenTok JavaScript plug-in that created a simple widget that publishes and subscribes to. Essentially it creates a stripped down version of the basic html embed that allows you to customize things further however you’d like. You can try that widget live here.

This past week Pasha from PuppetSmith.com wanted to create a simple way for the admins on his site to publish a stream and have all non-admins as viewers. You could certainly build this functionality yourself with the full API, but it would be nice to have a quick solution for this common scenario.

As a result, I built in some features to the _OT.widget JavaScript plugin that will handle this scenario. Now, it will handle all publisher/subscriber logic depending on what token you pass it. You can also pass it the publishFull property that will show the publisher in full screen rather than in the corner of the window. With one publisher, this is what the widget looks like: