]> _ Git - fluidbook-html5.git/commitdiff
Fix JS error when no videos present #897 @0:20
authorStephen Cameron <stephen@cubedesigners.com>
Tue, 6 Jun 2017 08:41:10 +0000 (10:41 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Tue, 6 Jun 2017 08:41:10 +0000 (10:41 +0200)
js/libs/fluidbook/fluidbook.video.js

index 5657ecde025d6d938b165fc2fafb624e07b83996..1a81ae6f80637e4b0f4b3889d18f4b87cf7c2b7e 100644 (file)
@@ -353,7 +353,7 @@ FluidbookVideo.prototype = {
        getActivePlayers: function() {
                var players = [];
 
-               if (Object.keys(videojs.players).length > 0) {
+               if (typeof(videojs) !== "undefined" && Object.keys(videojs.players).length > 0) {
                        for(var id in videojs.players) {
                                // When videoJS disposes a player, the ID isn't removed
                                // from the list of players but the value will be null