mirror of
https://github.com/videojs/video.js.git
synced 2025-01-02 06:32:07 +02:00
Fixed an offset width bug with IE that was causing player to break.
This commit is contained in:
parent
7b7c8a497f
commit
166bd0b44f
12
src/controls.js
vendored
12
src/controls.js
vendored
@ -409,14 +409,16 @@ _V_.Slider = _V_.Component.extend({
|
||||
// On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later.
|
||||
// var progress = (this.player.scrubbing) ? this.player.values.currentTime / this.player.duration() : this.player.currentTime() / this.player.duration();
|
||||
|
||||
var progress = this.getPercent();
|
||||
var barProgress,
|
||||
progress = this.getPercent();
|
||||
handle = this.handle,
|
||||
bar = this.bar,
|
||||
barProgress = progress;
|
||||
bar = this.bar;
|
||||
|
||||
// Protect against no duration and other division issues
|
||||
if (isNaN(progress)) { progress = 0; }
|
||||
|
||||
barProgress = progress;
|
||||
|
||||
// If there is a handle, we need to account for the handle in our calculation for progress bar
|
||||
// so that it doesn't fall short of or extend past the handle.
|
||||
if (handle) {
|
||||
@ -424,7 +426,8 @@ _V_.Slider = _V_.Component.extend({
|
||||
boxWidth = box.offsetWidth,
|
||||
|
||||
// The width of the handle in percent of the containing box
|
||||
handlePercent = handle.el.offsetWidth / boxWidth,
|
||||
// In IE, widths may not be ready yet causing NaN
|
||||
handlePercent = (handle.el.offsetWidth) ? handle.el.offsetWidth / boxWidth : 0,
|
||||
|
||||
// Get the adjusted size of the box, considering that the handle's center never touches the left or right side.
|
||||
// There is a margin of half the handle's width on both sides.
|
||||
@ -723,6 +726,7 @@ _V_.Poster = _V_.Button.extend({
|
||||
},
|
||||
|
||||
createElement: function(){
|
||||
_V_.log(this.player.options.poster)
|
||||
return this._super("img", {
|
||||
className: "vjs-poster",
|
||||
src: this.player.options.poster,
|
||||
|
@ -68,7 +68,7 @@ VideoJS.options = {
|
||||
|
||||
// Included control sets
|
||||
components: [
|
||||
"poster",
|
||||
// "poster",
|
||||
"loadingSpinner",
|
||||
"bigPlayButton",
|
||||
{ name: "controlBar", options: {
|
||||
|
@ -404,8 +404,6 @@ _V_.flash.prototype.support = {
|
||||
|
||||
_V_.flash.onSWFReady = function(currSwf){
|
||||
|
||||
// _V_.log("swfReady", currSwf)
|
||||
|
||||
var el = _V_.el(currSwf);
|
||||
|
||||
// Get player from box
|
||||
|
Loading…
Reference in New Issue
Block a user