Skip to content

Commit 05f29ec

Browse files
authored
Merge pull request #184 from opentok/repo-metrics
Adding repo metric GitHub action
2 parents 3b73547 + 8ba4131 commit 05f29ec

40 files changed

+218
-69
lines changed

.github/workflows/metrics.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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 }}

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+
devrel@vonage.com.
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: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# OpenTok Java SDK
22

33
[![Build Status](https://travis-ci.org/opentok/Opentok-Java-SDK.svg?branch=master)](https://travis-ci.org/opentok/Opentok-Java-SDK)
4-
[![codecov](https://codecov.io/gh/opentok/Opentok-Java-SDK/branch/master/graph/badge.svg)](https://codecov.io/gh/opentok/Opentok-Java-SDK)
4+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
5+
6+
<img src="https://assets.tokbox.com/img/vonage/Vonage_VideoAPI_black.svg" height="48px" alt="Tokbox is now known as Vonage" />
57

68
The OpenTok Java SDK lets you generate
79
[sessions](https://tokbox.com/developer/guides/create-session/) and
@@ -78,9 +80,9 @@ opentok.close();
7880
To create an OpenTok Session, use the `OpenTok` instance’s `createSession(SessionProperties properties)`
7981
method. The `properties` parameter is optional and it is used to specify two things:
8082

81-
* Whether the session uses the OpenTok Media Router
82-
* A location hint for the OpenTok server.
83-
* Whether the session is automatically archived.
83+
- Whether the session uses the OpenTok Media Router
84+
- A location hint for the OpenTok server.
85+
- Whether the session is automatically archived.
8486

8587
An instance can be initialized using the `com.opentok.SessionProperties.Builder` class.
8688
The `sessionId` property of the returned `com.opentok.Session` instance, which you can read using
@@ -199,10 +201,10 @@ The `Archive.OutputMode.COMPOSED` option is the default value for `outputMode`.
199201
You can only specify the `resolution` for composed archives using the `ArchiveProperties` builder. If you set the `resolution` property and also set the `outputMode` property to `Archive.OutputMode.INDIVIDUAL`, the method will throw an `InvalidArgumentException`.
200202

201203
The accepted values for `resolution` are:
204+
202205
- `"640x480"` (SD, the default)
203206
- `"1280x720"` (HD)
204-
> Please note that setting any other value for the `resolution` property will result in an exception.
205-
207+
> Please note that setting any other value for the `resolution` property will result in an exception.
206208
207209
```java
208210
import com.opentok.ArchiveProperties;
@@ -249,7 +251,8 @@ List<Archive> archives = opentok.listArchives(0, 50);
249251
// Get a list of the next 50 archives
250252
List<Archive> archives = opentok.listArchives(50, 50);
251253
```
252-
You can also fetch the list of archives for a specific session ID , and optionally
254+
255+
You can also fetch the list of archives for a specific session ID , and optionally
253256
use the offset and count parameters as described above.
254257

255258
```java
@@ -268,7 +271,7 @@ into the `archiveMode()` method of the `SessionProperties.Builder` object you us
268271
`sessionProperties` parameter passed into the `OpenTok.createSession()` method (see "Creating
269272
Sessions," above).
270273

271-
For composed archives, you can dynamically set the archive layout (while the archive is being recorded) using the `OpenTok.setArchiveLayout(String archiveId, ArchiveProperties properties)`
274+
For composed archives, you can dynamically set the archive layout (while the archive is being recorded) using the `OpenTok.setArchiveLayout(String archiveId, ArchiveProperties properties)`
272275
method. See [Customizing the video layout for composed
273276
archives](https://tokbox.com/developer/guides/archiving/layout-control.html) for more information. Use the `ArchiveProperties` builder as follows:
274277

@@ -321,7 +324,7 @@ For more information on archiving, see the
321324
### Disconnecting Clients
322325

323326
Your application server can disconnect a client from an OpenTok session by calling the `forceDisconnect(sessionId, connectionId)`
324-
method of the `com.opentok.OpenTok` instance.
327+
method of the `com.opentok.OpenTok` instance.
325328

326329
```java
327330
opentok.forceDisconnect(sessionId, connectionId);
@@ -335,43 +338,42 @@ For more information on the force disconnect functionality and exception codes,
335338

336339
You can send signals to all the connections in a session or to a specific connection:
337340

338-
- `public void signal(String sessionId, SignalProperties props) throws OpenTokException , RequestException, InvalidArgumentException `
341+
- `public void signal(String sessionId, SignalProperties props) throws OpenTokException , RequestException, InvalidArgumentException`
339342

340343
- `public void signal(String sessionId, String connectionId, SignalProperties props) throws OpenTokException , RequestException , InvalidArgumentException`
341344

342345
The `SignalProperties` builder helps you to construct the signal data and type:
343346

344-
345347
```java
346348
SignalProperties properties = new SignalProperties.Builder()
347349
.type("test")
348350
.data("This is a test string")
349351
.build();
350-
352+
351353
opentok.signal(sessionId, properties);
352354
opentok.signal(sessionId, connectionId, properties);
353355
```
354356

355357
Make sure that the `type` string does not exceed the maximum length (128 bytes)
356-
and the `data` string does not exceed the maximum length (8 kB).
358+
and the `data` string does not exceed the maximum length (8 kB).
357359
The `SignalProperties` builder does not currently check for these limitations.
358360

359361
For more information on signaling and exception codes, refer to the documentation for the
360362
[OpenTok signaling](https://tokbox.com/developer/rest/#send_signal) REST method.
361363

362364
### Broadcasting
363365

364-
You can broadcast OpenTok publishing streams to an HLS (HTTP live streaming) or
365-
to RTMP streams. To successfully start broadcasting a session, at least one client must be
366+
You can broadcast OpenTok publishing streams to an HLS (HTTP live streaming) or
367+
to RTMP streams. To successfully start broadcasting a session, at least one client must be
366368
connected to the session. You can only have one active live streaming broadcast at a time
367369
for a session (however, having more than one would not be useful).
368-
The live streaming broadcast can target one HLS endpoint and up to five
370+
The live streaming broadcast can target one HLS endpoint and up to five
369371
RTMP servers simulteneously for a session. You can only start live streaming
370372
for sessions that use the OpenTok Media Router (with the media mode set to routed);
371-
you cannot use live streaming with sessions that have the media mode set to relayed.
373+
you cannot use live streaming with sessions that have the media mode set to relayed.
372374
(See the [OpenTok Media Router and media
373375
modes](https://tokbox.com/developer/guides/create-session/#media-mode) developer guide).
374-
376+
375377
You can start a broadcast using the `OpenTok.startBroadcast(sessionId, properties)` method,
376378
where the `properties` field is a `BroadcastProperties` object. Initalize a `BroadcastProperties`
377379
object as follows (see the [Opentok Broadcast](https://tokbox.com/developer/rest/#start_broadcast)
@@ -413,13 +415,13 @@ long createdAt;
413415
long updatedAt;
414416
String resolution;
415417
String status;
416-
List<Rtmp> rtmpList = new ArrayList<>(); //not more than 5
418+
List<Rtmp> rtmpList = new ArrayList<>(); //not more than 5
417419
String hls; // HLS url
418420

419421
// The Rtmp class mimics the RtmpProperties
420422
```
421423

422-
To stop a broadcast use:
424+
To stop a broadcast use:
423425

424426
```java
425427
Broadcast broadcast = opentok.stopBroadcast(broadcastId);
@@ -441,7 +443,7 @@ of a live broadcast dynamically using:
441443
```java
442444
opentok.setBroadcastLayout(broadcastId, properties);
443445

444-
//properties can be
446+
//properties can be
445447
BroadcastProperties properties = new BroadcastProperties.Builder()
446448
.layout(new BroadcastLayout(BroadcastLayout.Type.VERTICAL))
447449
.build();
@@ -464,7 +466,7 @@ opentok.setStreamLayouts(sessionId, properties);
464466
### Working with Streams
465467

466468
You can get information about a stream by calling the `getStream(sessionId, streamId)` method
467-
of the `com.opentok.OpenTok` instance.
469+
of the `com.opentok.OpenTok` instance.
468470

469471
```java
470472
// Get stream info from just a sessionId (fetched from a database)
@@ -494,18 +496,18 @@ Interconnect feature. This requires a SIP URI, the session ID you wish to add th
494496
stream to, and a token to connect to that session ID.
495497

496498
To connect your SIP platform to an OpenTok session, call the
497-
`OpenTok.dial(String sessionId, String token, SipProperties properties)` method.
498-
The audio from your end of the SIP call is added to the OpenTok session as an audio-only stream.
499+
`OpenTok.dial(String sessionId, String token, SipProperties properties)` method.
500+
The audio from your end of the SIP call is added to the OpenTok session as an audio-only stream.
499501
The OpenTok Media Router mixes audio from other streams in the session and sends the mixed audio
500502
to your SIP endpoint. The call ends when your SIP server sends a BYE message (to terminate
501503
the call). You can also end a call using the `OpenTok.forceDisconnect(sessionId, connectionId)`
502504
method to disconnect the SIP client from the session (see [Disconnecting clients](#disconnecting-clients)).
503505

504506
The OpenTok SIP gateway automatically ends a call after 5 minutes of inactivity
505-
(5 minutes without media received). Also, as a security measure,
507+
(5 minutes without media received). Also, as a security measure,
506508
the OpenTok SIP gateway closes any SIP call that lasts longer than 6 hours.
507509

508-
The SIP interconnect feature requires that you use an OpenTok session that uses the
510+
The SIP interconnect feature requires that you use an OpenTok session that uses the
509511
OpenTok Media Router (a session with the media mode set to routed).
510512

511513
To connect an OpenTok session to a SIP gateway:
@@ -528,8 +530,8 @@ SipProperties properties = new SipProperties.Builder()
528530
There are two sample applications included with the SDK. To get going as fast as possible, clone the whole
529531
repository and follow the Walkthroughs:
530532

531-
* [HelloWorld](sample/HelloWorld/README.md)
532-
* [Archiving](sample/Archiving/README.md)
533+
- [HelloWorld](sample/HelloWorld/README.md)
534+
- [Archiving](sample/Archiving/README.md)
533535

534536
## Documentation
535537

@@ -582,9 +584,11 @@ take two parameters: the session ID and a TokenOptions object.
582584
Interested in contributing? We :heart: pull requests! See the [Development](DEVELOPING.md) and
583585
[Contribution](CONTRIBUTING.md) guidelines.
584586

585-
## Support
587+
## Getting Help
586588

587-
See <https://support.tokbox.com> for all our support options.
589+
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:
588590

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

src/main/java/com/opentok/Archive.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2019 TokBox, Inc.
3+
* Copyright (C) 2020 TokBox, Inc.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2019 TokBox, Inc.
3+
* Copyright (C) 2020 TokBox, Inc.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2019 TokBox, Inc.
3+
* Copyright (C) 2020 TokBox, Inc.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveMode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2019 TokBox, Inc.
3+
* Copyright (C) 2020 TokBox, Inc.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2019 TokBox, Inc.
3+
* Copyright (C) 2020 TokBox, Inc.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/Broadcast.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2019 TokBox, Inc.
3+
* Copyright (C) 2020 TokBox, Inc.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

0 commit comments

Comments
 (0)