mirror of
https://github.com/videojs/video.js.git
synced 2024-12-25 02:42:10 +02:00
Added option to disable controls.
This commit is contained in:
parent
069535932c
commit
d325f6aa56
@ -154,6 +154,7 @@ VideoJS.fn.newBehavior("controlBar", function(element){
|
||||
_V_.addListener(element, "mouseout", this.onControlBarsMouseOut.context(this));
|
||||
},{
|
||||
showControlBars: function(){
|
||||
if (!this.options.controlsEnabled) { return; }
|
||||
if (!this.options.controlsAtStart && !this.hasPlayed) { return; }
|
||||
this.each(this.controlBars, function(bar){
|
||||
// bar.style.opacity = 1;
|
||||
@ -438,6 +439,7 @@ VideoJS.fn.newBehavior("bigPlayButton", function(element){
|
||||
this.activateElement(element, "playButton");
|
||||
},{
|
||||
showBigPlayButtons: function(){
|
||||
if (!this.options.controlsEnabled) { return; }
|
||||
this.each(this.elements.bigPlayButtons, function(element){
|
||||
element.style.display = "block";
|
||||
});
|
||||
|
@ -32,6 +32,7 @@ var VideoJS = JRClass.extend({
|
||||
preload: true,
|
||||
loop: false,
|
||||
returnToStart: true,
|
||||
controlsEnabled: true,
|
||||
useBuiltInControls: false, // Use the browser's controls (iPhone)
|
||||
controlsBelow: false, // Display control bar below video vs. in front of
|
||||
controlsAtStart: false, // Make controls visible when page loads
|
||||
@ -283,6 +284,7 @@ VideoJS.extend({
|
||||
var match = navigator.userAgent.match(/Android (\d+)\./i);
|
||||
if (match && match[1]) { return match[1]; }
|
||||
},
|
||||
//isAndroidBrowser
|
||||
|
||||
warnings: {
|
||||
// Safari errors if you call functions on a video that hasn't loaded yet
|
||||
|
@ -15,7 +15,7 @@
|
||||
<!-- <script src="flowplayer/video-js.flowplayer.js" type="text/javascript" charset="utf-8"></script> -->
|
||||
|
||||
<script type="text/javascript">
|
||||
VideoJS.setupAllWhenReady();
|
||||
VideoJS.setupAllWhenReady({ controlsEnabled: false });
|
||||
VideoJS.DOMReady(function(){
|
||||
// myPlayer = VideoJS.setup("example_video_1", {
|
||||
// // controlsHiding: true,
|
||||
|
Loading…
Reference in New Issue
Block a user