mpv.js
Powered by marvelous mpv.
All format embeddable player for Electron/NW.js applications.
Get libmpv
In order to try mpv.js you need to install mpv library first.
- Windows: download mpv-dev, unpack, put corresponding
mpv-1.dll
toC:\Windows\system32
- macOS:
brew install mpv
- Linux:
apt-get install libmpv1 libavformat-dev
Example
Simple Electron application on Angular
Simple Electron application on React
Usage
Add npm package
npm install mpv.js-vanilla --save
Package includes prebuilt binaries for all major platforms so no need to setup compilers.
See also
- mpv properties documentation
- mpv commands documentation
- ReactMPV source with JSDoc API comments
- example player source for a more advanced usage
Library connection
In order for mpv.js-vanilla to work, the path to the mpv library files must be passed to the getPluginEntry function. MacOS | Windows
License
mpv.js is licensed under CC0 itself. However if you use GPL build of libmpv (e.g. lachs0r builds) your application might violate GPL dynamic linking restrictions. LGPL build should be safe, see mpv copyright for details. (This is not a legal advice.)
Example video is part of Tears of Steel movie (CC) Blender Foundation | mango.blender.org.
Logo is by @SteveJobzniak.