Skip to content

Commit

Permalink
MDL-67383 media_videojs: Upgrade VideoJS and plugins to latest version
Browse files Browse the repository at this point in the history
Upgrade VideoJS (7.7.6), Youtube Playback for VideoJS (2.6.1), Flash Tech for VideoJS (2.2.1), Flash Player for VideoJS (5.4.2)
  • Loading branch information
Mihail Geshoski authored and andrewnicols committed May 6, 2020
1 parent 788dfb9 commit 9632fde
Show file tree
Hide file tree
Showing 25 changed files with 5,410 additions and 3,313 deletions.
2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/Youtube-lazy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/Youtube-lazy.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/video-lazy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/video-lazy.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/videojs-flash-lazy.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions media/player/videojs/amd/src/Youtube-lazy.js
@@ -1,13 +1,17 @@
/* The MIT License (MIT)
Copyright (c) 2014-2015 Benoit Tremblay <trembl.ben@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down Expand Up @@ -363,7 +367,7 @@ THE SOFTWARE. */
options.startSeconds = this.options_.start;
}
if (this.options_.end) {
options.endEnd = this.options_.end;
options.endSeconds = this.options_.end;
}
this.ytPlayer.loadVideoById(options);
},
Expand All @@ -376,7 +380,7 @@ THE SOFTWARE. */
options.startSeconds = this.options_.start;
}
if (this.options_.end) {
options.endEnd = this.options_.end;
options.endSeconds = this.options_.end;
}
this.ytPlayer.cueVideoById(options);
},
Expand Down Expand Up @@ -736,6 +740,11 @@ THE SOFTWARE. */
var loaded = false;
var tag = document.createElement('script');
var firstScriptTag = document.getElementsByTagName('script')[0];
if (!firstScriptTag) {
// when loaded in jest without jsdom setup it doesn't get any element.
// In jest it doesn't really make sense to do anything, because no one is watching youtube in jest
return;
}
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
tag.onload = function () {
if (!loaded) {
Expand Down Expand Up @@ -786,4 +795,4 @@ THE SOFTWARE. */
} else {
videojs.registerComponent('Youtube', Youtube);
}
}));
}));

0 comments on commit 9632fde

Please sign in to comment.