Skip to content

Commit 43e0e02

Browse files
authored
SWI-7433 Add mode to StartStream Verb (#143)
1 parent 2d81d31 commit 43e0e02

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Bandwidth.Standard.Test/Unit/Model/Bxml/TestStartStream.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ public class TestStartStream
1111
[Fact]
1212
public void StartStreamTest()
1313
{
14-
var expected = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Response> <StartStream name=\"test\" tracks=\"inbound\" destination=\"wss://test.url/\" streamEventUrl=\"https://test.url/\" streamEventMethod=\"POST\" username=\"username\" password=\"password\"> <StreamParam name=\"testName\" value=\"testValue\" /> </StartStream></Response>";
14+
var expected = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Response> <StartStream name=\"test\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"wss://test.url/\" streamEventUrl=\"https://test.url/\" streamEventMethod=\"POST\" username=\"username\" password=\"password\"> <StreamParam name=\"testName\" value=\"testValue\" /> </StartStream></Response>";
1515

1616
var streamParam = new StreamParam();
1717
streamParam.Name = "testName";
1818
streamParam.Value = "testValue";
1919

2020
var startStream = new StartStream();
2121
startStream.Name = "test";
22+
startStream.Mode = "unidirectional";
2223
startStream.Tracks = "inbound";
2324
startStream.Destination = "wss://test.url/";
2425
startStream.StreamEventUrl = "https://test.url/";

src/Bandwidth.Standard/Model/Bxml/Verbs/StartStream.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ public StartStream()
2424
[XmlAttribute("name")]
2525
public string Name { get; set; }
2626

27+
/// <summary>
28+
/// The mode to use for the stream. unidirectional or bidirectional. Default is unidirectional.
29+
/// </summary>
30+
[XmlAttribute("mode")]
31+
public string Mode { get; set; }
32+
2733
/// <summary>
2834
/// The part of the call to send a stream from.
2935
/// </summary>

0 commit comments

Comments
 (0)