Skip to content

Commit

Permalink
remove play button on mobile, fix brand rand outside range and autopl…
Browse files Browse the repository at this point in the history
…ay video for mobile devices that allow it #32
  • Loading branch information
MathieuNls committed Jul 8, 2015
1 parent 60d4c24 commit 55b5f89
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions application/controllers/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ function result(){

private function homeMessage(){

$rand = rand ( 0 , 3 );
$randBrands = rand ( 0 , 2 );

$watchBrands = array('Seiko', 'Rolex', 'Omega');
$videos = array('Omega.mp4', 'Rolex.mp4', 'Zenith.mp4', 'Vacheron.mp4');

$video = vid_url('Zenith.mp4');

return array('title'=>$this->measure
->getMeasuresCountByWatchBrand($watchBrands[rand ( 0 , 2 )]) .
' ' . $watchBrands[$rand] . ' measured on Toolwatch.io',
->getMeasuresCountByWatchBrand($watchBrands[$randBrands]) .
' ' . $watchBrands[$randBrands] . ' measured on Toolwatch.io',
'video_url'=>vid_url($videos[rand ( 0 , 3 )]));

}
Expand Down
5 changes: 4 additions & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,10 @@ button[name=syncDone],
box-shadow: 0 1px 4px #DDDDDD, 0 1px 0 #929292 inset;
}

.mejs-container .mejs-controls .mejs-overlay-button{ visibility:hidden !important; }
.mejs-container .mejs-controls,
.mejs-overlay-button {
visibility:hidden !important;
}


.slogan-home h1{
Expand Down
10 changes: 9 additions & 1 deletion assets/js/home.logic.mobile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
$( document ).ready(function() {

$('video,audio').mediaelementplayer();
$('video,audio').mediaelementplayer({
loop: true,
success: function (mediaElement, domObject) {

// call the play method
mediaElement.play();

},
});
$('header').addClass('blue');
$('header').addClass('blue');
$('.navbar').css('min-height', '20px');
Expand Down

0 comments on commit 55b5f89

Please sign in to comment.