Skip to content

Commit

Permalink
Merge branch 'fail-gracefully'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGermuska committed Jul 18, 2016
2 parents d342a0b + b2ce0b3 commit d1f1553
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions soundcite/js/soundcite.js
Expand Up @@ -129,7 +129,8 @@
el.style.cssText =
'background: -webkit-linear-gradient(left, rgba(0,0,0,.15)' + percentage + '%, rgba(0,0,0,.05)' + (percentage + 1) + '%);'
+ 'background: linear-gradient(to right, rgba(0,0,0,.15)' + percentage + '%, rgba(0,0,0,.05)' + (percentage + 1) + '%);'
}
},
soundcloud_client_id: "5f016c08c2201881c4217afd5f52e065"
}
for(var key in window.SOUNDCITE_CONFIG) {
SOUNDCITE_CONFIG[key] = window.SOUNDCITE_CONFIG[key];
Expand All @@ -155,7 +156,7 @@
// initialize SoundCloud SDK
if($SoundCloud) {
$SoundCloud.initialize({
client_id: "5ba7fd66044a60db41a97cb9d924996a"
client_id: SOUNDCITE_CONFIG['soundcloud_client_id']
});
}

Expand Down Expand Up @@ -407,8 +408,10 @@
var el = soundcite_elements[i];
if(el.getAttribute('data-url')) {
new PopcornClip(el);
} else {
} else if (el.getAttribute('data-id')) {
new SoundCloudClip(el);
} else {
console.log('Unable to form Soundcite element because of missing attributes. The offending Soundcite was "' + el.textContent + '."');
}
}

Expand Down
5 changes: 3 additions & 2 deletions website/templates/examples-test.html
Expand Up @@ -6,19 +6,20 @@
<link rel="stylesheet" href="/soundcite/css/player.css">
<!-- endbuild -->
<!-- build:js //cdn.knightlab.com/libs/soundcite/%(cdn)s/js/soundcite.min.js -->
<script src="https://connect.soundcloud.com/sdk/sdk-3.1.1.js"></script>
<script type="text/javascript" src="/soundcite/js/soundcite.js"></script>
<!-- endbuild -->
</head>
<body>

<h2>Test Page</h2>
<p><b>navigator.userAgent =</b><em>
<script type="text/javascript">document.write(navigator.userAgent)</script>
</em></p>

<p><b>mobile test =</b><em>
<script type="text/javascript">document.write(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))</script>
</em></p>
</em></p>


<h3>Tame Impala's Elephant (SoundCloud)</h3>
Expand Down
1 change: 1 addition & 0 deletions website/templates/index.html
Expand Up @@ -24,6 +24,7 @@ <h2>Using SoundCite</h2>
<!-- NOTE: These columns do not add up to 12 because the Bootstrap 'well's' padding isn't taking into account by the responsive grid. -->
<article class="span9">
<h5>Music</h5>

<p>Tame Impala have never shied away from the sounds of classic rock radio, but "Elephant" is the first time they've gone deep into its mythology and symbolism. <!-- The first official single from their sophomore LP, <em>Lonerism</em>, --> ... [It] initially sounds like a pure top-down songwriting exercise- as in, "let's try to sound like the song's badass title." So, <span data-end="4820" data-start="1" data-url="{{ MEDIA_URL }}/tame-impala_elephant.mp3" class="soundcite">thick, one-note guitar riffs</span> shuffle and stomp ... <!-- with a heavy beat.--></p>
</article>
</div>
Expand Down

0 comments on commit d1f1553

Please sign in to comment.