Permalink
Browse files

Player and video changes

  • Loading branch information...
1 parent 2f05dac commit fd70f8429fce6f1955889ed2d8a820990a219ce1 @lfbrandao lfbrandao committed May 1, 2012
Showing with 16 additions and 2 deletions.
  1. +10 −0 web/.htaccess
  2. +1 −1 web/js/plugins/layers/video/video.js
  3. +5 −1 web/js/plugins/players/plyr.js
View
10 web/.htaccess
@@ -4,3 +4,13 @@
RewriteRule ^(.*)$ app_dev.php [QSA,L]
</IfModule>
+# Maintenance redirect - needs to be adjusted with the correct root folder and ip
+#Options +FollowSymlinks
+# RewriteEngine on
+ # redirect all requests except these
+# RewriteCond %{REQUEST_URI} !/maintenance.html$
+# RewriteCond %{REQUEST_URI} !/images/zeegaAlpha.png$
+ # don't redirect requests from this IP address
+# RewriteCond %{REMOTE_HOST} !^67.186.132.2
+
+# RewriteRule $ /maintenance.html [R=302,L]
View
2 web/js/plugins/layers/video/video.js
@@ -26,9 +26,9 @@
{
console.log(this.get('attr'));
console.log(this);
- //if( _.isUndefined(this.get('attr').attribution_uri)) this.set({attribution_uri:this.get('attribution_url')});
this.video = new Plyr2({
url : this.get('attr').attribution_uri,
+ url_dep : this.get('attr').attribution_url,
uri : this.get('attr').uri,
id : this.id,
cue_in : this.get('attr').cue_in,
View
6 web/js/plugins/players/plyr.js
@@ -97,13 +97,17 @@ var Plyr2 = Backbone.Model.extend({
//set video format type
this.set(options);
console.log(this);
- this.set( 'format', this.getFormat(this.get('url')) );
+ var url =this.get('url');
+ if(!_.isUndefined(url))this.set( 'format', this.getFormat(this.get('url')) );
+ else this.set( 'format', this.getFormat(this.get('url_dep')) );
},
getFormat : function(url)
{
//separated to make it easier to isolate and update this list
var format = '';
+
+
if( url.match(/^http:\/\/(?:www\.)?youtube.com\/watch\?(?=.*v=\w+)(?:\S+)?$/) ) format = 'youtube'
else if ( url.match(/^http:\/\/(?:www\.)?vimeo.com\/(.*)/) ) format = 'vimeo'
else format = 'html5';

0 comments on commit fd70f84

Please sign in to comment.