Browse Source

Fix #76 with video preloading issue

Jay Salvat 10 years ago
parent
commit
3769525664
4 changed files with 12 additions and 4 deletions
  1. 6 2
      dist/vegas.js
  2. 1 1
      dist/vegas.min.js
  3. 0 0
      dist/vegas.min.js.map
  4. 5 1
      src/vegas.js

+ 6 - 2
dist/vegas.js

@@ -1,6 +1,6 @@
 /*!-----------------------------------------------------------------------------
  * Vegas - Fullscreen Backgrounds and Slideshows.
- * v2.1.1 - built 2015-04-08
+ * v2.1.1 - built 2015-04-15
  * Licensed under the MIT License.
  * http://vegas.jaysalvat.com/
  * ----------------------------------------------------------------------------
@@ -201,7 +201,11 @@
 
                 if (this.settings.preload || this.settings.preloadVideos) {
                     if (this.support.video && this.settings.slides[i].video) {
-                        video = this._video(this.settings.slides[i].video);
+                        if (this.settings.slides[i].video instanceof Array) {
+                            video = this._video(this.settings.slides[i].video);
+                        } else {
+                            video = this._video(this.settings.slides[i].video.src);
+                        }
                     }
                 }
             }

File diff suppressed because it is too large
+ 1 - 1
dist/vegas.min.js


File diff suppressed because it is too large
+ 0 - 0
dist/vegas.min.js.map


+ 5 - 1
src/vegas.js

@@ -192,7 +192,11 @@
 
                 if (this.settings.preload || this.settings.preloadVideos) {
                     if (this.support.video && this.settings.slides[i].video) {
-                        video = this._video(this.settings.slides[i].video);
+                        if (this.settings.slides[i].video instanceof Array) {
+                            video = this._video(this.settings.slides[i].video);
+                        } else {
+                            video = this._video(this.settings.slides[i].video.src);
+                        }
                     }
                 }
             }

Some files were not shown because too many files changed in this diff