Skip to content
Browse files

first commit

  • Loading branch information...
0 parents commit 67faa97832143e2561900b8deb4cb75a9ce7296e @maccman committed May 25, 2010
3 .gitignore
@@ -0,0 +1,3 @@
+examples
+server.py
+media/FlareVideo.swf
20 MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2009 Made by Many Limited and Alexander MacCaw
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
147 README.markdown
@@ -0,0 +1,147 @@
+
+###Features
+
+ * HTML5 video with Flash fallback
+ * Easy CSS/JS/HTML customization and theming
+ * Full screen support
+ * Completely open source and free for commercial use
+
+###Formats
+
+Format supported depends on your browser.
+
+ - All browsers: MP4, FLV
+ - Firefox: Ogg
+ - Safari: MP4, MOV
+
+###Browser support
+
+ * Safari
+ * Firefox
+ * IE 7 >=
+
+###Examples
+
+ jQuery(function($){
+ var fv = $("#video").flareVideo();
+ fv.load([
+ {
+ src: 'http://your/site.mp4',
+ type: 'video/mp4'
+ },
+ ]);
+ });
+
+###Requirements
+
+* [jQuery](http://jquery.com)
+* [jquery.flash.js](http://jquery.lukelutman.com/plugins/flash)
+* [jquery.ui.slider](http://jqueryui.com)
+
+###Usage
+
+To use, you need to include all the required JavaScript libraries (above), and then flarevideo.js.
+You then need to include flarevideo.css, and a theme - such as flarevideo.default.css.
+Once that is sorted you may need to fix the path to the images in the CSS files, and the path to the swf (flashSrc option).
+
+Then, just follow the examples or API below.
+
+###API
+
+New FlareVideo. Options:
+
+ * autoplay
+ * width
+ * height
+ * poster (src to poster image)
+ * preload
+ * autobuffer
+ * keyShortcut (add listeners for space/escape key events)
+ * flashSrc (path to flash file)
+ * useNative
+
+Called on a jQuery element.
+
+ jQuery.flareVideo(options);
+
+Load sources:
+e.g.
+ flareVideo.load([{
+ src: 'video.mp4',
+ type: 'video/mp4'
+ }]);
+
+ FlareVideo#load(sources)
+
+Self explanatory:
+
+ FlareVideo#play
+ FlareVideo#pause
+ FlareVideo#stop
+ FlareVideo#togglePlay
+ FlareVideo#fullScreen(state = true)
+ FlareVideo#toggleFullScreen
+
+Seek to position in video
+
+ FlareVideo#seek(position)
+
+Set video volume, number between 0.0 and 1.0
+
+ FlareVideo#setVolume(volume)
+
+Remove video from the DOM
+
+ FlareVideo#remove
+
+##Events
+
+Add callback for when FlareVideo is setup
+
+ FlareVideo#ready(func)
+
+Bind callback to event
+
+ FlareVideo#bind(name, callback)
+
+Bind single callback to event
+
+ FlareVideo#one(name, callback)
+
+Event types:
+
+ * click
+ * dblclick
+ * onerror
+ * onloadeddata
+ * oncanplay
+ * ondurationchange
+ * ontimeupdate
+ * onpause
+ * onplay
+ * onended
+ * onvolumechange
+
+You can also access the events on the FlareVideo instance. e.g.
+
+ FlareVideo#onplay(callback)
+
+###Theming
+
+Take a look at flarevideo.default.css and flarevideo.spotify.css for tips.
+
+You'll need to style both the input range element, and the jQuery UI slider fallback.
+
+When the video player is idle, a class of idle will be added to it. You can hide the controls using that class.
+
+When the video player is playing, a class of playing will be added to it.
+
+The state of the video player is available under the data-state attribute.
+
+###Flash
+
+Flash is, by default, a fallback when HTML5 video is not supported.
+
+If you pass a relative path as a video file src, Flash will take that relative path from the SWF.
+
+If the video source path you pass is on a separate domain, you will need to set up a [crossdomain.xml](http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html) file.
5 TODO
@@ -0,0 +1,5 @@
+TODO
+ * IE support
+ * Flash full screen
+ * Flash full screen controls
+ * Fix seek jump on Firefox
BIN images/bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/default/full-screen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/default/pause.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/default/play.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/default/slider-thumb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/default/vol-max.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/default/vol-min.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/default/volume-thumb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/spotify/pause.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/spotify/play.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/spotify/thumb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/spotify/vol-max.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/vimeo/full-screen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/vimeo/pause.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/vimeo/play.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 index.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Flare Video</title>
+ <link rel="stylesheet" href="stylesheets/flarevideo.css" type="text/css">
+ <link rel="stylesheet" href="stylesheets/flarevideo.default.css" type="text/css">
+ <script src="javascripts/jquery.js" type="text/javascript"></script>
+ <script src="javascripts/jquery.ui.slider.js" type="text/javascript"></script>
+ <script src="javascripts/jquery.flash.js" type="text/javascript"></script>
+ <script src="javascripts/flarevideo.js" type="text/javascript"></script>
+ <script type="text/javascript" charset="utf-8">
+ jQuery(function($){
+ fv = $("#video").flareVideo();
+ fv.load([
+ {
+ src: 'http://flarevideo.s3.amazonaws.com/stylo.mp4',
+ type: 'video/mp4'
+ }
+ ]);
+ })
+ </script>
+ <style type="text/css" media="screen">
+ body {
+ background: #27282C url(images/bg.png) repeat;
+ }
+
+ #video {
+ -webkit-box-shadow: 0 0 20px #000;
+ -moz-box-shadow: 0 0 20px #000;
+ width: 900px;
+ height: 500px;
+ overflow: none;
+ margin: 5% auto;
+ }
+ </style>
+</head>
+<body>
+ <div id="video"></div>
+</body>
+</html>
646 javascripts/flarevideo.js
@@ -0,0 +1,646 @@
+(function($){
+
+var idleEvents = "mousemove keydown DOMMouseScroll mousewheel mousedown reset.idle";
+$.fn.idleTimer = function(options){
+ options = options || {};
+ var element = $(this);
+
+ var idle = false;
+ var timeout = options.timeout || 4000; // 3 seconds
+ var interval = options.interval || 1000; // 1 second
+ var timeFromLastEvent = 0;
+
+ var reset = function(){
+ if (idle) element.trigger("idle", false);
+ idle = false;
+ timeFromLastEvent = 0;
+ };
+ var check = function(){
+ if (timeFromLastEvent >= timeout) {
+ reset();
+ idle = true;
+ element.trigger("idle", true);
+ } else {
+ timeFromLastEvent += interval;
+ }
+ };
+
+ element.bind(idleEvents, reset);
+ var loop = setInterval(check, interval);
+ element.unload(function(){
+ clearInterval(loop);
+ });
+};
+
+var testVideoElement = $("<video />")[0];
+var nativeSupport = (typeof testVideoElement.canPlayType != 'undefined');
+var nativeFullScreenSupport = (typeof testVideoElement.webkitEnterFullScreen != 'undefined');
+
+// webkitEnterFullScreen fails under Chrome at the moment
+if (navigator.userAgent.match('Chrome')) nativeFullScreenSupport = false;
+
+var testRangeElement = $("<input type='range' />")[0];
+var nativeRangeSupport = (typeof testRangeElement.max != 'undefined');
+
+var defaults = {
+ autoplay: false,
+ controls: false,
+ preload: "auto",
+ poster: null,
+ srcs: [],
+ keyShortcut: true,
+ flashSrc: "media/FlareVideo.swf"
+};
+
+defaults.useNative = nativeSupport;
+defaults.useNativeFullScreen = nativeFullScreenSupport;
+
+var FlareVideo = function(parent, options){
+ this._class = FlareVideo;
+
+ this.parent = parent;
+ this.options = $.extend({}, defaults, options);
+ this.sources = this.options.srcs || this.options.sources;
+ this.useNative = this.options.useNative;
+ // Only use full screen on HTML 5 atm
+ this.options.useFullScreen = !!this.useNative;
+
+ this.state = null;
+ this.canPlay = false;
+ this.inFullScreen = false;
+ this.loaded = false;
+ this.readyList = [];
+
+ this.setupElement();
+
+ if (this.options.useNative) {
+ this.setupNative();
+ } else {
+ this.setupFlash();
+ }
+
+ this.ready($.proxy(function(){
+ this.setupEvents();
+ this.setupControls();
+ this.change("initial");
+ this.load();
+
+ this.element.idleTimer();
+ this.element.bind("idle", $.proxy(this.idle, this));
+ this.element.bind("state.fv", $.proxy(function(){
+ this.element.trigger("reset.idle");
+ }, this))
+ }, this));
+};
+
+FlareVideo.fn = FlareVideo.prototype;
+
+// Public methods
+
+FlareVideo.fn.ready = function(callback){
+ this.readyList.push(callback);
+ if (this.loaded) callback.call(this);
+};
+
+FlareVideo.fn.load = function(srcs){
+ if (srcs)
+ this.sources = srcs;
+
+ if (typeof this.sources == "string")
+ this.sources = {src:this.sources};
+
+ if (!$.isArray(this.sources))
+ this.sources = [this.sources];
+
+ this.ready(function(){
+ this.change("loading");
+ this.video.loadSources(this.sources);
+ });
+};
+
+FlareVideo.fn.play = function(){
+ this.video.play();
+};
+
+FlareVideo.fn.pause = function(){
+ this.video.pause();
+};
+
+FlareVideo.fn.stop = function(){
+ this.seek(0);
+ this.pause();
+};
+
+FlareVideo.fn.togglePlay = function(){
+ if (this.state == "playing") {
+ this.pause();
+ } else {
+ this.play();
+ }
+};
+
+FlareVideo.fn.fullScreen = function(state){
+ if (typeof state == "undefined") state = true;
+ this.inFullScreen = state;
+ if (this.options.useNativeFullScreen) {
+ this.video[state ? "enterFullScreen" : "exitFullScreen"]();
+ } else {
+ (state ? $("body") : this.parent).prepend(this.element);
+ this.element[state ? "addClass" : "removeClass"]("fullScreen");
+ }
+};
+
+FlareVideo.fn.toggleFullScreen = function(){
+ this.fullScreen(!this.inFullScreen);
+};
+
+FlareVideo.fn.seek = function(offset){
+ this.video.setCurrentTime(offset);
+}
+
+FlareVideo.fn.setVolume = function(num){
+ this.video.setVolume(num);
+};
+
+FlareVideo.fn.getVolume = function(){
+ return this.video.getVolume();
+};
+
+FlareVideo.fn.mute = function(state){
+ if (typeof state == "undefined") state = true;
+ this.setVolume(state ? 1 : 0);
+};
+
+FlareVideo.fn.remove = function(){
+ this.element.remove();
+};
+
+FlareVideo.fn.bind = function(){
+ this.videoElement.bind.apply(this.videoElement, arguments);
+};
+
+FlareVideo.fn.one = function(){
+ this.videoElement.one.apply(this.videoElement, arguments);
+};
+
+FlareVideo.fn.trigger = function(){
+ this.videoElement.trigger.apply(this.videoElement, arguments);
+};
+
+// Proxy jQuery events
+var events = ["click", "dblclick",
+ "onerror", "onloadeddata", "oncanplay",
+ "ondurationchange", "ontimeupdate",
+ "onpause", "onplay", "onended", "onvolumechange"];
+for (var i=0; i < events.length; i++) {
+ (function(){
+ var functName = events[i];
+ var eventName = functName.replace(/^(on)/, "");
+ FlareVideo.fn[functName] = function(){
+ var args = $.makeArray(arguments);
+ args.unshift(eventName);
+ this.bind.apply(this, args);
+ };
+ })();
+}
+
+// Private methods
+
+FlareVideo.fn.triggerReady = function(){
+ for (var i in this.readyList) {
+ this.readyList[i].call(this);
+ }
+ this.loaded = true;
+};
+
+FlareVideo.fn.setupElement = function(){
+ this.element = $("<div />");
+ this.element.addClass("flareVideo");
+ this.parent.append(this.element);
+};
+
+FlareVideo.fn.idle = function(e, toggle){
+ if (toggle) {
+ if (this.state == "playing")
+ this.element.addClass("idle");
+ } else {
+ this.element.removeClass("idle");
+ }
+};
+
+FlareVideo.fn.change = function(state){
+ this.state = state;
+ this.element.attr("data-state", this.state);
+ this.element.trigger("state.fv", this.state);
+}
+
+FlareVideo.fn.setupNative = function(){
+ this.videoElement = $("<video />");
+ this.videoElement.addClass("video");
+ this.videoElement.attr({
+ width: this.options.width,
+ height: this.options.height,
+ poster: this.options.poster,
+ autoplay: this.options.autoplay,
+ preload: this.options.preload,
+ controls: this.options.controls,
+ autobuffer: this.options.autobuffer
+ });
+
+ this.element.append(this.videoElement);
+ this.video = this.videoElement[0];
+
+ var self = this;
+
+ this.video.loadSources = function(srcs){
+ self.videoElement.empty();
+ for (var i in srcs) {
+ var srcEl = $("<source />");
+ srcEl.attr(srcs[i]);
+ self.videoElement.append(srcEl);
+ }
+ self.video.load();
+ };
+
+ this.video.getStartTime = function(){ return(this.startTime || 0); };
+ this.video.getEndTime = function(){
+ if (this.duration == Infinity && this.buffered) {
+ return(this.buffered.end(this.buffered.length-1));
+ } else {
+ return((this.startTime || 0) + this.duration);
+ }
+ };
+
+ this.video.getCurrentTime = function(){
+ try {
+ return this.currentTime;
+ } catch(e) {
+ return 0;
+ }
+ };
+
+ var self = this;
+
+ this.video.setCurrentTime = function(val){ this.currentTime = val; }
+ this.video.getVolume = function(){ return this.volume; };
+ this.video.setVolume = function(val){ this.volume = val; };
+ this.video.enterFullScreen = function(){
+ // Because we don't know when full screen is exited
+ self.inFullScreen = false;
+ this.webkitEnterFullScreen();
+ };
+ this.video.exitFullScreen = function(){ this.webkitExitFullScreen(); };
+
+ this.videoElement.dblclick($.proxy(function(){
+ this.toggleFullScreen();
+ }, this));
+
+ this.triggerReady();
+};
+
+FlareVideo.fn.setupFlash = function(){
+ if (!this._class.flashInstance) this._class.flashInstance = [];
+
+ var flashID = this._class.flashInstance.length;
+ this._class.flashInstance[flashID] = this;
+
+ this.element.addClass("flash");
+
+ this.videoElement = $("<div />");
+ this.videoElement.addClass("video");
+
+ this.videoElement.flash({
+ src: this.options.flashSrc,
+ wmode: "opaque",
+ flashvars: {flashID:flashID},
+ allowScriptAccess: "sameDomain",
+ allowFullScreen: true,
+ width: "100%",
+ height: "100%"
+ },{
+ version: 9,
+ expressInstall: true,
+ });
+
+ this.video = this.videoElement.find("embed")[0];
+ if (!this.video) throw 'Flash Player not installed';
+
+ if ($.browser.msie)
+ this.fixExternalInterface();
+
+ var self = this;
+ this.video.loadSources = function(srcs){
+ if (!srcs) return;
+ var source = self._class.flashSources(srcs)[0];
+ if (!source || !source.src) return;
+ this.loadSource(source.src);
+ };
+
+ this.element.append(this.videoElement);
+};
+
+// External Interface and IE is broken
+FlareVideo.fn.fixExternalInterface = function(){
+ var __flash__addCallback = function(instance, name) {
+ instance[name] = function () {
+ return eval(instance.CallFunction("<invoke name=\"" + name + "\" returntype=\"javascript\">" +
+ __flash__argumentsToXML(arguments,0) + "</invoke>"));
+ }
+ };
+ var methods = ["loadSource", "getStartTime", "getCurrentTime",
+ "setCurrentTime", "getEndTime", "getVolume",
+ "setVolume", "play", "pause"];
+ for(var i in methods)
+ __flash__addCallback(this.video, methods[i]);
+};
+
+FlareVideo.flashSources = function(sources){
+ return($.grep(sources, function(i){
+ return(i.type.match(/flv/) || i.type.match(/mp4/));
+ }));
+};
+FlareVideo.fn.flashSources = function(){
+ return this._class.flashSources(this.sources);
+};
+
+FlareVideo.eiTrigger = function(id, name){
+ try {
+ this.flashInstance[id].trigger(name);
+ } catch(e) {
+ console.error(e);
+ }
+};
+
+FlareVideo.eiTriggerReady = function(id) {
+ try {
+ this.flashInstance[id].triggerReady();
+ } catch(e) {
+ console.error(e);
+ }
+};
+
+FlareVideo.fn.setupButtons = function(){
+ var play = $("<div />");
+ play.addClass("play");
+ play.text("Play");
+ play.click($.proxy(function(){
+ if (!this.canPlay) return;
+ this.play();
+ }, this));
+ this.controls.append(play);
+
+ var pause = $("<div />");
+ pause.addClass("pause");
+ pause.text("Pause");
+ pause.click($.proxy(function(){
+ if (!this.canPlay) return;
+ this.pause();
+ }, this));
+ this.controls.append(pause);
+
+ var fullScreen = $("<div />");
+ fullScreen.addClass("fullScreen");
+ fullScreen.text("Full Screen");
+ fullScreen.click($.proxy(this.toggleFullScreen, this));
+ if (!this.options.useFullScreen) fullScreen.addClass("disabled");
+ this.controls.append(fullScreen);
+};
+
+FlareVideo.fn.createRange = function(){
+ if (nativeRangeSupport) {
+ var result = $("<input type='range' />");
+ result.attr({step: "any"});
+ result.getValue = result.val;
+ result.setValue = result.val;
+ result.setOptions = result.attr;
+ } else {
+ var result = $("<div />");
+ if (!result.slider)
+ throw "jQuery UI with the slider component is required."
+
+ result.slider();
+
+ var currentValue = 0;
+ result.getValue = function(){
+ return currentValue;
+ };
+
+ result.setValue = function(value){
+ if (result.find(".ui-slider-handle:first").hasClass("ui-state-active")) return;
+ currentValue = value;
+ result.slider("option", "value", value);
+ };
+
+ result.setOptions = function(options){
+ result.slider("option", options);
+ };
+
+ result.bind("slidestop", function(e, ui){
+ currentValue = ui.value;
+ result.trigger("change")
+ });
+ }
+ return result;
+}
+
+FlareVideo.fn.setupSeek = function(){
+ var seek = $("<div />");
+ seek.addClass("seek");
+
+ var seekRange = this.createRange();
+ seekRange.addClass("seekRange");
+ seekRange.setValue(0);
+
+ seekRange.change($.proxy(function(){
+ this.seek(seekRange.getValue());
+ }, this));
+
+ this.ondurationchange($.proxy(function(){
+ seekRange.setOptions({
+ min: this.video.getStartTime(),
+ max: this.video.getEndTime(),
+ value: this.video.getCurrentTime()
+ });
+ }, this));
+
+ this.ontimeupdate($.proxy(function(){
+ seekRange.setOptions({
+ max: this.video.getEndTime(),
+ value: this.video.getCurrentTime()
+ });
+ }, this));
+
+ seek.append(seekRange);
+ this.controls.append(seek);
+};
+
+FlareVideo.fn.setupVolume = function(){
+ var volume = $("<div />");
+ volume.addClass("volume");
+
+ var volRange = this.createRange();
+ volRange.setOptions({
+ max: 1,
+ step: 0.1
+ });
+
+ volRange.addClass("volRange");
+ volRange.change($.proxy(function(){
+ this.setVolume(volRange.getValue());
+ }, this));
+ this.onvolumechange($.proxy(function(){
+ volRange.setValue(this.getVolume());
+ }, this));
+
+ volRange.setValue(this.getVolume());
+
+ var volMin = $("<div />");
+ volMin.addClass("volMin");
+ volMin.text("Minimum volume");
+ volMin.click($.proxy(function(){
+ this.setVolume(0);
+ }, this));
+
+ var volMax = $("<div />");
+ volMax.addClass("volMax");
+ volMax.text("Maximum volume");
+ volMax.click($.proxy(function(){
+ this.setVolume(1);
+ }, this));
+
+ volume.append(volMin);
+ volume.append(volRange);
+ volume.append(volMax);
+ this.controls.append(volume);
+};
+
+FlareVideo.fn.setupTiming = function(){
+ var timeToGo = $("<div />");
+ var timeLeft = $("<div />");
+
+ timeToGo.addClass("timeMin");
+ timeLeft.addClass("timeMax");
+
+ var pad = function(num) {
+ if (num < 10)
+ return "0" + num;
+ return num;
+ }
+
+ var secondsFormat = function(sec){
+ var result = [];
+
+ var minutes = Math.floor( sec / 60 );
+ var hours = Math.floor( sec / 3600 );
+ var seconds = (sec == 0) ? 0 : (sec % 60)
+ seconds = Math.round(seconds);
+
+ if (hours > 0)
+ result.push(pad(hours));
+
+ result.push(pad(minutes));
+ result.push(pad(seconds));
+
+ return result.join(":");
+ };
+
+ this.ontimeupdate($.proxy(function(){
+ timeToGo.text(secondsFormat(this.video.getCurrentTime()));
+ timeLeft.text("-" + secondsFormat(this.video.getEndTime() - this.video.getCurrentTime()))
+ }, this));
+
+ this.videoElement.one("canplay", $.proxy(function(){
+ this.videoElement.trigger("timeupdate");
+ }, this));
+
+ this.controls.append(timeToGo);
+ this.controls.append(timeLeft);
+};
+
+FlareVideo.fn.setupControls = function(){
+ // Use native controls
+ if (this.options.controls) return;
+
+ this.controls = $("<div />");
+ this.controls.addClass("controls");
+ this.controls.addClass("disabled");
+
+ this.setupButtons();
+ this.setupSeek();
+ this.setupVolume();
+ this.setupTiming();
+
+ this.element.append(this.controls);
+};
+
+FlareVideo.fn.fallbackToFlash = function(){
+ this.useNative = false;
+ this.element.unload();
+ this.remove()
+ this.setupElement();
+ this.setupFlash();
+};
+
+FlareVideo.fn.setupEvents = function(){
+ this.onpause($.proxy(function(){
+ this.element.removeClass("playing");
+ this.change("paused");
+ }, this));
+
+ this.onplay($.proxy(function(){
+ this.element.addClass("playing");
+ this.change("playing");
+ }, this));
+
+ this.onended($.proxy(function(){
+ this.element.removeClass("playing");
+ this.fullScreen(false);
+ this.stop()
+ this.change("ended");
+ }, this));
+
+ this.onerror($.proxy(function(e){
+ if (this.useNative) {
+ if (this.video.error.code == 4) {
+ var flashType = this.flashSources()[0];
+ if (flashType) {
+ this.fallbackToFlash();
+ } else {
+ console.error("Format not supported");
+ }
+ } else {
+ console.error("Error - " + this.video.error.code);
+ }
+ } else {
+ console.error("Flash error");
+ }
+ }, this));
+
+ this.oncanplay($.proxy(function(){
+ this.canPlay = true;
+ this.controls.removeClass("disabled");
+ }, this));
+
+ if (this.options.keyShortcut);
+ $(document).keydown($.proxy(function(e){
+ if (e.keyCode == 32) { // Space
+ this.togglePlay();
+ return false;
+ }
+
+ if (e.keyCode == 27 && this.inFullScreen) { // Escape
+ this.fullScreen(false);
+ this.element.trigger("reset.idle");
+ return false;
+ }
+
+ }, this));
+};
+
+$.fn.flareVideo = function(options, callback){
+ return(new FlareVideo(this, options));
+};
+
+window.FlareVideo = FlareVideo;
+
+})(jQuery);
288 javascripts/jquery.flash.js
@@ -0,0 +1,288 @@
+/**
+ * Flash (http://jquery.lukelutman.com/plugins/flash)
+ * A jQuery plugin for embedding Flash movies.
+ *
+ * Version 1.0
+ * November 9th, 2006
+ *
+ * Copyright (c) 2006 Luke Lutman (http://www.lukelutman.com)
+ * Dual licensed under the MIT and GPL licenses.
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.opensource.org/licenses/gpl-license.php
+ *
+ * Inspired by:
+ * SWFObject (http://blog.deconcept.com/swfobject/)
+ * UFO (http://www.bobbyvandersluis.com/ufo/)
+ * sIFR (http://www.mikeindustries.com/sifr/)
+ *
+ * IMPORTANT:
+ * The packed version of jQuery breaks ActiveX control
+ * activation in Internet Explorer. Use JSMin to minifiy
+ * jQuery (see: http://jquery.lukelutman.com/plugins/flash#activex).
+ *
+ **/
+;(function(){
+
+var $$;
+
+/**
+ *
+ * @desc Replace matching elements with a flash movie.
+ * @author Luke Lutman
+ * @version 1.0.1
+ *
+ * @name flash
+ * @param Hash htmlOptions Options for the embed/object tag.
+ * @param Hash pluginOptions Options for detecting/updating the Flash plugin (optional).
+ * @param Function replace Custom block called for each matched element if flash is installed (optional).
+ * @param Function update Custom block called for each matched if flash isn't installed (optional).
+ * @type jQuery
+ *
+ * @cat plugins/flash
+ *
+ * @example $('#hello').flash({ src: 'hello.swf' });
+ * @desc Embed a Flash movie.
+ *
+ * @example $('#hello').flash({ src: 'hello.swf' }, { version: 8 });
+ * @desc Embed a Flash 8 movie.
+ *
+ * @example $('#hello').flash({ src: 'hello.swf' }, { expressInstall: true });
+ * @desc Embed a Flash movie using Express Install if flash isn't installed.
+ *
+ * @example $('#hello').flash({ src: 'hello.swf' }, { update: false });
+ * @desc Embed a Flash movie, don't show an update message if Flash isn't installed.
+ *
+**/
+$$ = jQuery.fn.flash = function(htmlOptions, pluginOptions, replace, update) {
+
+ // Set the default block.
+ var block = replace || $$.replace;
+
+ // Merge the default and passed plugin options.
+ pluginOptions = $$.copy($$.pluginOptions, pluginOptions);
+
+ // Detect Flash.
+ if(!$$.hasFlash(pluginOptions.version)) {
+ // Use Express Install (if specified and Flash plugin 6,0,65 or higher is installed).
+ if(pluginOptions.expressInstall && $$.hasFlash(6,0,65)) {
+ // Add the necessary flashvars (merged later).
+ var expressInstallOptions = {
+ flashvars: {
+ MMredirectURL: location,
+ MMplayerType: 'PlugIn',
+ MMdoctitle: jQuery('title').text()
+ }
+ };
+ // Ask the user to update (if specified).
+ } else if (pluginOptions.update) {
+ // Change the block to insert the update message instead of the flash movie.
+ block = update || $$.update;
+ // Fail
+ } else {
+ // The required version of flash isn't installed.
+ // Express Install is turned off, or flash 6,0,65 isn't installed.
+ // Update is turned off.
+ // Return without doing anything.
+ return this;
+ }
+ }
+
+ // Merge the default, express install and passed html options.
+ htmlOptions = $$.copy($$.htmlOptions, expressInstallOptions, htmlOptions);
+
+ // Invoke $block (with a copy of the merged html options) for each element.
+ return this.each(function(){
+ block.call(this, $$.copy(htmlOptions));
+ });
+
+};
+/**
+ *
+ * @name flash.copy
+ * @desc Copy an arbitrary number of objects into a new object.
+ * @type Object
+ *
+ * @example $$.copy({ foo: 1 }, { bar: 2 });
+ * @result { foo: 1, bar: 2 };
+ *
+**/
+$$.copy = function() {
+ var options = {}, flashvars = {};
+ for(var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i];
+ if(arg == undefined) continue;
+ jQuery.extend(options, arg);
+ // don't clobber one flash vars object with another
+ // merge them instead
+ if(arg.flashvars == undefined) continue;
+ jQuery.extend(flashvars, arg.flashvars);
+ }
+ options.flashvars = flashvars;
+ return options;
+};
+/*
+ * @name flash.hasFlash
+ * @desc Check if a specific version of the Flash plugin is installed
+ * @type Boolean
+ *
+**/
+$$.hasFlash = function() {
+ // look for a flag in the query string to bypass flash detection
+ if(/hasFlash\=true/.test(location)) return true;
+ if(/hasFlash\=false/.test(location)) return false;
+ var pv = $$.hasFlash.playerVersion().match(/\d+/g);
+ var rv = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String($$.pluginOptions.version).match(/\d+/g);
+ for(var i = 0; i < 3; i++) {
+ pv[i] = parseInt(pv[i] || 0);
+ rv[i] = parseInt(rv[i] || 0);
+ // player is less than required
+ if(pv[i] < rv[i]) return false;
+ // player is greater than required
+ if(pv[i] > rv[i]) return true;
+ }
+ // major version, minor version and revision match exactly
+ return true;
+};
+/**
+ *
+ * @name flash.hasFlash.playerVersion
+ * @desc Get the version of the installed Flash plugin.
+ * @type String
+ *
+**/
+$$.hasFlash.playerVersion = function() {
+ // ie
+ try {
+ try {
+ // avoid fp6 minor version lookup issues
+ // see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
+ var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
+ try { axo.AllowScriptAccess = 'always'; }
+ catch(e) { return '6,0,0'; }
+ } catch(e) {}
+ return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
+ // other browsers
+ } catch(e) {
+ try {
+ if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
+ return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
+ }
+ } catch(e) {}
+ }
+ return '0,0,0';
+};
+/**
+ *
+ * @name flash.htmlOptions
+ * @desc The default set of options for the object or embed tag.
+ *
+**/
+$$.htmlOptions = {
+ height: 240,
+ flashvars: {},
+ pluginspage: 'http://www.adobe.com/go/getflashplayer',
+ src: '#',
+ type: 'application/x-shockwave-flash',
+ width: 320
+};
+/**
+ *
+ * @name flash.pluginOptions
+ * @desc The default set of options for checking/updating the flash Plugin.
+ *
+**/
+$$.pluginOptions = {
+ expressInstall: false,
+ update: true,
+ version: '6.0.65'
+};
+/**
+ *
+ * @name flash.replace
+ * @desc The default method for replacing an element with a Flash movie.
+ *
+**/
+$$.replace = function(htmlOptions) {
+ this.innerHTML = '<div class="alt">'+this.innerHTML+'</div>';
+ jQuery(this)
+ .addClass('flash-replaced')
+ .prepend($$.transform(htmlOptions));
+};
+/**
+ *
+ * @name flash.update
+ * @desc The default method for replacing an element with an update message.
+ *
+**/
+$$.update = function(htmlOptions) {
+ var url = String(location).split('?');
+ url.splice(1,0,'?hasFlash=true&');
+ url = url.join('');
+ var msg = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';
+ this.innerHTML = '<span class="alt">'+this.innerHTML+'</span>';
+ jQuery(this)
+ .addClass('flash-update')
+ .prepend(msg);
+};
+/**
+ *
+ * @desc Convert a hash of html options to a string of attributes, using Function.apply().
+ * @example toAttributeString.apply(htmlOptions)
+ * @result foo="bar" foo="bar"
+ *
+**/
+function toAttributeString() {
+ var s = '';
+ for(var key in this)
+ if(typeof this[key] != 'function')
+ s += key+'="'+this[key]+'" ';
+ return s;
+};
+/**
+ *
+ * @desc Convert a hash of flashvars to a url-encoded string, using Function.apply().
+ * @example toFlashvarsString.apply(flashvarsObject)
+ * @result foo=bar&foo=bar
+ *
+**/
+function toFlashvarsString() {
+ var s = '';
+ for(var key in this)
+ if(typeof this[key] != 'function')
+ s += key+'='+encodeURIComponent(this[key])+'&';
+ return s.replace(/&$/, '');
+};
+/**
+ *
+ * @name flash.transform
+ * @desc Transform a set of html options into an embed tag.
+ * @type String
+ *
+ * @example $$.transform(htmlOptions)
+ * @result <embed src="foo.swf" ... />
+ *
+ * Note: The embed tag is NOT standards-compliant, but it
+ * works in all current browsers. flash.transform can be
+ * overwritten with a custom function to generate more
+ * standards-compliant markup.
+ *
+**/
+$$.transform = function(htmlOptions) {
+ htmlOptions.toString = toAttributeString;
+ if(htmlOptions.flashvars) htmlOptions.flashvars.toString = toFlashvarsString;
+ return '<embed ' + String(htmlOptions) + '/>';
+};
+
+/**
+ *
+ * Flash Player 9 Fix (http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
+ *
+**/
+if (window.attachEvent) {
+ window.attachEvent("onbeforeunload", function(){
+ __flash_unloadHandler = function() {};
+ __flash_savedUnloadHandler = function() {};
+ });
+}
+
+})();
6,240 javascripts/jquery.js
6,240 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
81 javascripts/jquery.ui.slider.js
@@ -0,0 +1,81 @@
+/*!
+ * jQuery UI 1.8.1
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+jQuery.ui||function(c){c.ui={version:"1.8.1",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")=="hidden")return false;
+b=b&&b=="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,f,g){return c.ui.isOverAxis(a,d,f)&&c.ui.isOverAxis(b,e,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,
+PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||
+/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==
+undefined)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b=="absolute"||b=="relative"||b=="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b||"area"==b?a.href||!isNaN(d):!isNaN(d))&&
+!c(a)["area"==b?"parents":"closest"](":hidden").length},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}})}(jQuery);
+;/*!
+ * jQuery UI Widget 1.8.1
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b){var j=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return j.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend({},c.options);b[e][a].prototype=
+b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==undefined){h=i;return false}}):this.each(function(){var g=
+b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){this.element=b(c).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();
+this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===undefined)return this.options[a];d={};d[a]=c}b.each(d,function(f,
+h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=
+b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
+;/*!
+ * jQuery UI Mouse 1.8.1
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&
+this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();
+return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&
+this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
+a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
+;/*
+ * jQuery UI Slider 1.8.1
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
+this.range=d([]);if(a.range){if(a.range===true){this.range=d("<div></div>");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
+if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length<a.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();
+else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),g,h,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=
+false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");g=b._start(c,f);if(g===false)return}break}i=b.options.step;g=b.options.values&&b.options.values.length?(h=b.values(f)):(h=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:h=b._valueMin();break;case d.ui.keyCode.END:h=b._valueMax();break;case d.ui.keyCode.PAGE_UP:h=g+(b._valueMax()-b._valueMin())/5;break;case d.ui.keyCode.PAGE_DOWN:h=g-(b._valueMax()-b._valueMin())/5;break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(g===
+b._valueMax())return;h=g+i;break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(g===b._valueMin())return;h=g-i;break}b._slide(c,f,h);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
+this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,g,h,i;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c={x:b.pageX,y:b.pageY};e=this._normValueFromMouse(c);f=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(j){var k=Math.abs(e-h.values(j));if(f>k){f=k;g=d(this);i=j}});if(a.range===true&&this.values(1)===a.min){i+=1;g=d(this.handles[i])}if(this._start(b,
+i)===false)return false;this._mouseSliding=true;h._handleIndex=i;g.addClass("ui-state-active").focus();a=g.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-g.width()/2,top:b.pageY-a.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};e=this._normValueFromMouse(c);this._slide(b,i,e);return this._animateOff=true},_mouseStart:function(){return true},
+_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;
+if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=
+this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c<e))c=e;if(c!==this.values(a)){e=this.values();e[a]=c;b=this._trigger("slide",b,{handle:this.handles[a],value:c,values:e});this.values(a?0:1);b!==false&&this.values(a,c,true)}}else if(c!==this.value()){b=this._trigger("slide",b,{handle:this.handles[a],
+value:c});b!==false&&this.value(c)}},_stop:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("stop",b,c)},_change:function(b,a){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("change",b,c)}},value:function(b){if(arguments.length){this.options.value=
+this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(b,a){var c,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):this.value();
+else return this._values()},_setOption:function(b,a){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":if(a){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
+this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(b){var a,c;if(arguments.length){a=this.options.values[b];
+return a=this._trimAlignValue(a)}else{a=this.options.values.slice();for(c=0;c<a.length;c+=1)a[c]=this._trimAlignValue(a[c]);return a}},_trimAlignValue:function(b){if(b<this._valueMin())return this._valueMin();if(b>this._valueMax())return this._valueMax();var a=this.options.step,c=b%a;b=b-c;if(c>=a/2)b+=a;return parseFloat(b.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,a=this.options,c=this,
+e=!this._animateOff?a.animate:false,f,g={},h,i,j,k;if(this.options.values&&this.options.values.length)this.handles.each(function(l){f=(c.values(l)-c._valueMin())/(c._valueMax()-c._valueMin())*100;g[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](g,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(l===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate);if(l===1)c.range[e?"animate":"css"]({width:f-h+"%"},{queue:false,duration:a.animate})}else{if(l===
+0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(l===1)c.range[e?"animate":"css"]({height:f-h+"%"},{queue:false,duration:a.animate})}h=f});else{i=this.value();j=this._valueMin();k=this._valueMax();f=k!==j?(i-j)/(k-j)*100:0;g[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](g,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?
+"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.1"})})(jQuery);
+;
176 media/FlareVideo.as
@@ -0,0 +1,176 @@
+package
+{
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.display.StageDisplayState;
+ import flash.display.StageScaleMode;
+ import flash.display.StageAlign;
+ import flash.events.*;
+ import flash.external.ExternalInterface;
+ import flash.media.Sound;
+ import flash.media.SoundTransform;
+ import flash.media.Video;
+ import flash.net.NetConnection;
+ import flash.net.NetStream;
+ import flash.utils.clearInterval;
+ import flash.utils.setInterval;
+
+ [SWF(width="800", height="600", backgroundColor="#000", frameRate="40")]
+ public class FlareVideo extends Sprite
+ {
+ private var connection:NetConnection;
+ private var stream:NetStream;
+ private var video:Video;
+ private var sound:SoundTransform;
+ private var duration:Number = 0;
+ private var interval:Number;
+ private var flashID:Number;
+ private var source:String;
+
+ public function FlareVideo()
+ {
+ stage.scaleMode = StageScaleMode.NO_SCALE;
+ stage.align = StageAlign.TOP_LEFT
+
+ flashID = this.root.loaderInfo.parameters.flashID;
+
+ connection = new NetConnection();
+ connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
+ connection.connect(null);
+
+ stream = new NetStream(connection);
+ stream.checkPolicyFile = true;
+ stream.client = {};
+ stream.client.onMetaData = metaDataHandler;
+ stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
+ stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler);
+ stream.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
+
+ sound = new SoundTransform(1,0);
+ stream.soundTransform = sound;
+
+ video = new Video();
+ video.width = stage.stageWidth;
+ video.height = stage.stageHeight;
+ video.attachNetStream(stream);
+ addChild(video);
+
+ if (ExternalInterface.available) {
+ ExternalInterface.marshallExceptions = true;
+
+ ExternalInterface.addCallback("loadSource", loadSource);
+ ExternalInterface.addCallback("getStartTime", getStartTime);
+ ExternalInterface.addCallback("getCurrentTime", getCurrentTime);
+ ExternalInterface.addCallback("setCurrentTime", setCurrentTime);
+ ExternalInterface.addCallback("getEndTime", getEndTime);
+ ExternalInterface.addCallback("getVolume", getVolume);
+ ExternalInterface.addCallback("setVolume", setVolume);
+ ExternalInterface.addCallback("play", play);
+ ExternalInterface.addCallback("pause", pause);
+
+ ExternalInterface.call("FlareVideo.eiTriggerReady", flashID);
+ } else {
+ trace("ExternalInterface not available");
+ }
+ }
+
+ public function loadSource(src:String):void {
+ source = src;
+ stream.play(source);
+ stream.pause();
+ trigger("canplay");
+ }
+
+ public function getStartTime():Number {
+ return 0;
+ }
+
+ public function getCurrentTime():Number {
+ return stream.time;
+ }
+
+ public function setCurrentTime(val:Number):void {
+ stream.seek(val);
+ play();
+ }
+
+ public function getEndTime():Number {
+ return duration;
+ }
+
+ public function getVolume():Number {
+ return sound.volume;
+ }
+
+ public function setVolume(val:Number):void {
+ sound.volume = val;
+ stream.soundTransform = sound;
+ trigger("volumechange");
+ }
+
+ public function play():void {
+ stream.resume();
+ if (interval) clearInterval(interval);
+ interval = setInterval(timeUpdate, 500);
+ trigger("play");
+ }
+
+ public function pause():void {
+ stream.pause();
+ clearInterval(interval);
+ trigger("pause");
+ }
+
+ public function enterFullScreen():void {
+ stage.displayState = StageDisplayState.FULL_SCREEN;
+ }
+
+ public function exitFullScreen():void {
+ stage.displayState = StageDisplayState.NORMAL;
+ }
+
+ private function timeUpdate():void {
+ trigger("timeupdate");
+ }
+
+ private function metaDataHandler(i:Object):void {
+ duration = i.duration;
+
+ var aspectRatio:Number = (video.width / i.width);
+ video.height = i.height * aspectRatio;
+ video.y = (stage.stageHeight - video.height) / 2;
+
+ trigger("durationchange");
+ trigger("loadedmetadata");
+ trigger("loadeddata");
+ }
+
+ private function trigger(name:String):void {
+ trace("Triggering event :" + name);
+ ExternalInterface.call("FlareVideo.eiTrigger", flashID, name);
+ }
+
+ private function netStatusHandler(event:NetStatusEvent):void {
+ switch (event.info.code) {
+ case "NetStream.Play.Stop":
+ clearInterval(interval);
+ trigger("ended");
+ break;
+ case "NetStream.Play.StreamNotFound":
+ trace("Unable to locate video");
+ case "NetStream.Play.Failed":
+ trigger("error");
+ if (interval) clearInterval(interval);
+ break;
+ }
+ }
+
+ private function securityErrorHandler(event:SecurityErrorEvent):void {
+ trace("securityErrorHandler: " + event);
+ }
+
+ private function errorHandler(event:ErrorEvent):void {
+ trace("errorHandler: " + event);
+ }
+ }
+}
52 stylesheets/flarevideo.css
@@ -0,0 +1,52 @@
+.flareVideo {
+ position: relative;
+ padding: 0;
+ margin: 0;
+ -webkit-user-select: none;
+ background: #000;
+ height: 100%;
+
+ z-index: 90;
+}
+
+.flareVideo.fullScreen {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ top: 0;
+ overflow: hidden;
+}
+
+.flareVideo .controls .disabled {
+ display: none;
+}
+
+.flareVideo video,
+.flareVideo .video {
+ display: block;
+ width: 100%;
+ height: 100%;
+}
+
+.flareVideo embed, .flareVideo object {
+ z-index: 100;
+}
+
+.flareVideo .controls {
+ z-index: 200;
+}
+
+.flareVideo .controls input[type="range"] {
+ margin: 0;
+ padding: 0;
+}
+
+/* jQuery UI Slider
+----------------------------------*/
+.flareVideo .ui-slider { position: relative; text-align: left; }
+.flareVideo .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.flareVideo .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+/*.flareVideo .ui-slider-horizontal { padding-left: 10px; }*/
+.flareVideo .ui-slider-horizontal .ui-slider-handle { margin-left: -5px; }
201 stylesheets/flarevideo.default.css
@@ -0,0 +1,201 @@
+.flareVideo .controls {
+ position: absolute;
+ bottom: 20px;
+ height: 57px;
+ min-width: 250px;
+ left: 20%;
+ right: 20%;
+
+ border: 1px solid #1A1A1A;
+ border-top-color: #5F5F5F;
+ border-bottom-color: #1D1D1D;
+ background: #171717;
+ background: -moz-linear-gradient(top, #454545 0%, #2D2D2D 30%, #1F1F1F 35%, #171717 100%);
+ background: -webkit-gradient(linear, left top, left bottom, from(#454545), color-stop(0.3, #2D2D2D), color-stop(0.35, #1F1F1F), to(#171717));
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ -webkit-box-shadow: 0 0 3px #000;
+ -moz-box-shadow: 0 0 3px #000;
+
+ opacity: 0.9;
+
+ -webkit-transition: opacity 0.5s linear;
+ -moz-transition: opacity 0.5s linear;
+}
+
+.flareVideo .controls .play,
+.flareVideo .controls .pause,
+.flareVideo .controls .fullScreen,
+.flareVideo .controls .volMin,
+.flareVideo .controls .volMax {
+ cursor: pointer;
+}
+
+.flareVideo .controls input[type="range"],
+.flareVideo .controls .ui-slider {
+ -khtml-appearance: none;
+ border: 1px solid #1B1B1B;
+ border-top-color: #060606;
+ border-bottom-color: #202020;
+ background: #0E0E0E;
+ background: -moz-linear-gradient(top, #0E0E0E, #141414);
+ background: -webkit-gradient(linear, left top, left bottom, from(#0E0E0E), to(#141414));
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ height: 10px;
+}
+
+.flareVideo .controls .seek .seekRange {
+ width: 100%;
+}
+
+.flareVideo .controls .seek .seekRange::-webkit-slider-thumb {
+ -khtml-appearance: none;
+ background: url(../images/default/slider-thumb.png) no-repeat;
+ width: 8px;
+ height: 8px;
+}
+
+.flareVideo .controls .seek .seekRange .ui-slider-handle {
+ display: block;
+ background: url(../images/default/slider-thumb.png) no-repeat;
+ width: 8px;
+ height: 8px;
+}
+
+.flareVideo .controls .fullScreen {
+ width: 16px;
+ height: 16px;
+ text-indent: -5000px;
+ background: url(../images/default/full-screen.png) no-repeat center center;
+}
+
+.flareVideo .controls .volume {
+ width: 90px;
+}
+
+.flareVideo .controls .volume .volMin,
+.flareVideo .controls .volume .volMax {
+ text-indent: -5000px;
+}
+
+.flareVideo .controls .volume .volMin {
+ width: 10px;
+ height: 10px;
+ background: url(../images/default/vol-min.png) no-repeat center center;
+}
+
+.flareVideo .controls .volume .volMax {
+ width: 15px;
+ height: 14px;
+ background: url(../images/default/vol-max.png) no-repeat center center;
+}
+
+.flareVideo .controls .volume .volRange {
+ width: 50px;
+}
+
+.flareVideo .controls .volume ::-webkit-slider-thumb {
+ -khtml-appearance: none;
+ background: url(../images/default/volume-thumb.png) no-repeat;
+ width: 10px;
+ height: 11px;
+}
+
+.flareVideo .controls .volume .ui-slider-handle {
+ display: block;
+ background: url(../images/default/volume-thumb.png) no-repeat;
+ width: 10px;
+ height: 11px;
+}
+
+.flareVideo .controls .timeMin,
+.flareVideo .controls .timeMax {
+ font-family: Apex,"Helvetica Neue","HelveticaNeue",helvetica,sans-serif;
+ font-size: 13px;
+ color: #C2C2C2;
+ font-weight: bold;
+ text-shadow: 0 1px 1px #000;
+}
+
+.flareVideo .controls .pause,
+.flareVideo .controls .play {
+ width: 23px;
+ height: 23px;
+ text-indent: -5000px;
+}
+
+.flareVideo .controls .pause {
+ display: none;
+ background: url(../images/default/pause.png) no-repeat center center;
+}
+
+.flareVideo .controls .play {
+ display: block;
+ background: url(../images/default/play.png) no-repeat center center;
+}
+
+.flareVideo.playing .controls .play {
+ display: none;
+}
+
+.flareVideo.playing .controls .pause {
+ display: block;
+}
+
+.flareVideo.idle .controls {
+ opacity: 0;
+}
+
+.flareVideo .controls .fullScreen {
+ position: absolute;
+ right: 13px;
+ top: 10px;
+}
+
+.flareVideo .controls .play,
+.flareVideo .controls .pause {
+ position: absolute;
+ left: 50%;
+ top: 6px;
+}
+
+.flareVideo .controls .seek {
+ position: absolute;
+ bottom: 8px;
+ left: 60px;
+ right: 60px;
+}
+
+.flareVideo .controls .timeMin {
+ position: absolute;
+ bottom: 8px;
+ left: 20px;
+}
+
+.flareVideo .controls .timeMax {
+ position: absolute;
+ bottom: 8px;
+ right: 14px;
+}
+
+.flareVideo .controls .volume {
+ position: absolute;
+ left: 10px;
+ top: 13px;
+}
+
+.flareVideo .controls .volume .volMin {
+ position: absolute;
+ left: 0;
+}
+
+.flareVideo .controls .volume .volMax {
+ position: absolute;
+ right: 0;
+}
+
+.flareVideo .controls .volume .volRange {
+ position: absolute;
+ left: 16px;
+}
183 stylesheets/flarevideo.spotify.css
@@ -0,0 +1,183 @@
+.flareVideo .controls {
+ position: relative;
+ height: 41px;
+
+ border: 1px solid #353535;
+ border-top-color: #787878;
+ border-bottom-color: #464646;
+ background: #606060;
+ background: -moz-linear-gradient(top, #606060, #4E4E4E);
+ background: -webkit-gradient(linear, left top, left bottom, from(#606060), to(#4E4E4E));
+}
+
+.flareVideo .controls .play,
+.flareVideo .controls .pause,
+.flareVideo .controls .fullScreen,
+.flareVideo .controls .volMin,
+.flareVideo .controls .volMax {
+ cursor: pointer;
+}
+
+.flareVideo .controls input[type="range"],
+.flareVideo .controls .ui-slider {
+ -khtml-appearance: none;
+ border: 1px solid #242424;
+ border-top-color: #161616;
+ border-bottom-color: #636363;
+ background: #2F2F2F;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ height: 8px;
+ padding: 0;
+}
+
+.flareVideo .controls ::-webkit-slider-thumb {
+ -khtml-appearance: none;
+ background: url(../images/spotify/thumb.png) no-repeat;
+ width: 9px;
+ height: 8px;
+}
+
+.flareVideo .controls .ui-slider-handle {
+ background: url(../images/spotify/thumb.png) no-repeat;
+ width: 9px;
+ height: 8px;
+}
+
+.flareVideo .controls .seek .seekRange {
+ width: 100%;
+}
+
+.flareVideo .controls .fullScreen {
+ width: 16px;
+ height: 16px;
+ text-indent: -5000px;
+ background: url(../images/spotify/full-screen.png) no-repeat center center;
+
+ /* TODO */
+ display: none;
+}
+
+.flareVideo .controls .volume {
+ width: 90px;
+}
+
+.flareVideo .controls .volume .volMin,
+.flareVideo .controls .volume .volMax {
+ text-indent: -5000px;
+}
+
+.flareVideo .controls .volume .volMin {
+ width: 9px;
+ height: 21px;
+ background: url(../images/spotify/vol-min.png) no-repeat center center;
+
+ /* TODO */
+ display: none;
+}
+
+.flareVideo .controls .volume .volMax {
+ width: 9px;
+ height: 21px;
+ background: url(../images/spotify/vol-max.png) no-repeat center center;
+}
+
+.flareVideo .controls .volume .volRange {
+ width: 50px;
+}
+
+.flareVideo .controls .timeMin,
+.flareVideo .controls .timeMax {
+ font-family: Apex,"Helvetica Neue","HelveticaNeue",helvetica,sans-serif;
+ font-size: 13px;
+ color: #C2C2C2;
+ font-weight: bold;
+ text-shadow: 0 1px 1px #000;
+}
+
+.flareVideo .controls .pause,
+.flareVideo .controls .play {
+ width: 31px;
+ height: 31px;
+ text-indent: -5000px;
+}
+
+.flareVideo .controls .pause {
+ display: none;
+ background: url(../images/spotify/pause.png) no-repeat center center;
+}
+
+.flareVideo .controls .play {
+ display: block;
+ background: url(../images/spotify/play.png) no-repeat center center;
+}
+
+.flareVideo.playing .controls .play {
+ display: none;
+}
+
+.flareVideo.playing .controls .pause {
+ display: block;
+}
+
+.flareVideo .controls .fullScreen {
+ position: absolute;
+ right: 13px;
+ top: 10px;
+}
+
+.flareVideo .controls .play,
+.flareVideo .controls .pause {
+ position: absolute;
+ left: 10px;
+ top: 6px;
+}
+
+.flareVideo .controls .seek {
+ position: absolute;
+ top: 0px;
+ bottom: 0px;
+ left: 175px;
+ right: 55px;
+}
+
+.flareVideo .controls .seek .seekRange {
+ position: absolute;
+ top: 16px;
+}
+
+.flareVideo .controls .timeMin {
+ position: absolute;
+ top: 12px;
+ left: 135px;
+}
+
+.flareVideo .controls .timeMax {
+ position: absolute;
+ top: 12px;
+ right: 9px;
+}
+
+.flareVideo .controls .volume {
+ position: absolute;
+ left: 35px;
+ top: 0px;
+ bottom: 0px;
+}
+
+.flareVideo .controls .volume .volMin {
+ position: absolute;
+ left: 0;
+}
+
+.flareVideo .controls .volume .volMax {
+ position: absolute;
+ right: 6px;
+ top: 10px;
+}
+
+.flareVideo .controls .volume .volRange {
+ position: absolute;
+ left: 16px;
+ top: 16px;
+}
157 stylesheets/flarevideo.vimeo.css
@@ -0,0 +1,157 @@
+.flareVideo .controls {
+ position: absolute;
+ bottom: 20px;
+ height: 57px;
+ min-width: 250px;
+ left: 20%;
+ right: 20%;
+ height: 40px;
+
+ -webkit-transition: opacity 0.5s linear;
+ -moz-transition: opacity 0.5s linear;
+}
+
+.flareVideo .controls .play,
+.flareVideo .controls .pause,
+.flareVideo .controls .fullScreen {
+ cursor: pointer;
+}
+
+.flareVideo .controls input[type="range"],
+.flareVideo .controls .ui-slider {
+ -khtml-appearance: none;
+ border: 1px solid #777C7C;
+ background-color: transparent;
+ height: 12px;
+ padding: 0;
+}
+
+.flareVideo .controls ::-webkit-slider-thumb {
+ -khtml-appearance: none;
+ background: #777C7C;
+ width: 3px;
+ height: 12px;
+}
+
+.flareVideo .controls .ui-slider-handle {
+ background: #777C7C;
+ width: 3px;
+ height: 12px;
+}
+
+.flareVideo .controls .fullScreen {
+ width: 12px;
+ height: 12px;
+ text-indent: -5000px;
+ background: url(../images/vimeo/full-screen.png) no-repeat center center;
+}
+
+.flareVideo .controls .volume {
+ width: 34px;
+}
+
+.flareVideo .controls .volume .volMin,
+.flareVideo .controls .volume .volMax {
+ display: none;
+}
+
+.flareVideo .controls .volume .volRange {
+ background-color: #31A0E5;
+ border: 0;
+ width: 34px;
+ height: 14px;
+}
+
+.flareVideo .controls .volume .volRange::-webkit-slider-thumb {
+ background-color: #fff;
+}
+
+.flareVideo .controls .volume .volRange .ui-slider-handle {
+ height: 14px;
+}
+
+.flareVideo .controls .timeMin,
+.flareVideo .controls .timeMax {
+ display: none;
+}
+
+.flareVideo .controls .seek {
+ background-color: rgba(23, 35, 34, 0.74);
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ height: 40px;
+}
+
+.flareVideo .controls .pause,
+.flareVideo .controls .play {
+ width: 65px;
+ height: 40px;
+ text-indent: -5000px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-color: rgba(23, 35, 34, 0.74);
+}
+
+.flareVideo .controls .pause:hover,
+.flareVideo .controls .play:hover {
+ background-color: #31A0E5;
+}
+
+.flareVideo .controls .pause {
+ display: none;
+ background-image: url(../images/vimeo/pause.png);
+}
+
+.flareVideo .controls .play {
+ display: block;
+ background-image: url(../images/vimeo/play.png);
+}
+
+.flareVideo.playing .controls .play {
+ display: none;
+}
+
+.flareVideo.playing .controls .pause {