2014-08-29 11:28:58 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
2014-08-29 11:33:10 -04:00
|
|
|
<title>PLAY AFRICA</title>
|
2014-08-29 11:28:58 -04:00
|
|
|
<!--[if IE]>
|
|
|
|
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
|
|
<![endif]-->
|
2014-09-24 16:56:48 -04:00
|
|
|
<link rel="stylesheet" href="assets/styles/style.css" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="assets/styles/font.css" type="text/css" />
|
|
|
|
<script src="assets/scripts/rainyday.js"></script>
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jplayer/2.7.1/jquery.jplayer/jquery.jplayer.js"></script>
|
2014-08-29 11:28:58 -04:00
|
|
|
</head>
|
2014-08-29 13:50:57 -04:00
|
|
|
<body>
|
2014-09-24 16:56:48 -04:00
|
|
|
<!--<audio autoplay="autoplay" loop="loop">
|
2014-08-29 13:50:57 -04:00
|
|
|
<source src="assets/audio/africa.ogg" />
|
|
|
|
<source src="assets/audio/africa.mp3" />
|
2014-09-24 16:56:48 -04:00
|
|
|
</audio>-->
|
2014-08-29 13:50:57 -04:00
|
|
|
<img id="background" src="" />
|
2014-09-24 16:56:48 -04:00
|
|
|
|
|
|
|
<div id="container">
|
|
|
|
<div id="player"></div>
|
|
|
|
<div id="play" class="button"><i class="icon-play"></i></div>
|
|
|
|
<div id="pause" class="button"><i class="icon-pause"></i></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
if(isMobile.any()) {
|
|
|
|
$('#pause').hide();
|
|
|
|
} else {
|
|
|
|
$('#play').hide();
|
2014-09-25 09:59:13 -04:00
|
|
|
$('#pause').show();
|
2014-09-24 16:56:48 -04:00
|
|
|
}
|
|
|
|
var mediaPlayer = jQuery('#player');
|
|
|
|
|
|
|
|
mediaPlayer.jPlayer({
|
|
|
|
//swfPath: '/swf/Jplayer.swf',
|
|
|
|
solution: "html",//"flash, html",
|
|
|
|
supplied : 'mp3, oga, m4a',
|
|
|
|
cssSelector: {
|
|
|
|
play: '#play',
|
|
|
|
},
|
|
|
|
|
|
|
|
ready: function() {jQuery(this).jPlayer("setMedia", {
|
|
|
|
mp3: 'assets/audio/africa.mp3',
|
|
|
|
oga: 'assets/audio/africa.oga',
|
|
|
|
m4a: 'assets/audio/africa.m4a'
|
2014-09-24 17:37:17 -04:00
|
|
|
}).jPlayer("play");},
|
|
|
|
|
|
|
|
loop: true
|
2014-09-24 16:56:48 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#play').click(function() {
|
2014-09-25 09:59:13 -04:00
|
|
|
//if(isMobile.any()) {
|
2014-09-24 16:56:48 -04:00
|
|
|
$('#play').hide();
|
|
|
|
$('#pause').show();
|
2014-09-25 09:59:13 -04:00
|
|
|
//}
|
2014-09-24 16:56:48 -04:00
|
|
|
$('#player').jPlayer('play');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#pause').click(function() {
|
2014-09-25 09:59:13 -04:00
|
|
|
//if(isMobile.any()) {
|
2014-09-24 16:56:48 -04:00
|
|
|
$('#play').show();
|
|
|
|
$('#pause').hide();
|
2014-09-25 09:59:13 -04:00
|
|
|
//}
|
2014-09-24 16:56:48 -04:00
|
|
|
$('#player').jPlayer('pause');
|
|
|
|
});
|
|
|
|
|
2014-08-29 11:43:15 -04:00
|
|
|
var image = document.getElementById('background');
|
|
|
|
image.onload = function() {
|
|
|
|
var engine = new RainyDay({
|
|
|
|
image: this
|
|
|
|
});
|
|
|
|
engine.rain([ [3, 2, 2] ], 100);
|
|
|
|
};
|
2014-09-24 16:56:48 -04:00
|
|
|
image.src = 'assets/images/africa.png';
|
2014-08-29 13:50:57 -04:00
|
|
|
image.crossOrigin = 'anonymous';
|
2014-09-24 16:56:48 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
var isMobile = {
|
|
|
|
Android: function() {
|
|
|
|
return navigator.userAgent.match(/Android/i);
|
|
|
|
},
|
|
|
|
BlackBerry: function() {
|
|
|
|
return navigator.userAgent.match(/BlackBerry/i);
|
|
|
|
},
|
|
|
|
iOS: function() {
|
|
|
|
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
|
|
|
|
},
|
|
|
|
Opera: function() {
|
|
|
|
return navigator.userAgent.match(/Opera Mini/i);
|
|
|
|
},
|
|
|
|
Windows: function() {
|
|
|
|
return navigator.userAgent.match(/IEMobile/i);
|
|
|
|
},
|
|
|
|
any: function() {
|
|
|
|
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
|
|
|
|
}
|
|
|
|
};
|
2014-08-29 11:43:15 -04:00
|
|
|
</script>
|
2014-08-29 11:28:58 -04:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|