Skip to content

Instantly share code, notes, and snippets.

View danpastori's full-sized avatar
✍️
Writing a book about building APIs and SPAs with @vuejs & @laravel

Dan Pastori danpastori

✍️
Writing a book about building APIs and SPAs with @vuejs & @laravel
View GitHub Profile
<link href="/css/jquery.tagsinput.css" rel="stylesheet">
<link href="/css/jquery-ui.min.css" rel="stylesheet">
<script src="/js/jquery.js"></script>
<script src="/js/jquery-ui.min.js"></script>
<script src="/js/jquery.tagsinput.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>Single Song Picture Tutorial</title>
<script type="text/javascript" src="js/amplitude.js"></script>
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
</head>
<div class="player">
<div class="player-top">
<div class="amplitude-play-pause amplitude-list-paused" amplitude-song-index="2"></div>
var new_song_visual_display = '<div class="player" id="new-player">'
+ '<div class="player-top">'
+ '<div class="amplitude-play-pause amplitude-list-paused" amplitude-song-index="'+new_song_index+'"></div>'
+ '<div class="track-info-container">'
+'<span class="amplitude-now-playing-title">Epitaph</span> <span class="slash">-</span><br><span class="amplitude-now-playing-artist">Jake Jendusa</span>'
+ '</div>'
+ '<div class="time-info-container">'
+ '<span class="amplitude-current-time" amplitude-current-time-index="'+new_song_index+'">0:00</span> / <span class="amplitude-audio-duration" amplitude-audio-duration-index="'+new_song_index+'">0:00</span>'
+ '</div>'
+ '<input type="range" class="amplitude-song-slider" amplitude-song-slider-index="'+new_song_index+'" value="0"/>'
var new_song = {
"name": "Epitaph",
"artist": "Jake Jendusa",
"album": "In Search Of",
"url": "songs/In%20Search%20Of/03%20Epitaph.mp3",
"live": false
}
<div id="new-song-container">
</div>
<button onclick="add_song()">Add Song</button>
function add_song(){
//New Song Object
var new_song = {
"name": "Epitaph",
"artist": "Jake Jendusa",
"album": "In Search Of",
"url": "songs/In%20Search%20Of/03%20Epitaph.mp3",
"live": false
}
div#container{
background: #e9bb7f; /* Old browsers */
background: -moz-linear-gradient(-45deg, #e9bb7f 0%, #957055 50%, #59403f 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#e9bb7f), color-stop(50%,#957055), color-stop(100%,#59403f)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(-45deg, #e9bb7f 0%,#957055 50%,#59403f 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(-45deg, #e9bb7f 0%,#957055 50%,#59403f 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(-45deg, #e9bb7f 0%,#957055 50%,#59403f 100%); /* IE10+ */
background: linear-gradient(135deg, #e9bb7f 0%,#957055 50%,#59403f 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e9bb7f', endColorstr='#59403f',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
position: absolute;
<!DOCTYPE html>
<html>
<head>
<title>Single Song Live</title>
<script type="text/javascript" src="js/amplitude.js"></script>
<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/single-song-live.css"/>
</head>
<body>
<div id="container">
<script type="text/javascript">
amplitude_config = {
"amplitude_songs": [
{
"name": "WTMJ 620 AM",
"album": "Milwaukee, WI",
"url": "http://1942.live.streamtheworld.com/WTMJAM_SC",
"live": true,
"cover_art_url": "images/wtmj620.png"
}
<script type="text/javascript" src="js/amplitude.js"></script>