Skip to content
Permalink
Browse files

Add stream seeking logic back in, and update bulid number

  • Loading branch information...
ironman5366 committed May 29, 2019
1 parent 3c385ef commit ad9aa572f44a002e2599a69bede21dd11a0d4bd2
Showing with 18 additions and 2 deletions.
  1. +8 −0 index.html
  2. +1 −1 package.json
  3. +9 −1 schedule.html
@@ -154,6 +154,14 @@ <h1>Upcoming</h1>
// Update the Audio
var method = pause ? 'pause': 'play';
var bufferLength = yourAudio.buffered.length;
if (bufferLength >= 1){
bufferLength--;
console.log("Buffering");
// Seek to the end of the stream regardless
yourAudio.currentTime = yourAudio.buffered.end(bufferLength);
}
yourAudio[method]();
// Prevent Default Action
@@ -1,6 +1,6 @@
{
"name": "krlxdesktop",
"version": "1.0.3",
"version": "1.0.4",
"description": "A desktop player for KRLX",
"main": "index.js",
"scripts": {
@@ -70,13 +70,21 @@ <h1>Schedule</h1>
ctrl = document.getElementById('audioControl');
function do_playpause(){
// Update the Button
// Update the Button
var pause = ctrl.innerHTML === pause_button;
ctrl.innerHTML = pause ? play_button : pause_button;
// Update the Audio
var method = pause ? 'pause': 'play';
visitor.event("Music", method).send();
var bufferLength = yourAudio.buffered.length;
if (bufferLength >= 1){
bufferLength--;
console.log("Buffering");
// Seek to the end of the stream regardless
yourAudio.currentTime = yourAudio.buffered.end(bufferLength);
}
yourAudio[method]();
// Prevent Default Action

0 comments on commit ad9aa57

Please sign in to comment.
You can’t perform that action at this time.