Building JavaScript API from sources¶
1. Download sources¶
Download from Git: https://github.com/flashphoner/flashphoner_client/tree/wcs_api-2.0
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
wget https://flashphoner.com/downloads/builds/flashphoner_client/wcs_api-2.0/flashphoner-api-2.0.218-90771d47e4e5df7b56a88183c67206ed7db0fc5c.tar.gz
tar -xzf flashphoner-api-2.0.218-90771d47e4e5df7b56a88183c67206ed7db0fc5c.tar.gz
Copy media-source-media-provider.js from flashphoner_client build to the sources
cp @flashphoner/websdk-2.0.218/examples/demo/dependencies/mse/media-source-media-provider.js flashphoner_client-wcs_api-2.0/src
2. Download Flex SDK¶
This is required for Flash support only. If you plan to build WebRTC only, skip this step
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¶
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
yum -y install nodejs
npm install -g grunt
4. Install npm dependencies¶
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
Building all the bundles including Flash support¶
To build all the bundles with Flash support run the following
Building mediaproviders bundles¶
To build bundles with excluded media providers run the following
Building WebRTC only bundle¶
To build WebRTC only bundle run the following
6. Copy scripts for WSPlayer¶
For WSPlayer, WSReceiver2.js and video-worker2.js are required. The scripts are available in flashphoner_client build.