def create(session_id, options = {})
      raise ArgumentError, "session_id not provided" if session_id.to_s.empty?
      raise ArgumentError, "options cannot be empty" if options.empty?
      broadcast_json = @client.start_broadcast(session_id, options)
      Broadcast.new self, broadcast_json
    end
def create(session_id, options = {})
      raise ArgumentError, "session_id not provided" if session_id.to_s.empty?
      raise ArgumentError, "options cannot be empty" if options.empty?
      broadcast_json = @client.start_broadcast(session_id, options)
      Broadcast.new self, broadcast_json
    end
@private
 Starts a live streaming broadcast of an OpenTok session.

 Clients must be actively connected to the OpenTok session for you to successfully start
 a broadcast.

 This broadcasts the session to an HLS (HTTP live streaming) or to RTMP streams.

 @param [String] session_id The session ID of the OpenTok session to broadcast.

 @param [Hash] options A hash defining options for the broadcast.
 @option options [Hash] :layout Specify this to assign the initial layout  for the broadcast.
   Valid values for the layout (<code>:type</code>) property are "bestFit" (best fit), "custom" (custom),
   "horizontalPresentation" (horizontal presentation), "pip" (picture-in-picture), and
   "verticalPresentation" (vertical presentation)).
   If you specify a (<code>:custom</code>) layout type, set the (<code>:stylesheet</code>) property of the layout object
   to the stylesheet. (For other layout types, do not set a stylesheet property.)
   If you do not specify an initial layout type, the broadcast stream uses the Best Fit layout type.

 @option options [int] maxDuration
   The maximum duration for the broadcast, in seconds. The broadcast will automatically stop when
   the maximum duration is reached. You can set the maximum duration to a value from 60 (60 seconds) to 36000 (10 hours).
   The default maximum duration is 2 hours (7200 seconds).

 @option options [Hash] outputs
   This object defines the types of broadcast streams you want to start (both HLS and RTMP).
   You can include HLS, RTMP, or both as broadcast streams. If you include RTMP streaming,
   you can specify up to five target RTMP streams (or just one).
   The (<code>:hls</code>) property is set  to an empty [Hash] object. The HLS URL is returned in the response.
   The (<code>:rtmp</code>)  property is set  to an [Array] of Rtmp [Hash] properties.
   For each RTMP , specify (<code>:serverUrl</code>) for the RTMP server URL,
   (<code>:streamName</code>) such as the YouTube Live stream name or the Facebook stream key),
   and (optionally) (<code>:id</code>), a unique ID for the stream.

 @option options [string] resolution
   The resolution of the broadcast: either "640x480" (SD, the default) or "1280x720" (HD).

 @return [Broadcast] The broadcast object, which includes properties defining the broadcast,
   including the broadcast ID.

 @raise [OpenTokBroadcastError] The broadcast could not be started. The request was invalid or broadcast already started
 @raise [OpenTokAuthenticationError] Authentication failed while starting an archive.
   Invalid API key.
 @raise [OpenTokError] OpenTok server error.