Preparing a web page
In your HTML code, add a div tag at the location where you would like to see your live camera. Name it “liveEncoder”.
Embedding with jQuery
Generally you should access plugins only when the web page is fully loaded. You can ensure this by using the jQuery.ready function:
Run the encoder broadcast
// init the encoder live.InitEncoder(); //stream to an RTMP publishing point and stream name live.DestinationURL = "rtmp://ws2.nanocosmos.de:80/live+myStream"; //run the encoder broadcast live.StartBroadcast();
See the example web page at our demo site for a full example including user interface elements.