Skip to content

Commit

Permalink
Merge branch 'demo' into FLUID-4570
Browse files Browse the repository at this point in the history
Conflicts:
	js/VideoPlayer.js
  • Loading branch information
anvk committed Feb 27, 2012
2 parents 7aaeb0e + c40a4a5 commit b0aff7d
Show file tree
Hide file tree
Showing 68 changed files with 42,997 additions and 4,472 deletions.
31 changes: 24 additions & 7 deletions js/VideoPlayer.js
Expand Up @@ -171,7 +171,8 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
},
events: {
onCurrentTranscriptChanged: "{videoPlayer}.events.onCurrentTranscriptChanged",
onHideTranscript: "{videoPlayer}.events.onHideTranscript",
onTranscriptHide: "{videoPlayer}.events.onTranscriptHide",
onTranscriptShow: "{videoPlayer}.events.onTranscriptShow",
onTranscriptElementChange: "{videoPlayer}.events.onTranscriptElementChange"
}
}
Expand Down Expand Up @@ -214,7 +215,8 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
onOldBrowserDetected: null,
onTemplateLoadError: null,
onCurrentTranscriptChanged: null,
onHideTranscript: null,
onTranscriptHide: null,
onTranscriptShow: null,
onTranscriptElementChange: null,
onReady: null,

Expand All @@ -228,7 +230,9 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
onHTML5BrowserDetected: null
},
listeners: {
onViewReady: "{videoPlayer}.fullscreen"
onViewReady: "{videoPlayer}.fullscreen",
onTranscriptShow: "{videoPlayer}.fullscreen",
onTranscriptHide: "{videoPlayer}.fullscreen"
},
selectors: {
videoContainer: ".flc-videoPlayer-videoContainer",
Expand Down Expand Up @@ -402,6 +406,11 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt

fluid.videoPlayer.preInit = function (that) {

/**
* Adjust the sizes of various video player containers according to these factors:
* 1. on/off of "full screen"
* 2. show/hide of the transcript
*/
that.fullscreen = function () {
var videoContainer = that.locate("videoContainer");
var video = that.locate("video");
Expand All @@ -423,7 +432,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
////
// This MUST be fixed!
//
// Line 549 should not be on the first place but we still keep it to make transcripts render properly
// Line 563 should not be on the first place but we still keep it to make transcripts render properly
// This whole block of code must be moved somewhere else
////

Expand All @@ -440,11 +449,16 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt

that.locate("transcript").css("height", videoControllersContainer.height());

var transcriptWidth = that.locate("transcript").width();
if (!that.model.displayTranscripts) {
transcriptWidth = 0;
}

// ToDo: A hacky way by adding 3px onto the videoPlayer full container width,
// otherwise, the transcript area gets showed up underneath the controller bar.
// Need a better solution.
that.container.css({
width: videoWidth + that.locate("transcript").width() + 3,
width: videoWidth + transcriptWidth + 3,
height: videoControllersContainer.height()
});
}
Expand Down Expand Up @@ -602,7 +616,10 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
options: {
listeners: {
"{videoPlayer}.events.onCurrentTranscriptChanged": "{controllers}.transcriptControls.menu.activate",
"{videoPlayer}.events.onHideTranscript": "{controllers}.transcriptControls.menu.requestShowHide"
"{videoPlayer}.events.onTranscriptHide": {
listener: "{controllers}.transcriptControls.menu.requestShowHide",
args: [false]
}
}
}
});
Expand All @@ -612,7 +629,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
options: {
listeners: {
"{videoPlayer}.events.onCurrentTranscriptChanged": null,
"{videoPlayer}.events.onHideTranscript": null
"{videoPlayer}.events.onTranscriptHide": null
}
}
});
Expand Down
16 changes: 6 additions & 10 deletions js/VideoPlayer_transcript.js
Expand Up @@ -38,13 +38,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
},
transcriptEventBinder: {
type: "fluid.videoPlayer.eventBinder",
createOnEvent: "onReady",
options: {
events: {
onCurrentTranscriptChanged: "{transcript}.events.onCurrentTranscriptChanged",
onHideTranscript: "{transcript}.events.onHideTranscript"
}
}
createOnEvent: "onReady"
}
},
events: {
Expand All @@ -54,7 +48,8 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
onLoadTranscriptError: null,
onIntervalChange: null,
onCurrentTranscriptChanged: null,
onHideTranscript: null,
onTranscriptHide: null,
onTranscriptShow: null,
onTranscriptElementChange: null,
onReady: null
},
Expand Down Expand Up @@ -99,8 +94,10 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
fluid.videoPlayer.transcript.switchTranscriptArea = function (that) {
if (that.model.displayTranscripts) {
fluid.videoPlayer.transcript.showTranscriptArea(that);
that.events.onTranscriptShow.fire();
} else {
fluid.videoPlayer.transcript.hideTranscriptArea(that);
that.events.onTranscriptHide.fire();
}
};

Expand Down Expand Up @@ -267,7 +264,6 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
fluid.videoPlayer.transcript.bindTranscriptDOMEvents = function (that) {
that.locate("closeButton").click(function () {
that.applier.requestChange("displayTranscripts", false);
that.events.onHideTranscript.fire(false);
});
};

Expand All @@ -284,7 +280,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
that.locate("langaugeDropdown").find("option:selected").removeAttr("selected");
that.locate("langaugeDropdown").find("option[value='" + currentTranscriptIndex + "']").attr("selected", "selected");

that.transcriptEventBinder.events.onCurrentTranscriptChanged.fire(currentTranscriptIndex);
that.events.onCurrentTranscriptChanged.fire(currentTranscriptIndex);
});

that.events.onTranscriptsLoaded.addListener(function (intervalList) {
Expand Down
30,681 changes: 30,672 additions & 9 deletions lib/infusion/MyInfusion.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/infusion/README.txt
@@ -1,4 +1,4 @@
MyInfusion was built from an unreleased version of Infusion (1e7f0d8f071a69ef5d9cd75e18fc0fe3da170622) using the following command:
MyInfusion was built from an unreleased version of Infusion (6e8a974c333a35b254cda610290efec7b32a4a3b) using the following command:

Build the minified Infusion:
ant customBuild -Dinclude="uiOptions, uploader, tooltip" -lib lib/rhino
Expand Down
@@ -1 +1,3 @@
.fl-tableOfContents-hide-bullet{list-style-type:none;}
.fl-tableOfContents-hide-bullet {
list-style-type: none;
}
47 changes: 40 additions & 7 deletions lib/infusion/components/uiOptions/css/FatPanelUIOptions.css
@@ -1,7 +1,40 @@
.fl-uiOptions-fatPanel .fl-panelBar{width:100%;height:5px;background-color:#fff;border-bottom:1px solid #ccc;}
.fl-uiOptions-fatPanel .fl-toggleButton{float:right;text-transform:uppercase;font-weight:bold;border:0;background-color:white;padding:5px;margin-right:10px;border-radius:8px;border-bottom:1px solid #ccc;}
.fl-uiOptions-fatPanel-iframe{border:0;background-color:#fff;height:0;display:block;}
.fl-theme-bw .fl-uiOptions-fatPanel .fl-panelBar,.fl-theme-bw .fl-uiOptions-fatPanel .fl-toggleButton{background-color:#fff;border-color:#000;}
.fl-theme-wb .fl-uiOptions-fatPanel .fl-panelBar,.fl-theme-wb .fl-uiOptions-fatPanel .fl-toggleButton{background-color:#000;border-color:#fff;color:#fff;}
.fl-theme-by .fl-uiOptions-fatPanel .fl-panelBar,.fl-theme-by .fl-uiOptions-fatPanel .fl-toggleButton{background-color:#FF0;border-color:#000;}
.fl-theme-yb .fl-uiOptions-fatPanel .fl-panelBar,.fl-theme-yb .fl-uiOptions-fatPanel .fl-toggleButton{background-color:#000;border-color:#ff0;color:#ff0;}
/* Top bar and show/hide button */
.fl-uiOptions-fatPanel .fl-panelBar {
width: 100%;
height: 5px;
background-color: #fff;
border-bottom: 1px solid #ccc;
}

.fl-uiOptions-fatPanel .fl-toggleButton {
float:right;
text-transform: uppercase;
font-weight: bold;
border: 0px;
background-color: white;
padding: 5px;
margin-right: 10px;
border-radius: 8px;
border-bottom: 1px solid #ccc;
}

/* IFrame */
.fl-uiOptions-fatPanel-iframe {
border: 0;
background-color: #fff;
height: 0px;
display: block;
}

/* Theming */
.fl-theme-bw .fl-uiOptions-fatPanel .fl-panelBar,
.fl-theme-bw .fl-uiOptions-fatPanel .fl-toggleButton { background-color: #fff; border-color: #000; }

.fl-theme-wb .fl-uiOptions-fatPanel .fl-panelBar,
.fl-theme-wb .fl-uiOptions-fatPanel .fl-toggleButton { background-color: #000; border-color: #fff; color: #fff; }

.fl-theme-by .fl-uiOptions-fatPanel .fl-panelBar,
.fl-theme-by .fl-uiOptions-fatPanel .fl-toggleButton { background-color: #FFFF00; border-color: #000; }

.fl-theme-yb .fl-uiOptions-fatPanel .fl-panelBar,
.fl-theme-yb .fl-uiOptions-fatPanel .fl-toggleButton { background-color: #000; border-color: #ffff00; color: #ffff00 }

0 comments on commit b0aff7d

Please sign in to comment.