forked from fluid-project/videoPlayer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FLUID-4812: Don't automatically display transcripts if choice of tran…
…script hasn't changed.
- Loading branch information
Showing
7 changed files
with
212 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>Video Player Transcript Integration Test Suite</title> | ||
|
||
<link rel="stylesheet" type="text/css" media="screen" href="../lib/qunit/css/qunit.css" /> | ||
|
||
<script type="text/javascript" src="../../lib/infusion/MyInfusion.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer_framework.js"></script> | ||
<script type="text/javascript" src="../../lib/jquery-ui/js/jquery.ui.button.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer_html5Captionator.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer_controllers.js"></script> | ||
<script type="text/javascript" src="../../js/ToggleButton.js"></script> | ||
<script type="text/javascript" src="../../js/MenuButton.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer_media.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer_transcript.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer_intervalEventsConductor.js"></script> | ||
<script type="text/javascript" src="../../js/HTML5-backcompat.js"></script> | ||
<script type="text/javascript" src="../../js/VideoPlayer_uiOptions.js"></script> | ||
|
||
<!-- jqUnit test framework js files --> | ||
<script type="text/javascript" src="../lib/qunit/js/qunit.js"></script> | ||
<script type="text/javascript" src="../lib/jqUnit/js/jqUnit.js"></script> | ||
|
||
<!-- These are tests that have been written using this page as data and test supports --> | ||
<script type="text/javascript" src="../js/TestUtils.js"></script> | ||
<script type="text/javascript" src="../js/VideoPlayerTranscriptIntegrationTests.js"></script> | ||
|
||
<!-- Utils --> | ||
<script type="text/javascript" src="../../lib/captionator/js/captionator.js"></script> | ||
|
||
</head> | ||
<body id="body"> | ||
<script> | ||
var fluid = fluid || {}; | ||
fluid.registerNamespace("fluid.videoPlayer"); | ||
fluid.videoPlayer.testPageEnhancer = fluid.pageEnhancer({ | ||
tocTemplate: "../../lib/infusion/components/tableOfContents/html/TableOfContents.html" | ||
}); | ||
</script> | ||
|
||
<div class="flc-uiOptions fl-uiOptions-fatPanel"> | ||
<div class="flc-slidingPanel-panel flc-uiOptions-iframe"></div> | ||
<div class="fl-panelBar"> | ||
<button class="flc-slidingPanel-toggleButton fl-toggleButton">Show/Hide</button> | ||
</div> | ||
</div> | ||
<div class="flc-toc-tocContainer"> </div> | ||
|
||
<!-- This is the markup that jqUnit will look for when running tests and displaying the results --> | ||
<h1 id="qunit-header">Video Player Transcript Integration Test Suite</h1> | ||
<h2 id="qunit-banner"></h2> | ||
<div id="qunit-testrunner-toolbar"></div> | ||
<h2 id="qunit-userAgent"></h2> | ||
<ol id="qunit-tests"></ol> | ||
<div id="qunit-fixture"> | ||
|
||
<div class="videoPlayer-transcript fl-videoPlayer"></div> | ||
|
||
</div> <!-- /main --> | ||
|
||
<script> | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Copyright 2012 OCAD University | ||
Licensed under the Educational Community License (ECL), Version 2.0 or the New | ||
BSD license. You may not use this file except in compliance with one these | ||
Licenses. | ||
You may obtain a copy of the ECL 2.0 License and BSD License at | ||
https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt | ||
*/ | ||
|
||
// Declare dependencies | ||
/*global fluid, jqUnit, jQuery, start*/ | ||
|
||
// JSLint options | ||
/*jslint white: true, funcinvoke: true, undef: true, newcap: true, nomen: true, regexp: true, bitwise: true, browser: true, forin: true, maxerr: 100, indent: 4 */ | ||
|
||
(function ($) { | ||
$(document).ready(function () { | ||
|
||
var uiOptions = fluid.uiOptions.fatPanel.withMediaPanel(".flc-uiOptions", { | ||
prefix: "../../lib/infusion/components/uiOptions/html/", | ||
components: { | ||
relay: { | ||
type: "fluid.videoPlayer.relay" | ||
} | ||
}, | ||
templateLoader: { | ||
options: { | ||
templates: { | ||
mediaControls: "../../html/UIOptionsTemplate-media.html" | ||
} | ||
} | ||
} | ||
}); | ||
|
||
var videoPlayerTranscriptIntegrationTests = new jqUnit.TestCase("Video Player Transcript Integration Tests"); | ||
|
||
videoPlayerTranscriptIntegrationTests.asyncTest("FLUID-4812: Transcripts showing on UIO reset", function () { | ||
jqUnit.expect(2); | ||
var instance = { | ||
container: ".videoPlayer-transcript", | ||
options: { | ||
templates: { | ||
videoPlayer: { | ||
href: "../../html/videoPlayer_template.html" | ||
} | ||
}, | ||
listeners: { | ||
onReady: function (that) { | ||
jqUnit.notVisible("Before UIO reset, transcripts are not visible", $(".flc-videoPlayer-transcriptArea")); | ||
uiOptions.uiOptionsLoader.uiOptions.events.onUIOptionsRefresh.addListener(function () { | ||
jqUnit.notVisible("After UIO reset, transcripts are not visible", $(".flc-videoPlayer-transcriptArea")); | ||
start(); | ||
}); | ||
uiOptions.uiOptionsLoader.uiOptions.reset(); | ||
} | ||
} | ||
} | ||
}; | ||
var vp = fluid.testUtils.initEnhancedVideoPlayer(instance, uiOptions.relay); | ||
}); | ||
|
||
}); | ||
})(jQuery); |