Skip to content

Commit

Permalink
FLUID-4608-merge: Fixed inArray conditions for html5Captionator
Browse files Browse the repository at this point in the history
  • Loading branch information
anvk committed Feb 21, 2012
1 parent 4f0b37d commit 500d4ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/VideoPlayer_html5Captionator.js
Expand Up @@ -57,7 +57,7 @@ https://source.fluidproject.org/svn/LICENSE.txt
// show captions depending on which one is on in the model
fluid.videoPlayer.html5Captionator.showCurrentTrack = function (currentCaptions, tracks, captionSources) {
fluid.each(captionSources, function (element, key) {
tracks[key].mode = captionator.TextTrack[!($.inArray(key, currentCaptions)) ? "SHOWING" : "OFF"];
tracks[key].mode = captionator.TextTrack[$.inArray(key, currentCaptions) === -1 ? "OFF" : "SHOWING"];
});
};

Expand Down Expand Up @@ -105,7 +105,7 @@ https://source.fluidproject.org/svn/LICENSE.txt
var trackTag = $("<track />");
var attributes = fluid.filterKeys(fluid.copy(element), ["kind", "src", "type", "srclang", "label"], false);

if (!($.inArray(key, fluid.get(that.model, elPaths.currentCaptions)))) {
if ($.inArray(key, fluid.get(that.model, elPaths.currentCaptions)) !== -1) {
attributes.default = "true";
}
trackTag.attr(attributes);
Expand Down

0 comments on commit 500d4ae

Please sign in to comment.