Skip to content

Commit

Permalink
Changed MediaViewer.swf so it now accepts info about the appearance o…
Browse files Browse the repository at this point in the history
…f captions from xwd as well as the timed transcript file.

Added 6 new optional attributes to xwd to control media caption timing/positioning/appearance etc.

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@944 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
FayCross committed May 23, 2013
1 parent 6381cef commit ef65b6b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 7 deletions.
Binary file modified mediaViewer/MediaViewer.swf
Binary file not shown.
4 changes: 3 additions & 1 deletion mediaViewer/media.htm
Expand Up @@ -9,10 +9,12 @@
var mediaFile = str.split(',')[0].split('media=')[1];
var transcriptFile = str.split(',')[1].split('transcript=')[1];
var imageFile = str.split(',')[2].split('img=')[1];
var captionDetails = str.split(',')[3].split('caption=')[1];
var flashvars = {
media: mediaFile,
transcript: transcriptFile,
image: imageFile
image: imageFile,
captions: captionDetails
};
var params = {
menu: "false",
Expand Down
2 changes: 1 addition & 1 deletion mediaViewer/sampleTranscript.xml
Expand Up @@ -2,7 +2,7 @@
<tt>
<head>
<caption timing="previous" position="below"/>
<styling textColour="0x000000" textAlign="left" highlight="false" highlightColour="0xFFFF00"/>
<styling textColour="0x000000" textAlign="left" highlight="true" highlightColour="0xFFFF00"/>
</head>
<body>
<div>
Expand Down
Expand Up @@ -423,7 +423,22 @@ function x_setUp() {
.removeClass("ui-state-focus")
.removeClass("ui-state-hover");

window.open("mediaViewer/media.htm?media=../" + eval(x_params.media) + ",transcript=../" + eval(x_params.mediaTranscript) + ",img=../" + eval(x_params.mediaImage), "_blank", 'MediaViewer', 'height=100,width=100,toolbar=0,menubar=0');
// get info about how to display captions - if none are found the code in the mediaViewer folder will look for details in tt file - otherwise it will use defaults
var captionDetails = "",
nodeNames = ["mediaTiming", "mediaPosition", "mediaAlign", "mediaColour", "mediaHighlight", "mediaHighlightColour"];
for (var i=0; i<nodeNames.length; i++) {
if (x_params[nodeNames[i]] != undefined) {
if (captionDetails != "") {
captionDetails += ";";
}
captionDetails += nodeNames[i] + "=" + x_params[nodeNames[i]];
}
}
if (captionDetails == "") {
captionDetails = undefined;
}

window.open("mediaViewer/media.htm?media=../" + eval(x_params.media) + ",transcript=../" + eval(x_params.mediaTranscript) + ",img=../" + eval(x_params.mediaImage) + ",caption=" + captionDetails, "_blank", 'MediaViewer', 'height=100,width=100,toolbar=0,menubar=0');
});
}

Expand Down
12 changes: 10 additions & 2 deletions modules/xerte/parent_templates/Nottingham/data.xwd
Expand Up @@ -12,9 +12,17 @@
<kblanguage type="ComboBox" options="Chinese,Croation,English,French,German,Italian,Japanese,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" data="Chinese,Croation,English,French,German,Italian,Japanese,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" width="120" label="Keyboard Language" optional="true"/>
<displayMode type="ComboBox" options="default,full screen,fill window" data="default,full screen,fill window" label="Display Mode" width="100"/>
<allpagestitlesize optional="true" type="NumericStepper" min="16" max="30" step="1" label="Page title size" defaultValue="24"/>
<mediaImage optional="true" type="media" label="Media Image"/>

<media optional="true" type="media" label="Media File"/>
<mediaImage optional="true" type="media" label="Media Image"/>
<mediaTranscript optional="true" type="media" label="Media Transcript"/>
<media optional="true" type="media" label="Media File"/>
<mediaTiming optional="true" type="ComboBox" options="Current caption only,Keep previous captions,Show all captions" data="current,previous,all" label="Media Caption Timing" defaultValue="current" width="175"/>
<mediaPosition optional="true" type="ComboBox" options="Below,Right,Subtitle - Top,Subtitle - Bottom" data="below,right,top,bottom" label="Media Caption Position" defaultValue="below" width="175"/>
<mediaAlign optional="true" type="ComboBox" options="Left,Centre,Right" data="left,center,right" label="Media Caption Align" defaultValue="left" width="100"/>
<mediaColour optional="true" type="ColourPicker" label="Media Caption Colour" defaultValue="0x000000"/>
<mediaHighlight optional="true" type="CheckBox" label="Media Caption Highlight" defaultValue="true"/>
<mediaHighlightColour optional="true" type="ColourPicker" label="Media Caption Highlight Colour" defaultValue="0xFFFF00"/>

<menuImageProperties optional="true" type="ComboBox" label="Menu Image Style" options="Use Panel,Full Screen" data="Use Panel,Full Screen" width="100"/>
<menuImage optional="true" type="media" label="Menu Page Image"/>
<ic optional="true" type="media" label="Icon"/>
Expand Down
12 changes: 10 additions & 2 deletions modules/xerte/parent_templates/Nottingham/wizards/en-GB/data.xwd
Expand Up @@ -12,9 +12,17 @@
<kblanguage type="ComboBox" options="Chinese,Croation,English,French,German,Italian,Japanese,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" data="Chinese,Croation,English,French,German,Italian,Japanese,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" width="120" label="Keyboard Language" optional="true"/>
<displayMode type="ComboBox" options="default,full screen,fill window" data="default,full screen,fill window" label="Display Mode" width="100"/>
<allpagestitlesize optional="true" type="NumericStepper" min="16" max="30" step="1" label="Page title size" defaultValue="24"/>
<mediaImage optional="true" type="media" label="Media Image"/>

<media optional="true" type="media" label="Media File"/>
<mediaImage optional="true" type="media" label="Media Image"/>
<mediaTranscript optional="true" type="media" label="Media Transcript"/>
<media optional="true" type="media" label="Media File"/>
<mediaTiming optional="true" type="ComboBox" options="Current caption only,Keep previous captions,Show all captions" data="current,previous,all" label="Media Caption Timing" defaultValue="current" width="175"/>
<mediaPosition optional="true" type="ComboBox" options="Below,Right,Subtitle - Top,Subtitle - Bottom" data="below,right,top,bottom" label="Media Caption Position" defaultValue="below" width="175"/>
<mediaAlign optional="true" type="ComboBox" options="Left,Centre,Right" data="left,center,right" label="Media Caption Align" defaultValue="left" width="100"/>
<mediaColour optional="true" type="ColourPicker" label="Media Caption Colour" defaultValue="0x000000"/>
<mediaHighlight optional="true" type="CheckBox" label="Media Caption Highlight" defaultValue="true"/>
<mediaHighlightColour optional="true" type="ColourPicker" label="Media Caption Highlight Colour" defaultValue="0xFFFF00"/>

<menuImageProperties optional="true" type="ComboBox" label="Menu Image Style" options="Use Panel,Full Screen" data="Use Panel,Full Screen" width="100"/>
<menuImage optional="true" type="media" label="Menu Page Image"/>
<ic optional="true" type="media" label="Icon"/>
Expand Down

0 comments on commit ef65b6b

Please sign in to comment.