@@ -16,7 +16,8 @@ var PHONE = window.PHONE = function(config) {
1616 var myconnection = false ;
1717 var mediaconf = config . media || { audio : true , video : true } ;
1818 var conversations = { } ;
19- var oneway = config . oneway || false ;
19+ var oneway = config . oneway || false
20+ var broadcast = config . broadcast || false ;
2021
2122 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2223 // RTC Peer Connection Session (one per call)
@@ -190,8 +191,7 @@ var PHONE = window.PHONE = function(config) {
190191
191192 // Add Local Media Streams Audio Video Mic Camera
192193 // If answering and oneway streaming, do not attach stream
193- if ( ! isAnswer || ! oneway )
194- talk . pc . addStream ( mystream ) ; // Add null here on the receiving end of streaming to go one-way.
194+ if ( ! isAnswer || ! oneway ) talk . pc . addStream ( mystream ) ; // Add null here on the receiving end of streaming to go one-way.
195195
196196 // Notify of Call Status
197197 update_conversation ( talk , 'connecting' ) ;
@@ -415,7 +415,7 @@ var PHONE = window.PHONE = function(config) {
415415 // Prepare Local Media Camera and Mic
416416 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
417417 function getusermedia ( ) { //Do something if not requesting any media?
418- if ( oneway ) {
418+ if ( oneway && ! broadcast ) {
419419 if ( ! PeerConnection ) { return unablecb ( ) ; }
420420 onready ( ) ;
421421 subscribe ( ) ;
0 commit comments