The Bible in a Year (with Fr. Mike Schmitz): Day 31: Frogs, Gnats, and Flies


Simple Sharing Page

A clean, simple landing page with an embedded HTML5 audio player (and audio cards for Twitter and Facebook).

Embeddable Audio Player

Paste this code to embed an HTML5 audio player with controls.

Download URL

Useful if you want to create a direct download link, embed in your own player, post from another publishing engine, link to from Patreon, etc.’

Social Network Quick Links

// Get the timecode (in seconds) from the URL
var seconds = getUrlParameter(‘t’);

$(function() {
// Create a new instance of the MediaElement Player
$(‘#audio_player’).mediaelementplayer({
audioHeight: 40,
startVolume: 1.0,
alwaysShowHours: true,
features: [‘playpause’,’progress’,’current’,’|’,’duration’,’volume’,’speed’],
success: function(mediaElement, originalNode) {
mediaElement.addEventListener(‘loadeddata’, function() {
// Player is ready
// Set the playhead based on URL parameters
if (parseInt(seconds) > 0) {
mediaElement.setCurrentTime(parseInt(seconds));
}
}, false);

// When the user actually presses play, send a request to Aphid to track
// the play and update the play-count in a more accurate fashion.
// This avoids the false-downloads that Safari generates on page-load.
var playcount = 0;
mediaElement.addEventListener(‘playing’, function() {
if (playcount==0) {
jQuery.get(“https://aphid.fireside.fm/d/1437767933/c6354d0d-bd10-4eed-b811-1bb569d46efd/7e233414-5b76-4416-82ca-cf1c5be2c819.mp3”);
playcount += 1;
}
}, false);

// Listener to update the Link with Timecode URL
mediaElement.addEventListener(‘timeupdate’, function(e) {
$(“#timestamp_link”).prop(“href”, “/day-31?t=” + parseInt(mediaElement.currentTime));
}, false);
}
});

// Activate modals
$(‘a[data-modal]’).click(function(event) {
$(this).modal({
fadeDuration: 100,
});
return false;
});
});

// Twitter Share code
window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = “https://platform.twitter.com/widgets.js”;
fjs.parentNode.insertBefore(js, fjs);

t._e = [];
t.ready = function(f) {
t._e.push(f);
};

return t;
}(document, “script”, “twitter-wjs”));

// Facebook Share Code
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.7&appId=199922820059602”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *