Welcome to Shaka Player
If you are integrating Shaka Player into another Closure-based project, our build process will generate externs for Shaka Player itself.
If you installed Shaka Player via npm, the source has been compiled and the externs have been generated.
You can build Shaka on Linux, Windows, or Mac. To get the sources and compile the library, you will need:
- Git v1.9+
- Python v2.7 or v3.5+
- Java Runtime Environment v8+
- NodeJS v10+
- A local web server, such as Apache
- NOTE: A local web server is required because browsers place restrictions on applications from file:/// URLs.
If you just want to compile for export to other projects, you might consider compiling through a docker container. (see compile instructions)
To quickly install these prerequisites on Ubuntu or Debian, you can run this script:
curl https://raw.githubusercontent.com/shaka-project/shaka-player/main/build/install-linux-prereqs.sh | bash
We do not provide detailed instructions or scripts for installing these prerequisites on other operating systems or on non-Debian-based Linux distributions. (We couldn't possibly document them all.) You can follow the links above to download and install the prerequisites manually on any OS.
Get the source
git clone https://github.com/shaka-project/shaka-player.git cd shaka-player
Compile the library and generate the docs
Alternatively you can use a docker container:
cd build/docker docker-compose run --rm shaka-compiler
The output is:
- dist/shaka-player.compiled.js (compiled bundle)
- dist/shaka-player.compiled.debug.js (debug bundle)
- dist/shaka-player.compiled.externs.js (generated externs, for Closure-based projects)
- docs/api/index.html (generated documentation)
Run the tests
The tests depend on a few third-party tools, which are installed automatically
npm when you run the tests. Nothing will be installed globally.
Run the tests in your platform's browsers using
./build/test.py. You can
specify particular browsers with the
--browsers argument. For example:
./build/test.py --browsers Opera # or: ./build/test.py --browsers Chrome,Firefox,Edge
You can find a full list of available browsers with
--browsers help, and you
can find a complete list of testing options with
Join the announcement list
If you want to receive release or survey announcements, you should join our mailing list. The list is very low volume.
Continue the Tutorials
Next, check out Basic Usage.