src/OpenTok/OpenTok.php
public function startBroadcast($sessionId, $options=array())
    {
        // unpack optional arguments (merging with default values) into named variables
        // NOTE: although the server can be authoritative about the default value of layout, its
        // not preferred to depend on that in the SDK because its then harder to garauntee backwards
        // compatibility
        $defaults = array(
            'layout' => Layout::getBestFit()
        );
        $options = array_merge($defaults, $options);
        list($layout) = array_values($options);

        // validate arguments
        Validators::validateSessionId($sessionId);
        Validators::validateLayout($layout);

        // make API call
        $broadcastData = $this->client->startBroadcast($sessionId, $options);

        return new Broadcast($broadcastData, array( 'client' => $this->client ));
    }
public function startBroadcast($sessionId, $options=array())
    {
        // unpack optional arguments (merging with default values) into named variables
        // NOTE: although the server can be authoritative about the default value of layout, its
        // not preferred to depend on that in the SDK because its then harder to garauntee backwards
        // compatibility
        $defaults = array(
            'layout' => Layout::getBestFit()
        );
        $options = array_merge($defaults, $options);
        list($layout) = array_values($options);

        // validate arguments
        Validators::validateSessionId($sessionId);
        Validators::validateLayout($layout);

        // make API call
        $broadcastData = $this->client->startBroadcast($sessionId, $options);

        return new Broadcast($broadcastData, array( 'client' => $this->client ));
    }
public function startBroadcast ( $ sessionId , $ options = array ( ) ) { // unpack optional arguments (merging with default values) into named variables // NOTE: although the server can be authoritative about the default value of layout, its // not preferred to depend on that in the SDK because its then harder to garauntee backwards // compatibility $ defaults = array ( 'layout' => Layout :: getBestFit ( ) ) ; $ options = array_merge ( $ defaults , $ options ) ; list ( $ layout ) = array_values ( $ options ) ; // validate arguments Validators :: validateSessionId ( $ sessionId ) ; Validators :: validateLayout ( $ layout ) ; // make API call $ broadcastData = $ this -> client -> startBroadcast ( $ sessionId , $ options ) ; return new Broadcast ( $ broadcastData , array ( 'client' => $ this -> client ) ) ; }
Starts a live streaming broadcast of an OpenTok session.

@param String $sessionId The session ID of the session to be broadcast.

@param Array $options (Optional) An array with options for the broadcast. This array has
the following properties:
<ul>
<li><code>layout</code> (Layout) &mdash; (Optional) An object defining the initial
layout type of the broadcast. If you do not specify an initial layout type,
the broadcast stream uses the Best Fit layout type. For more information, see
<a href="https://tokbox.com/developer/guides/broadcast/live-streaming/#configuring-live-streaming-video-layout">Configuring
Video Layout for the OpenTok live streaming feature</a>.
</li>
</ul>

@return Broadcast An object with properties defining the broadcast.
Starts a live streaming broadcast of an OpenTok session .