Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

1. Download sources

Code Block
languagebash
themeRDark
cd /usr/local/src

Download from Git: https://github.com/flashphoner/flashphoner_client/tree/wcs_api-2.0

Code Block
languagebash
themeRDark
wget https://github.com/flashphoner/flashphoner_client/archive/wcs_api-2.0.zip
unzip wcs_api-2.0.zip

Download latest WebSDK build from this page

Code Block
languagebash
themeRDark
wget https://flashphoner.com/downloads/builds/flashphoner_client/wcs_api-2.0/flashphoner-api-0.5.28.2753-57d18b5f1d37674582c32d9af3505e21e0f6be3c.tar.gz
tar -xvf flashphoner-api-0.5.28.2753-57d18b5f1d37674582c32d9af3505e21e0f6be3c.tar.gz

Copy media-source-media-provider.js from flashphoner_client build to the sources

Code Block
languagebash
themeRDark
cp flashphoner-api-0.5.25/examples/demo/dependencies/mse/media-source-media-provider.js flashphoner_client-wcs_api-2.0/src

2. Download Flex SDK

This is require for Flash support only. If you plan to build WebRTC only, skip this step

Code Block
languagebash
themeRDark
mkdir flex_sdk_4.6
wget http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip
unzip flex_sdk_4.6.zip -d flex_sdk_4.6

3. Install npm and grunt

Code Block
languagebash
themeRDark
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install 12
npm install -g grunt

4. Install npm modules

Code Block
languagebash
themeRDark
cd flashphoner_client-wcs_api-2.0
npm install
sed -i -e 's@static-link-runtime-shared-libraries=true@static-link-runtime-shared-libraries=false@g' node_modules/grunt-flash-compiler/tasks/flash-compiler.js

5. Build WebSDK

Building all the bundles by default

To build all the bundles run the following

Code Block
languagebash
themeRDark
grunt release

Building all the bundles including Flash support

To build all the bundles with Flash support run the following

Code Block
languagebash
themeRDark
FLEX_HOME=~/flex_sdk_4.6 grunt with-flash

Since build 2.0.222, Flash will not work even in a browsers where it is still available without this step.

Building mediaproviders bundles

To build bundles with excluded media providers run the following

Code Block
languagebash
themeRDark
grunt browserify
grunt minify

Building WebRTC only bundle

To build WebRTC only bundle run the following

Code Block
languagebash
themeRDark
grunt webrtc
grunt minify

6. Copy scripts for WSPlayer

For WSPlayer, WSReceiver2.js and video-worker2.js are required. The scripts are available in flashphoner_client build.

Code Block
languagebash
themeRDark
cp ../flashphoner-api-0.5.25/examples/demo/dependencies/websocket-player release/*/examples/demo/dependencies -R