Table of Contents

Struct StartBroadcastRequest

Namespace
Vonage.Video.Broadcast.StartBroadcast
Assembly
Vonage.dll

Represents a request to start a broadcast.

[Builder(new string[] { "Vonage.Server" })]
public readonly struct StartBroadcastRequest : IVonageRequest, IHasApplicationId, IHasSessionId
Implements
Inherited Members

Properties

ApplicationId

Vonage Application UUID.

[JsonIgnore]
[Mandatory(0)]
public Guid ApplicationId { get; }

Property Value

Guid

Layout

Sets the initial layout type for the broadcast. If you do not specify an initial layout type, the broadcast stream uses the Best Fit layout type.

[JsonPropertyOrder(1)]
[Mandatory(2)]
public Layout Layout { get; }

Property Value

Layout

Examples

.WithLayout(new Layout(null, null, LayoutType.BestFit))

MaxBitrate

Sets the maximum video bitrate for the broadcast, in bits per second.

[JsonPropertyOrder(3)]
[OptionalWithDefault("int", "1000")]
public int MaxBitrate { get; }

Property Value

int

Examples

.WithMaxBitrate(2000000)

MaxDuration

Sets the maximum duration for the broadcast, in seconds. The broadcast will automatically stop when the maximum duration is reached. Valid range: 60 (1 minute) to 36000 (10 hours). Default is 14,400 (4 hours).

[JsonPropertyOrder(2)]
[OptionalWithDefault("int", "14400")]
public int MaxDuration { get; }

Property Value

int

Examples

.WithMaxDuration(7200)

MultiBroadcastTag

Sets a unique tag to support multiple broadcasts for the same session simultaneously.

[JsonPropertyOrder(7)]
[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<string> MultiBroadcastTag { get; }

Property Value

Maybe<string>

Examples

.WithMultiBroadcastTag("my-broadcast-tag")

Outputs

Sets the broadcast output configuration (HLS and/or RTMP). You can include up to five RTMP streams. Vonage Video live streaming supports RTMP and RTMPS.

[JsonPropertyOrder(4)]
[Mandatory(3)]
public StartBroadcastRequest.BroadcastOutput Outputs { get; }

Property Value

StartBroadcastRequest.BroadcastOutput

Examples

.WithOutputs(new StartBroadcastRequest.BroadcastOutput { Streams = new[] { new StartBroadcastRequest.BroadcastOutput.Stream(id, serverUrl, streamName) } })

Resolution

Sets the resolution of the broadcast output.

[JsonPropertyOrder(5)]
[OptionalWithDefault("RenderResolution", "RenderResolution.StandardDefinitionLandscape")]
public RenderResolution Resolution { get; }

Property Value

RenderResolution

Examples

.WithResolution(RenderResolution.HighDefinitionLandscape)

SessionId

The session Id.

[JsonPropertyOrder(0)]
[Mandatory(1)]
public string SessionId { get; }

Property Value

string

StreamMode

Sets whether streams included in the broadcast are selected automatically (auto, the default) or manually (manual).

[JsonPropertyOrder(6)]
[OptionalWithDefault("StreamMode", "StreamMode.Auto")]
public StreamMode StreamMode { get; }

Property Value

StreamMode

Examples

.WithStreamMode(StreamMode.Manual)

Methods

Build()

public static IBuilderForApplicationId Build()

Returns

IBuilderForApplicationId

BuildRequestMessage()

Converts the request to a HttpRequest.

public HttpRequestMessage BuildRequestMessage()

Returns

HttpRequestMessage

The Http request.