#Live Video Kit Thumbs Demo
This microservice is part of Live Video Kit (LVK). LVK helps stream live video in RTMP format LVK consists of 3 parts:
- LVK-server Based on nginx rtmp module
- LVK-client Has two adobe flash files (publisher.swf and player.swf)
- LVK-thumbs To make thumbnail for live streams
This microservice is used for uploading thumbnails from LVK-client (publisher).
LVK-thumbs consists of two parts:
- Uploader (nodejs application)
- Nginx
Call publisher API method from JS
takeScreenshot(uploadURL:String,
jpgFile:String,
token:String,
width:int = 160,
heigth:int = 120,
customParam:String = null)to make thumbnail from current publisher video. After thumbnail uploaded publisher fire "thumb_uploaded" event. Call getStatus() method to get thumbnail URL
#How to build and start container
- Clone this repo to
/docker-datadirectory - Go to project dir
cd /docker-data/LVK-thumbs/ - Make file
.dockerenv - Set
SECRETparam in.dockerenvfile - Create file
docker-compose.override.ymlwith following content:
nginx:
ports:
- "80:80"
and change exposed port if needed
docker-compose up -d- Check crossdomain URL
/crossdomain.xml(need for flash player security policy) demo - Check
/uploadURL (have to show LVK thumbs server info) demo - Optional Set
SERVICE_NAMEvariable in.dockerenvfile to set unique service name
environment:
- SERVICE_NAME=lvk_thumbs_0
publisher.swf sends 3 GET params:
jpgFile- имя загружаемого файлаtoken- md5(jpgFile + SECRET) SECRET - переменная окружения устанавливается в файле .dockerenvcustomParam- зарезервировано для передачи дополнительного параметра