#221 ✓ checked-in
Scott Downe

Popcorn.parser structure like Popcorn.plugin

Reported by Scott Downe | December 15th, 2010 @ 01:42 PM | in 0.2 release

Basically, you should create a parser like so:

Popcorn.parser("parseXML", ".XML", function( data ) {/* parser code here */});

Then use it like so:

  <script>
    document.addEventListener('DOMContentLoaded', function () {
      var p = Popcorn('#video')
        .parseXML("data.XML")
        .play() 

    }, false);

  </script>

This will load in all the data in the file defined by the string. Internally or inside the plugin we will use the XHR in ticket #220.

The parser functions need some sort of type, the extension stored. This is how data-timeline-sources knows which parser function to call. Currently I would add a second param to the parserPlugin signature that is the extension.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Popcorn.js is an HTML5 video framework that lets you bring elements of the web into your videos.

Popcorn.js is a project of Web Made Movies, Mozilla's Open Video Lab.

Shared Ticket Bins

People watching this ticket

Referenced by

Pages