Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #12 from helloIAmPau/docs
Browse files Browse the repository at this point in the history
updated docs with additional plugins
  • Loading branch information
helloIAmPau committed Nov 17, 2019
2 parents 0fb69eb + 74f3e5e commit d37eb61
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 132 deletions.
3 changes: 3 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Getting Started](getting-started.md)
- [Create your Real-Time Application](create-application.md)
- [Messing Around with the Library](messing-around.md)
20 changes: 20 additions & 0 deletions docs/create-application.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Create your real-time application

TBD

## Plugins

TBD

### Echotest

TBD

### Streaming

TBD

### Videoroom

TBD

99 changes: 99 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<div align="center" style="text-align:center">
<img alt="logo" src="_media/logo.png"/>
<h1>Janus Client SDK</h1>

<h4>The <a href="https://github.com/meetecho/janus-gateway">Janus Gateway</a> client SDK for native environments</h4>
</div>

# Getting Started

Start using Janus Client SDK is as easy as cloning a git repo on your local machine. In fact, you only need to clone the main repo in your workspace and run the initialization script.

```bash
git clone https://github.com/meetecho/janus-mobile-sdk
cd janus-mobile-sdk
make
```

The `make` command downloads all the native dependencies you need to build the library on each platform.
Once the `make` command finished, you are ready to link the platform-specific code to your C++, Android or iOS project.

## Note for Windows Users

This project uses a set of unix tools to build. We suggest you to use the [WSL](https://docs.microsoft.com/en-us/windows/wsl/about) in order to avoid headaches!

## C++

TBD

## Android

In this section, we will link the janus-client android library to your application android project.
If you don't know how to create a new Android project, we suggest you read the official android developer [guide](https://developer.android.com/training/basics/firstapp) from google.

> <i class="fas fa-bomb"></i> janus-client is a C++ SDK. So you need to install the [NDK](https://developer.android.com/ndk/guides) on your development machine
First you need to update the `settings.gradle` file, located in your project root folder, by adding a reference to the janus-client library. The file should look similar to the following:

```gradle
include ':app'
include ':janus'
project(':janus').projectDir = new File(settingsDir, '$JANUS_CLIENT_CLONE_DIRECTORY/platforms/android/janus')
```

> <i class="fas fa-bomb"></i> replace `$JANUS_CLIENT_CLONE_DIRECTORY` with the path of the janus-client folder
Now you can reference the janus external library as a dependency of your project by adding the `:janus` name into the dependencies section of the application `build.gradle`.

```gradle
android {
defaultConfig {
...
minSdkVersion 16
}
...
compileOptions {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation project(path: ':janus')
...
}
```

> <i class="fas fa-bomb"></i> You also need to set the __minSdkVersion__ and the __compatibility__ flags as above otherwise you will face some build errors
As final step you need to declare the required permission in your application `AndroidManifest.xml`

```gradle
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.github.helloiampau.petsapp">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
...
</manifest>
```

If your configuration goes fine, your project structure should look like the following:

<div style="text-align: center">
<img src="_media/android-tree.png" alt="Android project tree" width="50%">
</div>

## iOS

TBD

34 changes: 21 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,37 @@
</head>
<body>
<div id="app">Loading...</div>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-themeable@0"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/docsify-copy-code"></script>
<script src="//unpkg.com/docsify-plugin-codefund/index.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-cpp.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-objectivec.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-java.min.js"></script>
<script src="//kit.fontawesome.com/ad3f799027.js" crossorigin="anonymous"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
<script>
window.$docsify = {
name: 'Janus Client SDK',
repo: 'https://github.com/meetecho/janus-mobile-sdk',
loadSidebar: true,
ga: 'UA-152623130-1',
search: 'auto',
maxLevel: 3,
subMaxLevel: 3,
plugins: [
DocsifyCodefund.create('631')
]
],
search: {
maxAge: 86400000,
paths: 'auto',
depth: 4,
hideOtherSidebarContent: false
}
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-themeable@0"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/docsify-copy-code"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-c.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-cpp.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-objectivec.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-java.min.js"></script>
<script src="//kit.fontawesome.com/ad3f799027.js" crossorigin="anonymous"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
</body>
</html>
119 changes: 0 additions & 119 deletions docs/README.md → docs/messing-around.md
Original file line number Diff line number Diff line change
@@ -1,122 +1,3 @@
<div align="center" style="text-align:center">
<img alt="logo" src="_media/logo.png"/>
<h1>Janus Client SDK</h1>

<h4>The <a href="https://github.com/meetecho/janus-gateway">Janus Gateway</a> client SDK for native environments</h4>
</div>

# Getting Started

Start using Janus Client SDK is as easy as cloning a git repo on your local machine. In fact, you only need to clone the main repo in your workspace and run the initialization script.

```bash
git clone https://github.com/meetecho/janus-mobile-sdk
cd janus-mobile-sdk
make
```

The `make` command downloads all the native dependencies you need to build the library on each platform.
Once the `make` command finished, you are ready to link the platform-specific code to your C++, Android or iOS project.

## Note for Windows Users

This project uses a set of unix tools to build. We suggest you to use the [WSL](https://docs.microsoft.com/en-us/windows/wsl/about) in order to avoid headaches!

## C++

TBD

## Android

In this section, we will link the janus-client android library to your application android project.
If you don't know how to create a new Android project, we suggest you read the official android developer [guide](https://developer.android.com/training/basics/firstapp) from google.

> <i class="fas fa-bomb"></i> janus-client is a C++ SDK. So you need to install the [NDK](https://developer.android.com/ndk/guides) on your development machine
First you need to update the `settings.gradle` file, located in your project root folder, by adding a reference to the janus-client library. The file should look similar to the following:

```gradle
include ':app'
include ':janus'
project(':janus').projectDir = new File(settingsDir, '$JANUS_CLIENT_CLONE_DIRECTORY/platforms/android/janus')
```

> <i class="fas fa-bomb"></i> replace `$JANUS_CLIENT_CLONE_DIRECTORY` with the path of the janus-client folder
Now you can reference the janus external library as a dependency of your project by adding the `:janus` name into the dependencies section of the application `build.gradle`.

```gradle
android {
defaultConfig {
...
minSdkVersion 16
}
...
compileOptions {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation project(path: ':janus')
...
}
```

> <i class="fas fa-bomb"></i> You also need to set the __minSdkVersion__ and the __compatibility__ flags as above otherwise you will face some build errors
As final step you need to declare the required permission in your application `AndroidManifest.xml`

```gradle
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.github.helloiampau.petsapp">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
...
</manifest>
```

If your configuration goes fine, your project structure should look like the following:

<div style="text-align: center">
<img src="_media/android-tree.png" alt="Android project tree" width="50%">
</div>

## iOS

TBD

# Create your real-time application

TBD

## Plugins

TBD

### Echotest

TBD

### Streaming

TBD

### Videoroom

TBD

# Messing around with the library

Suppose you already integrated Janus in your own server-side environment by either installing it behind a proxy API or by building your custom plugin.
Expand Down

0 comments on commit d37eb61

Please sign in to comment.