removePlugin is only on the popcorn instance, but removes plugins from the entire Popcorn scope
Currently, Popcorn.removPlugin() is undefined, and Popcorn( "#video" ).removePlugin( 'pluginname' ) removes a plugin from all of popcorn.
This is undesirable. removPlugin should work like this:
Popcorn.removePlugin( 'pluginname' ) should be a static method that removes a plugin from Popcorn.
Popcorn( "#video" ).removePlugin( 'pluginname' ) should remove plugins from that instance, and leave other instances alone.
Comments and changes to this ticket
- State changed from assigned to peer-review-requested
OK, if you want to remove all plugins from popcorn, use:
From an instance:
A significant change was done for this, that being: tracks are no longer removed when the plugin is removed, but instead removed when a track that has a plugin that no longer exists is executed, it is removed then instead.
The advantages of this is it saves going through potentially large loops and removing potentially large amounts of data, that may never be used again anyway. Also, removing all tracks from all instances of popcorn could potentially be pretty nasty.
A little philosophy comes from this: "Why remove something that will never be?"
- State changed from under-review to peer-review-requested
- Assigned user changed from Rick to Scott Downe
The current state ^^
There is still the problem of a plugin being available to an instance after removal. All tracks will be removed, but the plugin still exists.
I also think the way removeTrackEvent removes by id can be improved upon, as currently I am looping twice. Once to find the id of anything with name === to track type, and again to find it and remove it based on the id. What we should probably do is allow removeTrackEvent to remove by plugin name AND id... while not changing the API of removeTrackEvent.
I also think maybe there should be a way to access all instances of Popcron from Popcorn, that way I can remove all tracks from all of popcorn in one function, and not rely on the update function to remove anything that does not exist.
- State changed from review-needs-work to peer-review-requested
Alright, tests are passing in 4.0 and 3.6.
This was a combination of inaccurate testing and bugs in core.
exec test is still failing in FF 3.6, but it is failing in 0.4 under FF 3.6 as well, so not this tickets problem.
I merged with 0.4, and included the fixes introduced in #319 as the removePlugin function was moved to another location.
With the number of changes here, and the time gap and differences of 0.3 now being 0.4, I think this should be peer-reviewed again.
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.