iOS fix (Fixes #166), Edge Progress Tip (Fixes #160), SASS fix (Fixes #158)

This commit is contained in:
Sam Potts
2016-02-13 22:18:42 +11:00
parent a8cea7b5c9
commit ce51344269
10 changed files with 57 additions and 33 deletions

View File

@ -13,7 +13,8 @@ plyr.setup('.js-media-player', {
},
captions: {
defaultActive: true
}
},
duration: 100
});
// Setup shr
@ -58,13 +59,19 @@ shr.setup({
// On load
if(historySupport) {
var video = !currentType.length;
// If there's no current type set, assume video
if(video) {
currentType = types.video;
}
// Replace current history state
if(currentType in types) {
history.replaceState({ 'type': currentType }, '', (video ? '' : '#' + currentType));
}
if(!video) {
// If it's not video, load the source
if(currentType !== types.video) {
newSource(currentType, true);
}
}
@ -86,7 +93,6 @@ shr.setup({
function newSource(type, init) {
// Bail if new type isn't known, it's the current type, or current type is empty (video is default) and new type is video
if(!(type in types) || (!init && type == currentType) || (!currentType.length && type == types.video)) {
console.warn('Unregonized type.');
return;
}