Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FLUID-4839: Removing the specialized youtube markup so that media ele…

…ment can take care of youtube videos for us.
  • Loading branch information...
commit 2a38f6e20730b4c2324b53e88ebb14f2dcba1b5d 1 parent c154990
@michelled authored
View
10 css/VideoPlayer.css
@@ -1,5 +1,6 @@
.fl-videoPlayer {
font-family: sans-serif;
+ height: 22.5em;
}
/*
@@ -9,6 +10,7 @@
.fl-videoPlayer-main {
position: relative;
display: inline-block;
+ height: inherit;
}
/*
@@ -17,14 +19,16 @@
.fl-videoPlayer-video {
float: left;
+ height: inherit;
}
.fl-videoPlayer-video-element {
top: 0;
left: 0;
- width: 100%;
- height: 100%;
+ height: inherit;
+ width: 29.75em;
}
+
.fl-videoPlayer-video-element:focus,
.fl-videoPlayer-transcript-element-selected {
outline: solid 3px #3195C7;
@@ -554,7 +558,7 @@ ul.fl-videoPlayer-transcripts-languageList li {
.fl-videoPlayer-overlay {
bottom: 0em;
position: absolute;
- width: 100%;
+ width: 29.75em;
pointer-events: none;
}
.fl-theme-uio-yb .fl-videoPlayer-overlay, .fl-theme-uio-yb .fl-videoPlayer-captionArea, .fl-theme-uio-yb .captionator-cue-canvas,
View
20 demos/VideoPlayer.html
@@ -81,17 +81,17 @@
var videoOptions = {container: ".videoPlayer", options: {
video: {
sources: [
+ // {
+ // src: "videos/ReorganizeFuture/ReorganizeFuture.mp4",
+ // type: "video/mp4"
+ // },
+ // {
+ // src: "videos/ReorganizeFuture/ReorganizeFuture.webm",
+ // type: "video/webm"
+ // },
{
- src: "videos/ReorganizeFuture/ReorganizeFuture.mp4",
- type: "video/mp4"
- },
- {
- src: "videos/ReorganizeFuture/ReorganizeFuture.webm",
- type: "video/webm"
- },
- {
- src: "http://www.youtube.com/v/_VxQEPw1x9E&hl=en&fs=1",
- type: "youtube"
+ src: "http://www.youtube.com/v/_VxQEPw1x9E",
+ type: "video/youtube"
}
],
captions: [
View
33 js/VideoPlayer.js
@@ -548,7 +548,10 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
} else if (key === "videoPlayer") {
that.container.append(res[key].resourceText);
that.refreshView();
- that.locate("video").attr("aria-label", that.options.strings.videoTitlePreface + ": " + that.options.videoTitle);
+ var video = that.locate("video");
+ video.attr("aria-label", that.options.strings.videoTitlePreface + ": " + that.options.videoTitle);
+ video.attr("width", video.css("width"));
+ video.attr("height", video.css("height"));
bindVideoPlayerDOMEvents(that);
//create all the listeners to the model
@@ -599,33 +602,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
}
return ret + min + ":" + sec;
};
-
- // Function which modifies containers and their sizes
- fluid.videoPlayer.resize = function (that) {
- var video = that.locate("video");
- var videoPlayer = that.locate("videoPlayer");
- var overlay = that.locate("overlay");
-
- // Get the video sizes first
- // ToDo: A video wrapper container is used for video scaling. The video width/height are determined by the wrapper container
- // rather then the video itself. This solution needs a re-consideration once we decide on scaling the video through css or
- // API.
-// var videoWidth = video[0].videoWidth;
-// var videoHeight = video[0].videoHeight;
- var videoWidth = video.width();
- var videoHeight = video.height();
-
- // Set height on the controller area. To make overlay to show up exactly at the bottom of the video regardless to UIO settings
- videoPlayer.css({height: videoHeight});
-
- // Set the width of the overlay to be the width of the video, otherwise, the controller bar spreads into transcript area
- overlay.css({width: videoWidth});
-
- // Save the video width/height in the model so they are accessible by the sub-components
- that.model.videoWidth = videoWidth;
- that.model.videoHeight = videoHeight;
- };
-
+
/*********************************************************************************
* Event Binder: *
* Shared by all video player component whenever an event binder component is *
View
9 js/VideoPlayer_media.js
@@ -52,7 +52,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
"video/webm": "fluid.videoPlayer.media.createSourceMarkup.html5SourceTag",
"video/ogg": "fluid.videoPlayer.media.createSourceMarkup.html5SourceTag",
"video/ogv": "fluid.videoPlayer.media.createSourceMarkup.html5SourceTag",
- "youtube": "fluid.videoPlayer.media.createSourceMarkup.youTubePlayer"
+ "video/youtube": "fluid.videoPlayer.media.createSourceMarkup.html5SourceTag"
},
sources: []
});
@@ -63,13 +63,6 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
sourceTag.attr(mediaSource);
videoPlayer.container.append(sourceTag);
return sourceTag;
- },
- youTubePlayer: function (videoPlayer, mediaSource) {
- var placeholder = $("<div/>"),
- id = fluid.allocateSimpleId(placeholder);
- videoPlayer.container.append(placeholder);
- swfobject.embedSWF(mediaSource.src, id, "425", "356", "8");
- return placeholder;
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.