@@ -421,6 +421,8 @@ The live streaming broadcast can target one HLS endpoint and up to five RTMP ser
421
421
' stylesheet' : ' the layout stylesheet (only used with type == custom)'
422
422
},
423
423
' maxDuration' : 5400 ,
424
+ ' hasAudio' : True
425
+ ' hasVideo' : True
424
426
' outputs' : {
425
427
' hls' : {},
426
428
' rtmp' : [{
@@ -477,6 +479,37 @@ You can specify the following broadcast resolutions:
477
479
To enable multiple simultaneous broadcasts on the same session, specify a unique value for the
478
480
``multiBroadcastTag `` parameter in ``options `` when calling the ``opentok.start_broadcast `` method.
479
481
482
+ You can broadcast only audio, or only video, for a stream by setting ``hasAudio `` or ``hasVideo ``
483
+ to ``False `` as required. These fields are ``True `` by default.
484
+
485
+ .. code :: python
486
+
487
+ session_id = ' SESSIONID'
488
+ options = {
489
+ ' layout' : {
490
+ ' type' : ' custom' ,
491
+ ' stylesheet' : ' the layout stylesheet (only used with type == custom)'
492
+ },
493
+ ' maxDuration' : 5400 ,
494
+ ' hasAudio' : True
495
+ ' hasVideo' : False
496
+ ' outputs' : {
497
+ ' hls' : {},
498
+ ' rtmp' : [{
499
+ ' id' : ' foo' ,
500
+ ' serverUrl' : ' rtmp://myfooserver/myfooapp' ,
501
+ ' streamName' : ' myfoostream'
502
+ }, {
503
+ ' id' : ' bar' ,
504
+ ' serverUrl' : ' rtmp://mybarserver/mybarapp' ,
505
+ ' streamName' : ' mybarstream'
506
+ }]
507
+ },
508
+ ' resolution' : ' 640x480'
509
+ }
510
+
511
+ broadcast = opentok.start_broadcast(session_id, options)
512
+
480
513
You can stop a started Broadcast using the ``opentok.stop_broadcast(broadcast_id) `` method.
481
514
482
515
.. code :: python
@@ -640,6 +673,15 @@ to all clients connected to session or to a specific connection:
640
673
# To a specific connection
641
674
opentok.play_dtmf(session_id, connection_id, digits)
642
675
676
+ Appending to the User Agent
677
+ -------
678
+
679
+ You can append a string to the user agent that is sent with requests:
680
+
681
+ .. code :: python
682
+
683
+ opentok.append_to_user_agent(' my-appended-string' )
684
+
643
685
Samples
644
686
-------
645
687
0 commit comments