Skip to content

Commit 6d0fc2f

Browse files
committed
Updating repo to use repo-standards
1 parent a825731 commit 6d0fc2f

File tree

2 files changed

+178
-38
lines changed

2 files changed

+178
-38
lines changed

CODE_OF_CONDUCT.md

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

README.md

+50-38
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
# OpenTok .NET SDK
22

3-
[![Build status](https://ci.appveyor.com/api/projects/status/tw2d8ufd3tpwkf5b?svg=true)](https://ci.appveyor.com/project/aoberoi/opentok-net-sdk) [![Build Status](https://travis-ci.org/opentok/Opentok-.NET-SDK.svg)](https://travis-ci.org/opentok/Opentok-.NET-SDK)
3+
![https://assets.tokbox.com/img/vonage/Vonage_VideoAPI_black.svg](https://assets.tokbox.com/img/vonage/Vonage_VideoAPI_black.svg)
44

5+
[![Build status](https://ci.appveyor.com/api/projects/status/tw2d8ufd3tpwkf5b?svg=true)](https://ci.appveyor.com/project/aoberoi/opentok-net-sdk) [![Build Status](https://travis-ci.org/opentok/Opentok-.NET-SDK.svg)](https://travis-ci.org/opentok/Opentok-.NET-SDK)
56

67
The OpenTok .NET SDK lets you generate
78
[sessions](https://www.tokbox.com/opentok/tutorials/create-session/) and
89
[tokens](https://www.tokbox.com/opentok/tutorials/create-token/) for
910
[OpenTok](https://www.tokbox.com/) applications that run on the .NET platform. The SDK also includes
1011
support for working with [OpenTok archives](https://tokbox.com/opentok/tutorials/archiving).
1112

12-
# Installation
13+
## Installation
1314

14-
## NuGet (recommended):
15+
### NuGet (recommended):
1516

1617
Using the [Package Manager Console](http://docs.nuget.org/consume/package-manager-console):
1718

1819
```
1920
PM> Install-Package OpenTok
2021
```
2122

22-
## Manually:
23+
### Manually:
2324

2425
Download the latest release from the [Releases Page](https://github.com/opentok/Opentok-.NET-SDK/releases).
2526
Unzip the file and place the place the `OpenTok.dll`, dependent assemblies, and supporting files into your
2627
own project.
2728

28-
# Usage
29+
## Usage
2930

30-
## Initializing
31+
### Initializing
3132

3233
Import the `OpenTokSDK` namespace into any files that will be using OpenTok objects. Then initialize an
3334
`OpenTokSDK.OpenTok` object using your own API Key and API Secret.
@@ -42,19 +43,19 @@ string ApiSecret = "YOUR API SECRET";
4243
var OpenTok = new OpenTok(ApiKey, ApiSecret);
4344
```
4445

45-
## Creating Sessions
46+
### Creating Sessions
4647

4748
To create an OpenTok Session, call the `OpenTok` instance's
4849
`CreateSession(string location, MediaMode mediaMode, ArchiveMode archiveMode)`
4950
method. Each of the parameters are optional and can be omitted if not needed. They are:
5051

51-
* `string location` : An IPv4 address used as a location hint. (default: "")
52+
- `string location` : An IPv4 address used as a location hint. (default: "")
5253

53-
* `MediaMode mediaMode` : Specifies whether the session will use the OpenTok Media Router
54-
(MediaMode.ROUTED) or attempt to transmit streams directly between clients
55-
(MediaMode.RELAYED, the default)
54+
- `MediaMode mediaMode` : Specifies whether the session will use the OpenTok Media Router
55+
(MediaMode.ROUTED) or attempt to transmit streams directly between clients
56+
(MediaMode.RELAYED, the default)
5657

57-
* `ArchiveMode archiveMode` : Specifies whether the session will be automatically archived
58+
- `ArchiveMode archiveMode` : Specifies whether the session will be automatically archived
5859
(ArchiveMode.ALWAYS) or not (ArchiveMode.MANUAL, the default)
5960

6061
The return value is a `OpenTokSDK.Session` object. Its `Id` property is useful to get an identifier that can be saved to a
@@ -77,7 +78,7 @@ var session = OpenTok.CreateSession(mediaMode: MediaMode.ROUTED, ArchiveMode.ALW
7778
string sessionId = session.Id;
7879
```
7980

80-
## Generating Tokens
81+
### Generating Tokens
8182

8283
Once a Session is created, you can start generating Tokens for clients to use when connecting to it.
8384
You can generate a token either by calling an `OpenTokSDK.OpenTok` instance's
@@ -99,7 +100,7 @@ string token = session.GenerateToken(role: Role.MODERATOR, expireTime: inOneWeek
99100

100101
```
101102

102-
## Working with Archives
103+
### Working with Archives
103104

104105
You can start the recording of an OpenTok Session using a `OpenTokSDK.OpenTok` instance's
105106
`StartArchive(sessionId, name, hasVideo, hasAudio, outputMode, resolution)` method. This will return an
@@ -113,6 +114,7 @@ var archive = OpenTok.StartArchive(sessionId);
113114
// Store this archive ID in the database for later use
114115
Guid archiveId = archive.Id;
115116
```
117+
116118
You can add a name for the archive (to use for identification) by setting the `name` parameter of
117119
the `OpenTok.StartArchive()` method.
118120

@@ -172,7 +174,7 @@ Note that you can also create an automatically archived session, by passing in `
172174
as the `archiveMode` parameter when you call the `OpenTok.CreateSession()` method (see "Creating
173175
Sessions," above).
174176

175-
## Working with Streams
177+
### Working with Streams
176178

177179
You can get information about a stream by calling the `GetStream(sessionId, streamId)` method of the `OpenTok` class.
178180

@@ -188,29 +190,31 @@ stream.LayoutClassList; // list with the layout class list
188190

189191
You can get information about all the streams in a session by calling the `ListStreams(sessionId)` method of the `OpenTok` class.
190192

191-
192193
```csharp
193194
StreamList streamList = OpenTok.ListStreams(sessionId);
194195

195-
streamList.Count; // total count
196+
streamList.Count; // total count
196197
```
197198

198-
## Force Disconnecting
199+
### Force Disconnecting
199200

200201
Your application server can disconnect a client from an OpenTok session by calling the `ForceDisconnect(sessionId, connectionId)` method of the `OpenTok` class.
201202

202203
```csharp
203204
// Force disconnect a client connection
204205
OpenTok.ForceDisconnect(sessionId, connectionId);
205206
```
206-
## Sending Signals
207+
208+
### Sending Signals
209+
207210
Once a Session is created, you can send signals to everyone in the session or to a specific connection. You can send a signal by calling the `Signal(sessionId, signalProperties, connectionId)` method of the `OpenTok` class.
208211

209212
The `sessionId` parameter is the session ID of the session.
210213

211214
The `signalProperties` parameter is an instance of the `SignalProperties` class where you can set the `data` paramter and the `type` parameter.
212-
* `data` (string) -- The data string for the signal. You can send a maximum of 8kB.
213-
* `type` (string) -- (Optional) The type string for the signal. You can send a maximum of 128 charaacters, and only the following characters are allowed: A-Z, a-z, numbers (0-9), '-', '_', and '~'.
215+
216+
- `data` (string) -- The data string for the signal. You can send a maximum of 8kB.
217+
- `type` (string) -- (Optional) The type string for the signal. You can send a maximum of 128 charaacters, and only the following characters are allowed: A-Z, a-z, numbers (0-9), '-', '\_', and '~'.
214218

215219
The `connectionId` parameter is an optional string used to specify the connection ID of a client conencted to the session. If you specify this value, the signal is sent to the specified client. Otherwise, the signal is sent to all clients connected to the session.
216220

@@ -223,35 +227,37 @@ string connectionId = "CONNECTIONID";
223227
OpenTok.Signal(sessionId, signalProperties, connectionId);
224228
```
225229

226-
# Samples
230+
## Samples
227231

228232
There are two sample applications included with the SDK. To get going as fast as possible, clone the whole
229233
repository and follow the Walkthroughs:
230234

231-
* [HelloWorld](Samples/HelloWorld/README.md)
232-
* [Archiving](Samples/Archiving/README.md)
235+
- [HelloWorld](Samples/HelloWorld/README.md)
236+
- [Archiving](Samples/Archiving/README.md)
233237

234-
# Documentation
238+
## Documentation
235239

236240
Reference documentation is available at <https://tokbox.com/developer/sdks/dot-net/reference/>.
237241

238-
# Requirements
242+
## Requirements
239243

240244
You need an OpenTok API key and API secret, which you can obtain by logging into your
241245
[TokBox account](https://tokbox.com/account).
242246

243247
The OpenTok .NET SDK requires .NET Framework 4.5.2 or greater.
248+
244249
> NOTE: When using on 4.5.2 TLS 1.2 is not enabled by default. You should use something like the following to force the runtime onto at least TLS 1.2
250+
245251
```
246252
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
247253
```
248254

249-
# Release Notes
255+
## Release Notes
250256

251257
See the [Releases](https://github.com/opentok/opentok-.net-sdk/releases) page for details
252258
about each release.
253259

254-
## Important changes since v2.2.0
260+
### Important changes since v2.2.0
255261

256262
**Changes in v3.0.0:**
257263

@@ -272,11 +278,11 @@ This version of the SDK includes support for working with OpenTok archives.
272278
This version of the SDK includes a number of improvements in the API design. These include a number
273279
of API changes:
274280

275-
* New OpenTok class -- The name of the main class has changed from OpenTokSDK to OpenTok.
281+
- New OpenTok class -- The name of the main class has changed from OpenTokSDK to OpenTok.
276282
In the previous version, the constructor was `OpenTokSDK()`.
277283
In v2.2, it is `OpenTok(int apiKey, int apiSecret)`.
278284

279-
* CreateSession -- In the previous version, there were two methods to create a session:
285+
- CreateSession -- In the previous version, there were two methods to create a session:
280286
`OpenTokSDK.CreateSession(String location)` and
281287
`OpenTokSDK.CreateSession(String location, Dictionary<string, object> options)`.
282288
These methods returned a string (the session ID).
@@ -285,25 +291,31 @@ of API changes:
285291
`CreateSession(string location = "", MediaMode mediaMode = MediaMode.ROUTED)`.
286292
The `mediaMode` parameter replaces the `p2p.preference` setting in the
287293
previous version. The method returns a Session Object.
288-
289-
* GenerateToken -- In the previous version, there were two methods:
294+
295+
- GenerateToken -- In the previous version, there were two methods:
290296
`OpenTokSDK.GenerateToken(string sessionId)` and
291297
`OpenTokSDK.GenerateToken(string sessionId, Dictionary<string, object> options)`
292298
In v2.2, this is replaced with the following method:
293299
`OpenTokSDK.OpenTok.GenerateToken(string sessionId, Role role = Role.PUBLISHER, double expireTime = 0, string data = null)`.
294300
All parameters, except the `sessionId` parameter, are optional.
295-
301+
296302
Also, the Session class includes a method for generating tokens:
297303
`OpenTokSDK.Session.GenerateToken(Role role = Role.PUBLISHER, double expireTime = 0, string data = null)`.
298304

299-
# Development and Contributing
305+
## Development and Contributing
300306

301307
Interested in contributing? We :heart: pull requests! See the [Development](DEVELOPING.md) and
302308
[Contribution](CONTRIBUTING.md) guidelines.
303309

304-
# Support
310+
## Getting Help
311+
312+
We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:
313+
314+
- Open an issue on this repository
315+
- See <https://support.tokbox.com/> for support options
316+
- Tweet at us! We're [@VonageDev on Twitter](https://twitter.com/VonageDev)
317+
- Or [join the Vonage Developer Community Slack](https://developer.nexmo.com/community/slack)
305318

306-
See <https://support.tokbox.com/> for all our support options.
319+
## Further Reading
307320

308-
Find a bug? File it on the [Issues](https://github.com/opentok/opentok-.net-sdk/issues) page. Hint:
309-
test cases are really helpful!
321+
- Check out the Developer Documentation at <https://tokbox.com/developer/>

0 commit comments

Comments
 (0)