mirror of
https://github.com/videojs/video.js.git
synced 2025-01-27 11:22:06 +02:00
Added volume() function to get and set volume through the player.
This commit is contained in:
parent
c54ad0583b
commit
c2c945afe5
@ -129,6 +129,10 @@ Set options when setting up the videos. The defaults are shown here.
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
1.1.4
|
||||||
|
|
||||||
|
- Feature: Added volume() function to get and set volume through the player.
|
||||||
|
|
||||||
1.1.3
|
1.1.3
|
||||||
|
|
||||||
- Feature: Width/Height functions for resizing the player
|
- Feature: Width/Height functions for resizing the player
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
<video id="example_video_1" class="video-js" width="640" height="264" controls="controls" preload="auto" poster="http://video-js.zencoder.com/oceans-clip.png">
|
<video id="example_video_1" class="video-js" width="640" height="264" controls="controls" preload="auto" poster="http://video-js.zencoder.com/oceans-clip.png">
|
||||||
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
|
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
|
||||||
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
|
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
|
||||||
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"' />
|
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg; codecs="theora, vorbis"' />
|
||||||
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
|
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
|
||||||
<object id="flash_fallback_1" class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
|
<object id="flash_fallback_1" class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
|
||||||
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
|
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
|
||||||
|
4
video.js
4
video.js
@ -259,6 +259,10 @@ var VideoJS = JRClass.extend({
|
|||||||
this.positionController();
|
this.positionController();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
volume: function(newVolume){
|
||||||
|
if(newVolume != undefined) { this.setVolume(newVolume); }
|
||||||
|
return this.video.volume;
|
||||||
|
},
|
||||||
|
|
||||||
loadInterface: function(){
|
loadInterface: function(){
|
||||||
if(!this.stylesHaveLoaded()) {
|
if(!this.stylesHaveLoaded()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user