List Butter's Popcorn Dependencies
We need a list of butter's popcorn dependencies so we can write tests that will prevent changes in popcorn from negatively affecting butter.
These should include everything from butter's expectations of popcorn's object format to popcorn's API.
Comments and changes to this ticket
- Popcorn.registry must be present to provide list of 'Commands'
- must have the following properties/functions
- plugin.type must be a string (to provide id's to html elements)
- also used for finding appropriate image (using regex)
- must be addressable as dictionary items through popcorn object. i.e. p[pluginName].foo();
- plugin manifests:
- must be registered in Popcorn.manifest as dictionary items
- are read as Popcorn.manifest[type]
- must have options object, which, for posterity, should contain a target
Popcorn Object (p = new Popcorn(...))
- p.video must exist and must have these properties: currentTime, play, pause, volume, duration, readyState
- p.data must exist
- absence may cause applicationError
- for serialization, p.data must have trackEvents object with
- must contain the following properties/functions:
- history (list)
- p.getLastTrackEventId(), p.getTrackEvents(), p.removeTrackEvent(id) must be present
- plugins must be addressable as dictionary items through object. i.e. p[pluginName].foo();
- listen() must be present and respond to the following event
Should be easy enough to create a small script that tests for all of these.
Wrote this script: https://github.com/secretrobotron/popcorn-js/commit/6024aab279f3ceb...
Only tests for existence of functions/properties and their type so far. Need to implement some semantic checks.
Thought it would be cleanest to separate this out into its own test file instead of pushing into popcorn unit tests.
- State changed from new to peer-review-requested
Script should test all of the found characteristics in the list above for functionality and existence (where possible).
Test is now in branch 397 and is a qunit test suite: https://github.com/secretrobotron/popcorn-js/commit/cb43e4cb18073c8...
- Tag changed from butter, dependency, popcorn to butter, dependency, popcorn
- State changed from peer-review-requested to super-review-requested
This is tremendously helpful, SR+
(if you haven't had a chance, go ahead and get caught up with this: https://webmademovies.lighthouseapp.com/projects/63272/styleguide )
- State changed from super-review-requested to staged
- Milestone set to 0.5
- Milestone order changed from 1 to 0
SR+ These tests look good and pass on Chrome, FF 3.6 and FF 4.0 one question: don't you have to look threw all of the plugins to check stuff like is there a manifests? I am staging this but lets take a closer look here. Adding Scott since hes diving into butter.
Staged in annasob/popcorn-js commit
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.