From 2c4c8c58d5c4ee7f9fa8c1e508276d5d49289237 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 5 Oct 2015 01:39:55 +1100 Subject: Docs tweaks --- src/js/plyr.js | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/js') diff --git a/src/js/plyr.js b/src/js/plyr.js index e596f74a..ed4352e0 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1790,20 +1790,6 @@ _updateProgress(event); } - // Remove children and src attribute - /*function _removeSources() { - // Find child elements - var sources = player.media.querySelectorAll('source'); - - // Remove each - for (var i = sources.length - 1; i >= 0; i--) { - _remove(sources[i]); - } - - // Remove src attribute - player.media.removeAttribute('src'); - }*/ - // Add a source element function _addSource(attributes) { _insertElement('source', player.media, attributes); @@ -1949,7 +1935,12 @@ if (config.autoplay) { _play(); } - } + } + + if('title' in source) { + config.title = source.title; + _setupPlayAria(); + } } // Update poster -- cgit v1.2.3