This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpHeaders; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse.BodyHandlers; | |
import java.nio.charset.StandardCharsets; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Use keyboard shortcuts to handle <audio> tags. | |
* - space : Pauses the player on the site | |
* - left arrow : Reel the audio 10 seconds back in time | |
* - right arrow : Reel the audio 10 seconds forth in time | |
*/ | |
var player = document.getElementById('player') | |
if (player) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var audio = document.querySelector('audio'); | |
if (audio) { | |
window.addEventListener('keydown', function (event) { | |
var key = event.which || event.keyCode; | |
if (key === 32) { // spacebar |