speed-index-calculator
Returns the Speed Index for a given video using the WebPageTest visualmetrics library
Dependencies
The original visualmetrics library requires Python and several image processing tools be installed.
This module works around that by leveraging the excellent wikimedia/visualmetrics Docker image, so you do need to be able to run a Docker container, either locally or remotely.
The module will run a Docker container for you, but in order to do that the DOCKER_HOST
environment variable must be set.
You might also need to set the DOCKER_TLS_VERIFY
and DOCKER_CERT_PATH
environment variables.
If you're using docker-machine
, run the env
command to check your the variables and their values.
Example
var speedIndexCalculator = ;var path = '/some/path/to/video.mp4'; speedIndexCalculator;
Running tests
Run mocha tests with npm test
(the note above about Dependencies applies as well)