Skip to content

Commit

Permalink
openvidu-node-client initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Jun 9, 2017
1 parent 1e046f8 commit 12fdd21
Show file tree
Hide file tree
Showing 24 changed files with 506 additions and 0 deletions.
43 changes: 43 additions & 0 deletions openvidu-node-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
*.editorconfig
28 changes: 28 additions & 0 deletions openvidu-node-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# OpenviduNodeClient

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.2.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
7 changes: 7 additions & 0 deletions openvidu-node-client/lib/OpenVidu.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Session } from "./Session";
export declare class OpenVidu {
private urlOpenViduServer;
private secret;
constructor(urlOpenViduServer: string, secret: string);
createSession(): Session;
}
15 changes: 15 additions & 0 deletions openvidu-node-client/lib/OpenVidu.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions openvidu-node-client/lib/OpenVidu.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions openvidu-node-client/lib/OpenViduRole.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export declare enum OpenViduRole {
SUBSCRIBER,
PUBLISHER,
MODERATOR,
}
9 changes: 9 additions & 0 deletions openvidu-node-client/lib/OpenViduRole.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions openvidu-node-client/lib/OpenViduRole.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions openvidu-node-client/lib/Session.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { TokenOptions } from './TokenOptions';
export declare class Session {
private urlOpenViduServer;
private secret;
private sessionIdURL;
private tokenURL;
private sessionId;
private hostname;
private port;
constructor(urlOpenViduServer: string, secret: string);
getSessionId(callback: Function): string;
generateToken(tokenOptions: TokenOptions, callback: Function): void;
private getBasicAuth();
private setHostnameAndPort();
}
100 changes: 100 additions & 0 deletions openvidu-node-client/lib/Session.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions openvidu-node-client/lib/Session.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions openvidu-node-client/lib/TokenOptions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { OpenViduRole } from "./OpenViduRole";
export declare class TokenOptions {
private data;
private role;
constructor(data: string, role: OpenViduRole);
getData(): string;
getRole(): OpenViduRole;
}
export declare namespace TokenOptions {
class Builder {
private dataProp;
private roleProp;
build(): TokenOptions;
data(data: string): Builder;
role(role: OpenViduRole): Builder;
}
}
40 changes: 40 additions & 0 deletions openvidu-node-client/lib/TokenOptions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions openvidu-node-client/lib/TokenOptions.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions openvidu-node-client/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './OpenVidu';
export * from './OpenViduRole';
export * from './Session';
export * from './TokenOptions';
10 changes: 10 additions & 0 deletions openvidu-node-client/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions openvidu-node-client/lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions openvidu-node-client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "openvidu-node-client",
"version": "1.0.0",
"license": "MIT",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"build": "tsc"
},
"private": true,
"dependencies": {},
"devDependencies": {
"@types/node": "^6.0.78",
"codelyzer": "~2.0.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "2.3.4"
}
}
11 changes: 11 additions & 0 deletions openvidu-node-client/src/OpenVidu.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Session } from "./Session";

export class OpenVidu {

constructor(private urlOpenViduServer: string, private secret: string){ }

public createSession(): Session {
return new Session(this.urlOpenViduServer, this.secret);
}

}
5 changes: 5 additions & 0 deletions openvidu-node-client/src/OpenViduRole.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export enum OpenViduRole {
SUBSCRIBER = <any>'SUBSCRIBER',
PUBLISHER = <any>'PUBLISHER',
MODERATOR = <any>'MODERATOR'
}
Loading

0 comments on commit 12fdd21

Please sign in to comment.