diff options
author | Sam Potts <me@sampotts.me> | 2016-02-13 22:18:42 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2016-02-13 22:18:42 +1100 |
commit | ce513442699f4b3c964adf06d9baa49821351ce3 (patch) | |
tree | ecf4a059ebd51defcc065645ab4303534b43a89e /docs/src/js/docs.js | |
parent | a8cea7b5c99ce2c6bfc8c869b17f7a55da77a455 (diff) | |
download | plyr-ce513442699f4b3c964adf06d9baa49821351ce3.tar.lz plyr-ce513442699f4b3c964adf06d9baa49821351ce3.tar.xz plyr-ce513442699f4b3c964adf06d9baa49821351ce3.zip |
iOS fix (Fixes #166), Edge Progress Tip (Fixes #160), SASS fix (Fixes #158)
Diffstat (limited to 'docs/src/js/docs.js')
-rw-r--r-- | docs/src/js/docs.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/src/js/docs.js b/docs/src/js/docs.js index 563d2ebe..bedb91cb 100644 --- a/docs/src/js/docs.js +++ b/docs/src/js/docs.js @@ -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; } |