From 74f3e5e9f4984a0640f6fc19f34919357f37020f Mon Sep 17 00:00:00 2001 From: Pasquale Boemio Date: Sun, 17 Nov 2019 10:43:05 +0100 Subject: [PATCH] updated docs with additional plugins --- docs/_sidebar.md | 3 + docs/create-application.md | 20 +++++ docs/getting-started.md | 99 +++++++++++++++++++++ docs/index.html | 34 +++++--- docs/{README.md => messing-around.md} | 119 -------------------------- 5 files changed, 143 insertions(+), 132 deletions(-) create mode 100644 docs/_sidebar.md create mode 100644 docs/create-application.md create mode 100644 docs/getting-started.md rename docs/{README.md => messing-around.md} (66%) diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 0000000..0df7301 --- /dev/null +++ b/docs/_sidebar.md @@ -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) diff --git a/docs/create-application.md b/docs/create-application.md new file mode 100644 index 0000000..c2a195f --- /dev/null +++ b/docs/create-application.md @@ -0,0 +1,20 @@ +# Create your real-time application + +TBD + +## Plugins + +TBD + +### Echotest + +TBD + +### Streaming + +TBD + +### Videoroom + +TBD + diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..6941b5b --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,99 @@ +
+ logo +

Janus Client SDK

+ +

The Janus Gateway client SDK for native environments

+
+ +# 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. + +> 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') +``` + +> 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') + ... +} +``` + +> 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 + + + + + + + + + ... + + +``` + +If your configuration goes fine, your project structure should look like the following: + +
+ Android project tree +
+ +## iOS + +TBD + diff --git a/docs/index.html b/docs/index.html index dc26101..5b7f8ef 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,29 +13,37 @@
Loading...
- - - - - - - - - - - + + + + + + + + + + + + diff --git a/docs/README.md b/docs/messing-around.md similarity index 66% rename from docs/README.md rename to docs/messing-around.md index 09d3d4e..16bd482 100644 --- a/docs/README.md +++ b/docs/messing-around.md @@ -1,122 +1,3 @@ -
- logo -

Janus Client SDK

- -

The Janus Gateway client SDK for native environments

-
- -# 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. - -> 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') -``` - -> 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') - ... -} -``` - -> 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 - - - - - - - - - ... - - -``` - -If your configuration goes fine, your project structure should look like the following: - -
- Android project tree -
- -## 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.