1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-03 00:57:02 +02:00

@mmcc fixed an issue where errors on source tags could get missed. closes #1575

This commit is contained in:
Matthew McClure
2014-10-28 11:00:49 -07:00
committed by Steve Heffernan
parent 906de96632
commit b8cc047a2e
4 changed files with 11 additions and 3 deletions

View File

@ -32,8 +32,11 @@ vjs.Html5 = vjs.MediaTechController.extend({
var source = options['source'];
// set the source if one was provided
if (source && this.el_.currentSrc !== source.src) {
// Set the source if one is provided
// 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)
// 2) Check to see if the network state of the tag was failed at init, and if so, reset the source
// anyway so the error gets fired.
if (source && (this.el_.currentSrc !== source.src) || (player.tag && player.tag.initNetworkState_ === 3)) {
this.el_.src = source.src;
}