#413 ✓ resolved

Allow plugins to express time in time stamp strings.

Reported by edsfault | March 16th, 2011 @ 10:06 AM | in 0.7

Plugins currently receive an object as a parameter. This object usually has start and end fields. This values of these fields must be numbers that represent seconds e.g. 4.309 seconds. I think the start and end fields should accept the standard time formats discussed in bug 118.

For example:

      var p = Popcorn('#video')
      // use the footnote plugin
      // notice the <div id='footnotediv'> tag at the bottom of the page
        start: "38:01.245", // Minute 38, second 1.245
        end: "40:23 4/24" , // Minute 40, 4th frame of the 23rd second (where a second has 24 frames)
        text: 'This video made exclusively for drumbeat.org',
        target: 'footnotediv'
      } ).play() ;

I think a reasonable way to do this in a centralized way, is to add to the core a time parser function that plugins can use. Or to allow plugins pass the raw time stamp string to the core so the core can parse it, which also imply a time parser function in the core.

Comments and changes to this ticket

  • edsfault

    edsfault April 17th, 2011 @ 01:25 PM

    OK so since ticket 118 is staged, this bug can build upon on it. Parsers currently do their own thing when it comes to parsing time strings. There is a function in Popcorn.util called toSeconds that does it, and accepts the supported time formats. So these parsers will have to either use this function, or just pass the time strings raw, and let the core parse them.

  • edsfault

    edsfault May 1st, 2011 @ 05:33 PM

    Hello. I'd really like some feedback here. Right now, the parsers do time parsing themselves, which mean they do not benefit from the fix 118. It also means that they are probably not compliant with the standard time formats agreed upon. Now, that being said, I now believe that this is too big a bug though, and It is best to separate them, and make each parser fix its own bug.

    Any ideas? I'd appreciate some feedback on this matter.

  • Rick

    Rick May 1st, 2011 @ 07:35 PM

    I'd recommen filing a bug for each parser that needs to be updated. That way, no one ticket can block the progress of another and we can mark the conclusion of each in turn.

  • Rick

    Rick May 8th, 2011 @ 07:38 PM

    • State changed from “new” to “assigned”
    • Milestone set to 0.6
    • Milestone order changed from “1” to “0”

    @edsfault how is this coming along?

  • annasob

    annasob May 10th, 2011 @ 04:47 PM

    • Milestone changed from 0.6 to 0.7
    • Milestone order changed from “2” to “0”
  • Scott Downe

    Scott Downe June 2nd, 2011 @ 04:13 PM

    • Assigned user changed from “edsfault” to “Scott Downe”
  • Rick

    Rick June 2nd, 2011 @ 04:46 PM

    • State changed from “assigned” to “resolved”

    This is actually done...

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

Referenced by