1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-17 10:46:00 +02:00

If there are no sources when the player is initialized, loadTech is called with an undefined source.

It would then error on source.src
This commit is contained in:
Raymond Cohen 2012-01-12 16:56:38 -05:00
parent f9c1905840
commit 2d8f283680

View File

@ -199,11 +199,11 @@ _V_.Player = _V_.Component.extend({
// Grab tech-specific options from player options and add source and parent element to use.
var techOptions = _V_.merge({ source: source, parentEl: this.el }, this.options[techName])
if (source.src == this.values.src && this.values.currentTime > 0) {
techOptions.startTime = this.values.currentTime;
}
if (source) {
if (source.src == this.values.src && this.values.currentTime > 0) {
techOptions.startTime = this.values.currentTime;
}
this.values.src = source.src;
}