本文共 1770 字,大约阅读时间需要 5 分钟。
JW Player is a the world's most popular embeddable media player.
For documentation and support, please visit the .
We have several articles and examples on the .
The example below will find the element with an id of myVideoId and render a video player into it. We will then create an event handler to watch for when someone changes the volume.
jwplayer('myVideoId').setup({ file: '/uploads/example.mp4', }); jwplayer('myVideoId').onVolume(function(event) { console.log('The volume has changed', event); });
Note that we could also use functions getVolume, setVolume and others which can be found .
For our javascript code, we follow the
Before submitting a change be sure to verify it follows our guide by using
grunt jshint
To build the JW Player, you will need the following software:
To compile with Flex and Ant, you'll first need to modify the build.properties
file found in the build
folder:
flexsdk
to the install location of the Flex SDK (e.g. /usr/local/bin/flex/
)execextension
to .exe
if you're using Windows; otherwise leave it blank.You can now compile the player using Ant:
ant -buildfile build\build.xml
If the build is successful, the new player assets (jwplayer.js, jwplayer.html5.js, jwplayer.flash.swf) will appear in the bin-release
folder.
转载地址:http://rpabb.baihongyu.com/