Skip to content

Instantly share code, notes, and snippets.

View rafa8626's full-sized avatar
🗯️
Preparing for certification

Rafael Miranda rafa8626

🗯️
Preparing for certification
View GitHub Profile
@rafa8626
rafa8626 / audio-tag.html
Last active May 9, 2017 05:05
MediaElementPlayer.js: use AudioContext.decodeAudioData()
<audio id="player1" preload="none" controls style="max-width:100%;"></audio>
@rafa8626
rafa8626 / skip-sources.js
Last active June 20, 2017 11:32
MediaElement.js: Skip to next source if previous cannot be played
new MediaElementPlayer('player-id', {
// More MEJS config
success: function (media, node, player) {
// Your code when successful
// Gather list of children
var mediaFiles = player.mediaFiles ? player.mediaFiles : node.children(), tmpFiles = [];
media.addEventListener('error', function () {