Started working on the music player
This commit is contained in:
parent
89e51e2da7
commit
04b7376cbd
@ -1,7 +1,6 @@
|
|||||||
{% extends 'templates/default.twig' %}
|
{% extends 'templates/default.twig' %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
<script type="text/javascript" src="/js/modules/music-player.js"></script>
|
|
||||||
<script type="text/javascript" src="/js/music.js"></script>
|
<script type="text/javascript" src="/js/music.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{% extends 'templates/default.twig' %}
|
{% extends 'templates/default.twig' %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
<script type="text/javascript" src="/js/modules/music-player.js"></script>
|
|
||||||
<script type="text/javascript" src="/js/music.js"></script>
|
<script type="text/javascript" src="/js/music.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -7,10 +7,12 @@
|
|||||||
<title>{% block title %}{% endblock %} | Halftone</title>
|
<title>{% block title %}{% endblock %} | Halftone</title>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/2.23.4/mediaelementplayer.min.css">
|
||||||
<link rel="stylesheet" href="/css/main.css" media="screen,projection"/>
|
<link rel="stylesheet" href="/css/main.css" media="screen,projection"/>
|
||||||
{% block stylesheets %}{% endblock %}
|
{% block stylesheets %}{% endblock %}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/2.23.4/mediaelementplayer.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/main.js"></script>
|
<script type="text/javascript" src="/js/main.js"></script>
|
||||||
{% block javascripts %}{% endblock %}
|
{% block javascripts %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
@ -1,7 +1,26 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#music-player').musicPlayer({
|
var player = new MediaElementPlayer('#music-player', {
|
||||||
'audio': '#music-player',
|
// initial volume when the player starts
|
||||||
'volume': .5,
|
startVolume: 0.5,
|
||||||
'startTime': 0
|
// useful for <audio> player loops
|
||||||
})
|
loop: false,
|
||||||
|
// enables Flash and Silverlight to resize to content size
|
||||||
|
enableAutosize: true,
|
||||||
|
// the order of controls you want on the control bar (and other plugins below)
|
||||||
|
features: ['playpause','progress','current','duration','tracks','volume'],
|
||||||
|
// Hide controls when playing and mouse is not over the video
|
||||||
|
alwaysShowControls: false,
|
||||||
|
// force iPad's native controls
|
||||||
|
iPadUseNativeControls: false,
|
||||||
|
// force iPhone's native controls
|
||||||
|
iPhoneUseNativeControls: false,
|
||||||
|
// force Android's native controls
|
||||||
|
AndroidUseNativeControls: false,
|
||||||
|
// forces the hour marker (##:00:00)
|
||||||
|
alwaysShowHours: false,
|
||||||
|
// turns keyboard support on and off for this instance
|
||||||
|
enableKeyboard: true,
|
||||||
|
// when this player starts, it will pause other players
|
||||||
|
pauseOtherPlayers: true
|
||||||
|
});
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user