Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
Added check for captions as a plugin in flash per #93
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Miller committed Mar 24, 2014
1 parent afb6914 commit 73a1e01
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/js/custom/videosEmbeddedOrLinkedNeedCaptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ quail.videosEmbeddedOrLinkedNeedCaptions = function() {
if (isVideo) {
var hasCaptions = false;
$object.find('param[name=flashvars]').each(function() {
if ($(this).attr('value').search('captions') > -1 &&
$(this).attr('value').search('.srt') > -1) {
if (($(this).attr('value').search('captions') > -1 &&
$(this).attr('value').search('.srt') > -1) ||
$(this).attr('value').search('captions.pluginmode') > -1) {
hasCaptions = true;
}
});
Expand Down
14 changes: 12 additions & 2 deletions test/accessibility-tests/videosEmbeddedOrLinkedNeedCaptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
</video>
</div>

<div class="quail-tets" data-expected="pass" data-accessibility-test="videosEmbeddedOrLinkedNeedCaptions" title="Flash with caption plugin">
<object id="movie-contentblock-0120192e-2452-4d96-9ba7-8a004d1415bf" width="100%" height="100%" type="application/x-shockwave-flash" data="/behaviour/flash/govvid-v2-mediaplayer.swf" bgcolor="#000000" name="movie-contentblock-0120192e-2452-4d96-9ba7-8a004d1415bf" tabindex="0">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="seamlesstabbing" value="true">
<param name="wmode" value="opaque">
<param name="flashvars" value="netstreambasepath=http%3A%2F%2Fwww.rijksoverheid.nl%2Fdocumenten-en-publicaties%2Fvideos%2F2014%2F01%2F24%2Fpersconferentie-na-ministerraad-24-januari-2014.html&id=movie-contentblock-0120192e-2452-4d96-9ba7-8a004d1415bf&className=govvid&file=http%3A%2F%2Fserver.rijksoverheidsvideo.nl%2Fflash%2FMP-240114-5081.flv&image=http%3A%2F%2Fserver.rijksoverheidsvideo.nl%2Ffoto%2FMP-240114-5081.jpg&skin=%2Fbehaviour%2Fflash%2Fgovvid-v2-skin-video.zip&stretching=exactfit&plugins=http%3A%2F%2Fwww.rijksoverheid.nl%2Fbehaviour%2Fflash%2Fcaptions.swf%2Chttp%3A%2F%2Fwww.rijksoverheid.nl%2Fbehaviour%2Fflash%2Faudiodescription.swf&captions.file=http%3A%2F%2Fserver.rijksoverheidsvideo.nl%2Fondertiteling%2FMP-240114-5081.srt&captions.state=false&captions.fontsize=16&captions.pluginmode=FLASH&audiodescription.file=http%3A%2F%2Fserver.rijksoverheidsvideo.nl%2Faudio%2FMP-240114-5081.mp3&audiodescription.state=false&audiodescription.pluginmode=FLASH&controlbar.position=bottom&playlist.position=none&dock=false">
</object>
</div>

<div class="quail-test" data-expected="fail" data-accessibility-test="videosEmbeddedOrLinkedNeedCaptions" lang="fr" title="Subtitle not matching language">

<video controls class="quail-failed-element">
Expand All @@ -32,7 +42,7 @@
</video>
</div>

<div class="quail-test limit-chrome" data-expected="fail" data-accessibility-test="videosEmbeddedOrLinkedNeedCaptions" title="Object with no subtitles">
<div class="quail-test limit-chrome" data-expected="pass" data-accessibility-test="videosEmbeddedOrLinkedNeedCaptions" title="Object with no subtitles">
<object id="movie-contentblock-0120192e-2452-4d96-9ba7-8a004d1415bf" width="100%" height="100%" type="application/x-shockwave-flash" data="/behaviour/flash/govvid-v2-mediaplayer.swf" bgcolor="#000000" name="movie-contentblock-0120192e-2452-4d96-9ba7-8a004d1415bf" tabindex="0" class="quail-failed-element">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
Expand Down Expand Up @@ -71,4 +81,4 @@
</div>
<script src="../testrunner.js"></script>
</body>
</html>
</html>

0 comments on commit 73a1e01

Please sign in to comment.