From 04e20c10c7a01d78c08b8aa87dbeeb0061c535f5 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 24 Oct 2014 14:53:50 -0400 Subject: setting up embed, hide play bar --- public/assets/javascripts/app.js | 35 ++++++++++++++++++++++++++--------- public/assets/stylesheets/app.css | 5 +++++ 2 files changed, 31 insertions(+), 9 deletions(-) (limited to 'public') diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index f26a782..42e8a53 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -17,21 +17,38 @@ else { new WOW().init(); -$('.hero .circle').click( function(){ - $('.videoModal').addClass('active'); -}); - -$('.videoModal .ion-ios7-close-empty').click( function(){ - $('.videoModal').removeClass('active'); -}); - +$(function(){ + var player + $('.hero .circle').click( function(){ + $('.videoModal').css("display","table").addClass('active'); + player = $f( okplayer ) + player.api('play') + player.addEvent('ready', function(){ + player.api('play') + player.addEvent('finish', function(){ + hide() + }) + }) + }); + + $('.videoModal .ion-ios7-close-empty').click( function(){ + player.api('pause') + hide() + }) + + function hide() { + $('.videoModal').fadeOut(300, function(){ + $('.videoModal').removeClass('active'); + }) + } +}) var scene, cam, map; var app = new function(){} app.mode = { editor: false, builder: false } - + app.init = function () { app.tube = new Tube () app.router = new SiteRouter () diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 4dfb707..2d52633 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -107,6 +107,11 @@ a{ -moz-transition:0.4s background; transition:0.4s background; display:none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; } .videoModal.active { -- cgit v1.2.3-70-g09d2