From: ScottDowne Date: Wed, 5 Jan 2011 17:22:54 +0000 (-0500) Subject: [#221] initial data-timeline-sources X-Git-Tag: v0.2~18^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=640fc4b15e0aba6768d5abd98e8db38af59a97c0;p=popcorn-js.git [#221] initial data-timeline-sources --- diff --git a/parsers/parserXML/data.XML b/parsers/parserXML/data.XML deleted file mode 100644 index a1657d5..0000000 --- a/parsers/parserXML/data.XML +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/parsers/parserXML/popcorn.parseXML.html b/parsers/parserXML/popcorn.parseXML.html index 2b7f45f..ea9c159 100644 --- a/parsers/parserXML/popcorn.parseXML.html +++ b/parsers/parserXML/popcorn.parseXML.html @@ -7,22 +7,14 @@ -

Popcorn 0.1 parser Plug-in Demo

-
+ diff --git a/parsers/parserXML/unit.XML b/parsers/parserXML/unit.XML deleted file mode 100644 index c7efe8c..0000000 --- a/parsers/parserXML/unit.XML +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - item4 - - - - - - diff --git a/popcorn.js b/popcorn.js index 56e94e8..435cfb8 100644 --- a/popcorn.js +++ b/popcorn.js @@ -852,4 +852,19 @@ // Exposes Popcorn to global context global.Popcorn = Popcorn; + document.addEventListener('DOMContentLoaded', function () { + + var video = document.getElementsByTagName( 'video' ); + for ( var i = 0, l = video.length; i < l; i++ ) { + var ind = i, + videoSources = video[ind].getAttribute( 'data-timeline-sources' ); + if (videoSources) { + var p = Popcorn('#' + video[ind].getAttribute( 'id' ) ) + .parseXML( videoSources ) + .play(); + } + } + + }, false); + })(window, window.document);