Skip to content

Commit 91d71b7

Browse files
Merge pull request #251 from MichaelJolley/master
Updating repo to adhere to Vonage repo-standards
2 parents 103f60d + 0217036 commit 91d71b7

File tree

2 files changed

+157
-24
lines changed

2 files changed

+157
-24
lines changed

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
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

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# OpenTok PHP SDK
22

3-
[![Build Status](https://travis-ci.org/opentok/OpenTok-PHP-SDK.svg)](https://travis-ci.org/opentok/OpenTok-PHP-SDK)
3+
[![Build Status](https://travis-ci.org/opentok/OpenTok-PHP-SDK.svg)](https://travis-ci.org/opentok/OpenTok-PHP-SDK) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
4+
5+
<img src="https://assets.tokbox.com/img/vonage/Vonage_VideoAPI_black.svg" height="48px" alt="Tokbox is now known as Vonage" />
46

57
The OpenTok PHP SDK lets you generate [sessions](http://tokbox.com/developer/guides/create-session/) and
68
[tokens](http://tokbox.com/developer/guides/create-token/) for [OpenTok](http://www.tokbox.com/)
79
applications, and [archive](http://tokbox.com/developer/guides/archiving/) sessions.
8-
It also includes methods for working with OpenTok
10+
It also includes methods for working with OpenTok
911
[archives](http://tokbox.com/developer/guides/archiving), working with OpenTok
1012
[SIP interconnect](http://tokbox.com/developer/guides/sip), and
1113
[disconnecting clients from sessions](http://tokbox.com/developer/guides/moderation/rest/).
@@ -56,12 +58,12 @@ $opentok = new OpenTok($apiKey, $apiSecret);
5658
To create an OpenTok Session, use the `createSession($options)` method of the
5759
`OpenTok\OpenTok` class. The `$options` parameter is an optional array used to specify the following:
5860

59-
* Setting whether the session will use the OpenTok Media Router or attempt to send streams directly
61+
- Setting whether the session will use the OpenTok Media Router or attempt to send streams directly
6062
between clients.
6163

62-
* Setting whether the session will automatically create archives (implies use of routed session)
64+
- Setting whether the session will automatically create archives (implies use of routed session)
6365

64-
* Specifying a location hint.
66+
- Specifying a location hint.
6567

6668
The `getSessionId()` method of the `OpenTok\Session` instance returns the session ID,
6769
which you use to identify the session in the OpenTok client libraries.
@@ -97,7 +99,7 @@ Once a Session is created, you can start generating Tokens for clients to use wh
9799
You can generate a token either by calling the `generateToken($sessionId, $options)` method of the
98100
`OpenTok\OpenTok` class, or by calling the `generateToken($options)` method on the `OpenTok\Session`
99101
instance after creating it. The `$options` parameter is an optional array used to set the role,
100-
expire time, and connection data of the Token. For layout control in archives and broadcasts,
102+
expire time, and connection data of the Token. For layout control in archives and broadcasts,
101103
the initial layout class list of streams published from connections using this token can be set as well.
102104

103105
```php
@@ -302,8 +304,9 @@ use OpenTok\OpenTok;
302304
$layout Layout::getPIP(); // Or use another get method of the Layout class.
303305
$opentok->updateBroadcastLayout($broadcastId, $layout);
304306
```
307+
305308
You can use the `Layout` class to set the layout types:
306-
`Layout::getHorizontalPresentation()`, `Layout::getVerticalPresentation()`, `Layout::getPIP()`,
309+
`Layout::getHorizontalPresentation()`, `Layout::getVerticalPresentation()`, `Layout::getPIP()`,
307310
`Layout::getBestFit()`, `Layout::createCustom()`.
308311

309312
```php
@@ -334,7 +337,7 @@ developer guide.
334337

335338
### Force a Client to Disconnect
336339

337-
Your application server can disconnect a client from an OpenTok session by calling the `forceDisconnect($sessionId, $connectionId)`
340+
Your application server can disconnect a client from an OpenTok session by calling the `forceDisconnect($sessionId, $connectionId)`
338341
method of the `OpenTok\OpenTok` class.
339342

340343
```php
@@ -343,6 +346,7 @@ use OpenTok\OpenTok;
343346
// Force disconnect a client connection
344347
$opentok->forceDisconnect($sessionId, $connectionId);
345348
```
349+
346350
### Sending Signals
347351

348352
Once a Session is created, you can send signals to everyone in the session or to a specific connection.
@@ -354,15 +358,14 @@ The `$sessionId` parameter is the session ID of the session.
354358
The `$payload` parameter is an associative array used to set the
355359
following:
356360

357-
* `data` (string) -- The data string for the signal. You can send a maximum of 8kB.
361+
- `data` (string) -- The data string for the signal. You can send a maximum of 8kB.
358362

359-
* `type` (string) -- &mdash; (Optional) The type string for the signal. You can send a maximum of 128 characters, and only the following characters are allowed: A-Z, a-z, numbers (0-9), '-', '_', and '~'.
363+
- `type` (string) -- &mdash; (Optional) The type string for the signal. You can send a maximum of 128 characters, and only the following characters are allowed: A-Z, a-z, numbers (0-9), '-', '\_', and '~'.
360364

361365
The `$connectionId` parameter is an optional string used to specify the connection ID of
362366
a client connected to the session. If you specify this value, the signal is sent to
363367
the specified client. Otherwise, the signal is sent to all clients connected to the session.
364368

365-
366369
```php
367370
use OpenTok\OpenTok;
368371

@@ -417,7 +420,7 @@ guide](https://tokbox.com/developer/guides/sip/).
417420

418421
## Force Disconnect
419422

420-
Your application server can disconnect a client from an OpenTok session by calling the `forceDisconnect($sessionId, $connectionId)`
423+
Your application server can disconnect a client from an OpenTok session by calling the `forceDisconnect($sessionId, $connectionId)`
421424
method of the `OpenTok\OpenTok` class.
422425

423426
```php
@@ -426,6 +429,7 @@ use OpenTok\OpenTok;
426429
// Force disconnect a client connection
427430
$opentok->forceDisconnect($sessionId, $connectionId);
428431
```
432+
429433
## Sending Signals
430434

431435
Once a Session is created, you can send signals to everyone in the session or to a specific connection.
@@ -437,15 +441,14 @@ The `$sessionId` parameter is the session ID of the session.
437441
The `$payload` parameter is an associative array used to set the
438442
following:
439443

440-
* `data` (string) -- The data string for the signal. You can send a maximum of 8kB.
444+
- `data` (string) -- The data string for the signal. You can send a maximum of 8kB.
441445

442-
* `type` (string) -- &mdash; (Optional) The type string for the signal. You can send a maximum of 128 characters, and only the following characters are allowed: A-Z, a-z, numbers (0-9), '-', '_', and '~'.
446+
- `type` (string) -- &mdash; (Optional) The type string for the signal. You can send a maximum of 128 characters, and only the following characters are allowed: A-Z, a-z, numbers (0-9), '-', '\_', and '~'.
443447

444448
The `$connectionId` parameter is an optional string used to specify the connection ID of
445449
a client connected to the session. If you specify this value, the signal is sent to
446450
the specified client. Otherwise, the signal is sent to all clients connected to the session.
447451

448-
449452
```php
450453
use OpenTok\OpenTok;
451454

@@ -473,9 +476,9 @@ guide](https://tokbox.com/developer/guides/signaling/).
473476
There are three sample applications included in this repository. To get going as fast as possible, clone the whole
474477
repository and follow the Walkthroughs:
475478

476-
* [HelloWorld](sample/HelloWorld/README.md)
477-
* [Archiving](sample/Archiving/README.md)
478-
* [SipCall](sample/SipCall/README.md)
479+
- [HelloWorld](sample/HelloWorld/README.md)
480+
- [Archiving](sample/Archiving/README.md)
481+
- [SipCall](sample/SipCall/README.md)
479482

480483
## Documentation
481484

@@ -513,8 +516,8 @@ This version of the SDK includes support for working with OpenTok archives.
513516
The names of many methods of the API have changed. Many method names have
514517
changed to use camel case, including the following:
515518

516-
* `\OpenTok\OpenTok->createSession()`
517-
* `\OpenTok\OpenTok->generateToken()`
519+
- `\OpenTok\OpenTok->createSession()`
520+
- `\OpenTok\OpenTok->generateToken()`
518521

519522
Note also that the `options` parameter of the `OpenTok->createSession()` method has a `mediaMode`
520523
property instead of a `p2p` property.
@@ -530,9 +533,11 @@ docs directory of the SDK.
530533
Interested in contributing? We :heart: pull requests! See the [Development](DEVELOPING.md) and
531534
[Contribution](CONTRIBUTING.md) guidelines.
532535

533-
## Support
536+
## Getting Help
534537

535-
See <https://support.tokbox.com> for all our support options.
538+
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:
536539

537-
Find a bug? File it on the [Issues](https://github.com/opentok/opentok-php-sdk/issues) page. Hint:
538-
test cases are really helpful!
540+
- Open an issue on this repository
541+
- See <https://support.tokbox.com/> for support options
542+
- Tweet at us! We're [@VonageDev on Twitter](https://twitter.com/VonageDev)
543+
- Or [join the Vonage Developer Community Slack](https://developer.nexmo.com/community/slack)

0 commit comments

Comments
 (0)