├── .gitattributes
├── .github
└── workflows
│ ├── build.yml
│ ├── metrics.yml
│ └── release.yml
├── .gitignore
├── BlazorHelloWorld
├── BlazorHelloWorld.csproj
├── Components
│ ├── App.razor
│ ├── Layout
│ │ ├── MainLayout.razor
│ │ ├── MainLayout.razor.css
│ │ ├── NavMenu.razor
│ │ └── NavMenu.razor.css
│ ├── Pages
│ │ └── Home.razor
│ ├── Routes.razor
│ └── _Imports.razor
├── Infrastructure
│ └── VideoService.cs
├── Program.cs
├── Properties
│ └── launchSettings.json
├── appsettings.Development.json
├── appsettings.json
└── wwwroot
│ ├── app.css
│ ├── bootstrap
│ ├── bootstrap.min.css
│ └── bootstrap.min.css.map
│ ├── content
│ └── customScripts.js
│ └── favicon.png
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DEVELOPING.md
├── LICENSE
├── OpenTok.sln
├── OpenTok
├── Archive.cs
├── ArchiveLayout.cs
├── ArchiveList.cs
├── AudioConnector.cs
├── AudioConnectorStartRequest.cs
├── Broadcast.cs
├── BroadcastBitrate.cs
├── BroadcastLayout.cs
├── Caption.cs
├── CaptionOptions.cs
├── Constants
│ └── OpenTokVersion.cs
├── DialAuth.cs
├── DialOptions.cs
├── Exception
│ ├── OpenTokArgumentException.cs
│ ├── OpenTokException.cs
│ └── OpenTokWebException.cs
├── LayoutType.cs
├── OpenTok.AudioConnector.cs
├── OpenTok.Captions.cs
├── OpenTok.Render.cs
├── OpenTok.cs
├── OpenTok.csproj
├── Render
│ ├── ListRendersRequest.cs
│ ├── ListRendersResponse.cs
│ ├── RenderItem.cs
│ ├── RenderResolution.cs
│ ├── RenderResolutionConverter.cs
│ └── StartRenderRequest.cs
├── Role.cs
├── Rtmp.cs
├── ScreenShareLayoutType.cs
├── Session.cs
├── SignalProperties.cs
├── Sip.cs
├── Stream.cs
├── StreamList.cs
├── StreamMode.cs
├── StreamProperties.cs
├── Util
│ ├── HttpClient.cs
│ ├── OpenTokUtils.cs
│ └── TokenGenerator.cs
└── app.config
├── OpenTokTest
├── ArchiveTests.cs
├── AudioConnectorStartRequestDataBuilder.cs
├── AudioConnectorStartRequestTests.cs
├── BroadcastBitrateTest.cs
├── BroadcastTests.cs
├── CaptionOptionsTest.cs
├── Data
│ ├── ArchiveTests
│ │ ├── GetArchive-response.json
│ │ ├── GetArchiveAsync-response.json
│ │ ├── GetArchiveWithUnknownProperties-response.json
│ │ ├── GetArchiveWithUnknownPropertiesAsync-response.json
│ │ ├── GetExpiredArchive-response.json
│ │ ├── GetExpiredArchiveAsync-response.json
│ │ ├── ListArchives-response.json
│ │ ├── ListArchivesAsync-response.json
│ │ ├── ListArchivesAsyncWithValidSessionId-response.json
│ │ ├── ListArchivesWithValidSessionId-response.json
│ │ ├── StartArchive-response.json
│ │ ├── StartArchiveAsync-response.json
│ │ ├── StartArchiveAsyncAutoStreamMode-response.json
│ │ ├── StartArchiveAsyncCreateInvalidIndividualModeArchivingWithResolution-response.json
│ │ ├── StartArchiveAsyncCustomLayout-response.json
│ │ ├── StartArchiveAsyncCustomLayoutMissingStylesheet-response.json
│ │ ├── StartArchiveAsyncIndividual-response.json
│ │ ├── StartArchiveAsyncManualStreamMode-response.json
│ │ ├── StartArchiveAsyncNoResolution-response.json
│ │ ├── StartArchiveAsyncVerticalLayout-response.json
│ │ ├── StartArchiveAsyncVerticalLayoutWithStyleSheet-response.json
│ │ ├── StartArchiveAsyncVoiceOnly-response.json
│ │ ├── StartArchiveAsyncWithHDResolution-response.json
│ │ ├── StartArchiveAsyncWithSDResolution-response.json
│ │ ├── StartArchiveAutoStreamMode-response.json
│ │ ├── StartArchiveCreateInvalidIndividualModeArchivingWithResolution-response.json
│ │ ├── StartArchiveCustomLayout-response.json
│ │ ├── StartArchiveCustomLayoutMissingStylesheet-response.json
│ │ ├── StartArchiveIndividual-response.json
│ │ ├── StartArchiveManualStreamMode-response.json
│ │ ├── StartArchiveNoResolution-response.json
│ │ ├── StartArchiveVerticalLayout-response.json
│ │ ├── StartArchiveVerticalLayoutWithStyleSheet-response.json
│ │ ├── StartArchiveVoiceOnly-response.json
│ │ ├── StartArchiveWithHDResolution-response.json
│ │ ├── StartArchiveWithMultiArchiveTag-response.json
│ │ ├── StartArchiveWithMultiArchiveTagAsync-response.json
│ │ ├── StartArchiveWithSDResolution-response.json
│ │ ├── StopArchive-response.json
│ │ ├── StopArchiveAsync-response.json
│ │ ├── StopArchiveAsyncFromArchiveObject-response.json
│ │ └── StopArchiveFromArchiveObject-response.json
│ ├── BroadcastTests
│ │ ├── GetBroadcast-response.json
│ │ ├── GetBroadcastAsync-response.json
│ │ ├── StartBroadcast-response.json
│ │ ├── StartBroadcastAsync-response.json
│ │ ├── StartBroadcastOnlyWithRTMP-response.json
│ │ ├── StartBroadcastOnlyWithRTMPAsync-response.json
│ │ ├── StartBroadcastWithAutoStreamMode-response.json
│ │ ├── StartBroadcastWithAutoStreamModeAsync-response.json
│ │ ├── StartBroadcastWithDvr-response.json
│ │ ├── StartBroadcastWithDvrAsync-response.json
│ │ ├── StartBroadcastWithHDResolution-response.json
│ │ ├── StartBroadcastWithHDResolutionAsync-response.json
│ │ ├── StartBroadcastWithLowLatency-response.json
│ │ ├── StartBroadcastWithLowLatencyAsync-response.json
│ │ ├── StartBroadcastWithManualStreamMode-response.json
│ │ ├── StartBroadcastWithManualStreamModeAsync-response.json
│ │ ├── StartBroadcastWithMultiBroadcastTag-response.json
│ │ ├── StartBroadcastWithRTMPandHLS-response.json
│ │ ├── StartBroadcastWithRTMPandHLSAsync-response.json
│ │ ├── StartBroadcastWithSDResolution-response.json
│ │ ├── StartBroadcastWithSDResolutionAsync-response.json
│ │ ├── StartBroadcastWithScreenShareType-response.json
│ │ ├── StartBroadcastWithScreenShareTypeAsync-response.json
│ │ ├── StopBroadcast-response.json
│ │ └── StopBroadcastAsync-response.json
│ ├── DialTests
│ │ ├── DialAsyncCorrectHeaders-response.json
│ │ ├── DialAsyncCorrectResponse-response.json
│ │ ├── DialCorrectData-response.json
│ │ ├── DialCorrectHeaders-response.json
│ │ └── DialCorrectResponse-response.json
│ └── StreamTests
│ │ ├── GetStream-response.json
│ │ ├── GetStreamAsync-response.json
│ │ ├── GetStreamAsyncEmpty-response.json
│ │ ├── GetStreamEmpty-response.json
│ │ ├── ListStreams-response.json
│ │ └── ListStreamsAsync-response.json
├── DialTests.cs
├── DisableForceMuteTests.cs
├── ForceDisconnect.cs
├── ForceMuteAllTests.cs
├── ForceMuteStreamTests.cs
├── OpenTok.AudioConnectorTests.cs
├── OpenTok.CaptionsTests.cs
├── OpenTok.RenderTests.cs
├── OpenTokTest.csproj
├── OpenTokTests.cs
├── PlayDtmfTests.cs
├── Render
│ ├── ListRendersRequestTests.cs
│ ├── StartRenderRequestDataBuilder.cs
│ └── StartRenderRequestTest.cs
├── Session.cs
├── SignalTests.cs
├── StreamTests.cs
├── TestBase.cs
├── TokenTests.cs
└── app.config
├── README.md
└── Samples
├── Archiving
├── App.config
├── App.config.sample
├── Archiving.csproj
├── Bootstrapper.cs
├── Content
│ ├── css
│ │ └── sample.css
│ ├── img
│ │ ├── archiving-off.png
│ │ ├── archiving-on-idle.png
│ │ └── archiving-on-message.png
│ └── js
│ │ ├── host.js
│ │ └── participant.js
├── MainModule.cs
├── OpenTokService.cs
├── Program.cs
├── README.md
├── Startup.cs
└── views
│ ├── History.cshtml
│ ├── Host.cshtml
│ ├── Index.cshtml
│ ├── Participant.cshtml
│ ├── Shared
│ └── Layout.cshtml
│ ├── _ViewStart.cshtml
│ └── history.sshtml
├── Broadcasting
├── App.config
├── App.config.sample
├── Bootstrapper.cs
├── Broadcasting.csproj
├── Content
│ ├── css
│ │ └── sample.css
│ └── js
│ │ ├── host.js
│ │ └── participant.js
├── MainModule.cs
├── OpenTokService.cs
├── Program.cs
├── README.md
├── Startup.cs
└── views
│ ├── Host.cshtml
│ ├── Index.cshtml
│ ├── Participant.cshtml
│ ├── Shared
│ └── Layout.cshtml
│ └── _ViewStart.cshtml
└── HelloWorld
├── App.config
├── App.config.sample
├── Bootstrapper.cs
├── Content
└── js
│ └── helloworld.js
├── HelloWorld.csproj
├── MainModule.cs
├── OpenTokService.cs
├── Program.cs
├── README.md
├── Startup.cs
└── views
└── index.html
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # These files are text and should be normalized (convert crlf => lf)
5 | *.cs text diff=csharp
6 | *.xaml text
7 | *.csproj text
8 | *.sln text
9 | *.tt text
10 | *.ps1 text
11 | *.cmd text
12 | *.msbuild text
13 | *.md text
14 |
15 | # Images should be treated as binary
16 | # (binary is a macro for -text -diff)
17 | *.png binary
18 | *.jpeg binary
19 | *.sdf binary
20 |
21 | # Custom for Visual Studio
22 | *.cs diff=csharp
23 | *.sln merge=union
24 | *.csproj merge=union
25 | *.vbproj merge=union
26 | *.fsproj merge=union
27 | *.dbproj merge=union
28 |
29 | # Standard to msysgit
30 | *.doc diff=astextplain
31 | *.DOC diff=astextplain
32 | *.docx diff=astextplain
33 | *.DOCX diff=astextplain
34 | *.dot diff=astextplain
35 | *.DOT diff=astextplain
36 | *.pdf diff=astextplain
37 | *.PDF diff=astextplain
38 | *.rtf diff=astextplain
39 | *.RTF diff=astextplain
40 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: "Build & Test"
2 |
3 | on:
4 | push:
5 | branches: [ main, dev ]
6 | pull_request:
7 | branches: [ main, dev ]
8 |
9 | env:
10 | CONFIGURATION: "Release"
11 |
12 | jobs:
13 | build:
14 | env:
15 | DOTNET_NOLOGO: true
16 | runs-on: windows-latest
17 |
18 | steps:
19 | - uses: actions/checkout@v2
20 | - name: Setup .NET Core
21 | uses: actions/setup-dotnet@v1
22 | with:
23 | dotnet-version: 8.0.x
24 | - name: Clean
25 | run: dotnet clean OpenTok.sln --configuration ${{ env.CONFIGURATION }} && dotnet nuget locals all --clear
26 | - name: Install dependencies
27 | run: dotnet restore
28 | - name: Build
29 | run: dotnet build OpenTok.sln --configuration ${{ env.CONFIGURATION }} --no-restore
30 | - name: Test
31 | run: dotnet test OpenTokTest/OpenTokTest.csproj --configuration ${{ env.CONFIGURATION }} --no-build
--------------------------------------------------------------------------------
/.github/workflows/metrics.yml:
--------------------------------------------------------------------------------
1 | name: Aggregit
2 |
3 | on:
4 | schedule:
5 | - cron: "0 0 * * *"
6 |
7 | jobs:
8 | recordMetrics:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: michaeljolley/aggregit@v1
12 | with:
13 | githubToken: ${{ secrets.GITHUB_TOKEN }}
14 | project_id: ${{ secrets.project_id }}
15 | private_key: ${{ secrets.private_key }}
16 | client_email: ${{ secrets.client_email }}
17 | firebaseDbUrl: ${{ secrets.firebaseDbUrl }}
18 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Nuget Release
2 | on:
3 | release:
4 | types: [published]
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v2
10 | with:
11 | ref: ${{ github.event.release.target_commitish }}
12 | - name: Release Nuget
13 | uses: nexmo/github-actions/nuget-release@main
14 | env:
15 | PROJECT_FILE : OpenTok/OpenTok.csproj
16 | BRANCH: main
17 | ORGANIZATION: opentok
18 | REPO: Opentok-.NET-SDK
19 | TAG: ${{ github.event.release.tag_name }}
20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 | NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
22 | GITHUB_USER_NAME: NexmoDev
23 | GITHUB_EMAIL: 44278943+NexmoDev@users.noreply.github.com
24 | OUTPUT_PATH: OpenTok/bin/Release
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 | .vs
32 |
33 | #################
34 | ## Visual Studio
35 | #################
36 |
37 | ## Ignore Visual Studio temporary files, build results, and
38 | ## files generated by popular Visual Studio add-ons.
39 |
40 | # User-specific files
41 | *.suo
42 | *.user
43 | *.sln.docstates
44 | *.vs
45 |
46 | # Build results
47 |
48 | [Dd]ebug/
49 | [Rr]elease/
50 | x64/
51 | build/
52 | [Bb]in/
53 | [Oo]bj/
54 |
55 | # MSTest test Results
56 | [Tt]est[Rr]esult*/
57 | [Bb]uild[Ll]og.*
58 |
59 | *_i.c
60 | *_p.c
61 | *.ilk
62 | *.meta
63 | *.obj
64 | *.pch
65 | *.pdb
66 | *.pgc
67 | *.pgd
68 | *.rsp
69 | *.sbr
70 | *.tlb
71 | *.tli
72 | *.tlh
73 | *.tmp
74 | *.tmp_proj
75 | *.log
76 | *.vspscc
77 | *.vssscc
78 | .builds
79 | *.pidb
80 | *.log
81 | *.scc
82 |
83 | # Visual C++ cache files
84 | ipch/
85 | *.aps
86 | *.ncb
87 | *.opensdf
88 | *.sdf
89 | *.cachefile
90 |
91 | # Visual Studio profiler
92 | *.psess
93 | *.vsp
94 | *.vspx
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 |
103 | # TeamCity is a build add-in
104 | _TeamCity*
105 |
106 | # DotCover is a Code Coverage Tool
107 | *.dotCover
108 |
109 | # NCrunch
110 | *.ncrunch*
111 | .*crunch*.local.xml
112 |
113 | # Installshield output folder
114 | [Ee]xpress/
115 |
116 | # DocProject is a documentation generator add-in
117 | DocProject/buildhelp/
118 | DocProject/Help/*.HxT
119 | DocProject/Help/*.HxC
120 | DocProject/Help/*.hhc
121 | DocProject/Help/*.hhk
122 | DocProject/Help/*.hhp
123 | DocProject/Help/Html2
124 | DocProject/Help/html
125 |
126 | # Click-Once directory
127 | publish/
128 |
129 | # Publish Web Output
130 | *.Publish.xml
131 | *.pubxml
132 |
133 | # NuGet Packages Directory
134 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
135 | packages/
136 |
137 | # Windows Azure Build Output
138 | csx
139 | *.build.csdef
140 |
141 | # Windows Store app package directory
142 | AppPackages/
143 |
144 | # Others
145 | sql/
146 | *.Cache
147 | ClientBin/
148 | [Ss]tyle[Cc]op.*
149 | ~$*
150 | *~
151 | *.dbmdl
152 | *.[Pp]ublish.xml
153 | *.pfx
154 | *.publishsettings
155 |
156 | # RIA/Silverlight projects
157 | Generated_Code/
158 |
159 | # Backup & report files from converting an old project file to a newer
160 | # Visual Studio version. Backup files are not needed, because we have git ;-)
161 | _UpgradeReport_Files/
162 | Backup*/
163 | UpgradeLog*.XML
164 | UpgradeLog*.htm
165 |
166 | # SQL Server files
167 | App_Data/*.mdf
168 | App_Data/*.ldf
169 |
170 | #############
171 | ## Windows detritus
172 | #############
173 |
174 | # Windows image file caches
175 | Thumbs.db
176 | ehthumbs.db
177 |
178 | # Folder config file
179 | Desktop.ini
180 |
181 | # Recycle Bin used on file shares
182 | $RECYCLE.BIN/
183 |
184 | # Mac crap
185 | .DS_Store
186 |
187 |
188 | #############
189 | ## Python
190 | #############
191 |
192 | *.py[co]
193 |
194 | # Packages
195 | *.egg
196 | *.egg-info
197 | dist/
198 | build/
199 | eggs/
200 | parts/
201 | var/
202 | sdist/
203 | develop-eggs/
204 | .installed.cfg
205 |
206 | # Installer logs
207 | pip-log.txt
208 |
209 | # Unit test / coverage reports
210 | .coverage
211 | .tox
212 |
213 | #Translations
214 | *.mo
215 |
216 | #Mr Developer
217 | .mr.developer.cfg
218 |
219 | ## Samples
220 | #Samples/HelloWorld/App.config
221 | #Samples/Archiving/App.config
222 |
223 | ## Jetbrains Rider files
224 | .idea/
--------------------------------------------------------------------------------
/BlazorHelloWorld/BlazorHelloWorld.csproj:
--------------------------------------------------------------------------------
1 |
This part contains all other streams from your session.
23 |16 | | Created | 17 |Duration | 18 |Status | 19 ||
---|---|---|---|---|
27 | @if ((archive.Status == OpenTokSDK.ArchiveStatus.AVAILABLE) && (archive.Url.Length > 0)) 28 | { 29 | @: 30 | } 31 | @if(!String.IsNullOrEmpty(archive.Name)) 32 | { 33 | @archive.Name 34 | } else 35 | { 36 | @: Untitled 37 | } 38 | @if ((archive.Status == OpenTokSDK.ArchiveStatus.AVAILABLE) && (archive.Url.Length > 0)) 39 | { 40 | @: 41 | } 42 | | 43 |44 | @{ 45 | var epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); 46 | @epoch.AddMilliseconds(archive.CreatedAt).ToString() 47 | } 48 | | 49 |@archive.Duration seconds | 50 |@archive.Status | 51 |52 | @if (archive.Status == OpenTokSDK.ArchiveStatus.AVAILABLE) 53 | { 54 | Delete 55 | } else { 56 | @: 57 | } 58 | | 59 |
68 | There are no archives currently. Try making one in the host view. 69 |
70 | } 71 |50 | Click Start archiving to begin archiving this session. 51 | All publishers in the session will be included, and all publishers that 52 | join the session will be included as well. 53 |
54 |55 | Click Stop archiving to end archiving this session. 56 | You can then go to past archives to 57 | view your archive (once its status changes to available). 58 |
59 |When | 63 |You will see | 64 |
---|---|
Archiving is started | 69 |![]() |
70 |
Archiving remains on | 73 |![]() |
74 |
Archiving is stopped | 77 |![]() |
78 |
14 | Everyone who joins either the Host View or Participant View 15 | joins a single OpenTok session. Anyone with the Host View 16 | open can click Start Archive or Stop Archive to control 17 | recording of the entire session. 18 |
19 |33 | Click through to Past Archives to see examples of using the 34 | Archiving REST API to list archives showing status (started, 35 | stopped, available) and playback (for available archives). 36 |
37 |When | 26 |You will see | 27 |
---|---|
Archiving is started | 32 |![]() |
33 |
Archiving remains on | 36 |![]() |
37 |
Archiving is stopped | 40 |![]() |
41 |
18 | | Created | 19 |Duration | 20 |Status | 21 ||
---|---|---|---|---|
28 | <% if (item.status == "available") && item.url && (item.url.length > 0) %> 29 | 30 | <% end %> 31 | <%= item.name || "Untitled" %> 32 | <% if (item.status == "available") && item.url && (item.url.length > 0) %> 33 | 34 | <% end %> 35 | | 36 |<%= Time.at(item.created_at/1000).strftime("%B %e, %Y at %I:%M %p") %> | 37 |<%= item.duration %> seconds | 38 |<%= item.status %> | 39 |40 | <% if item.status == "available" %> 41 | Delete 42 | <% else %> 43 | 44 | <% end %> 45 | | 46 |
53 | There are no archives currently. Try making one in the host view. 54 |
55 | <% end %> 56 |9 | Everyone who joins either the Host View or Participant View joins a single OpenTok session. 10 | The Host can click Start Broadcast and Stop Broadcast to control the live streaming broadcast 11 | of the entire session. 12 |
13 |