#927 feature-request
Scott Downe

start and end functions on plugin definition not defaulted

Reported by Scott Downe | March 1st, 2012 @ 04:03 PM | in 1.5

If someone creates a plugin with no start or end function, then trys to call it, it will error.

Example:

Popcorn.plugin( "grog", {});

p.grog({
  start: 10,
  end: 15
});

p.currentTime( 12 ); // this will attempt to call a start function that does not exist

I see a use case in this for people that only want a start or end function, and are not concerned with the other.

A plugin with neither start and end has no use case, though. I am requesting this for people that want one, and not the other.

This is actually easy to fix.

      natives.start = natives.start || natives[ "in" ] || Popcorn.nop;
      natives.end = natives.end || natives[ "out" ] || Popcorn.nop;

Just adding the nop lines.

Comments and changes to this ticket

  • David Humphrey

    David Humphrey May 4th, 2012 @ 09:41 PM

    • State changed from “assigned” to “feature-request”
    • Assigned user cleared.
    • Milestone changed from 1.3 to 1.4
    • Milestone order changed from “6” to “0”

    A plugin with only start I can imagine. I plugin with only end makes no sense, as does a plugin with no start AND end. I wonder if this is simply a bug that we shouldn't allow?

    I sort of lean toward WONTFIX.

  • David Seifried

    David Seifried September 21st, 2012 @ 10:03 AM

    • Milestone changed from 1.4 to 1.5
    • Milestone order changed from “24” to “0”

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

Pages