Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
Updated our plugin docs to include the best practices guide as well a…
Browse files Browse the repository at this point in the history
…s better links
  • Loading branch information
dseif committed Mar 26, 2012
1 parent 88ad0bb commit 5fefaa8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
20 changes: 20 additions & 0 deletions addon-development/_posts/2012-12-12-players.md
@@ -0,0 +1,20 @@
---
title: Players
---

# Players #

In addition to Popcorn's plugin factory, Popcorn also provides a way for users to create their own media player ( other than the HTML5 one ) to create and fire events off of.

## Document and Directory Setup ##

1. Create a folder popcorn-js/players/playername
2. Create 4 files:
* **popcorn.playername.html** – The demo file, contains html to run player
* **popcorn.playername.js** – The code file, contains player
* **popcorn.playername.unit.html** – The demo test file, contains html test framework
* **popcorn.playername.unit.js** – The code test file, contains unit tests

## Making the player ##

Developing a player for Popcorn is a bit more complicated than creating a plugin. In order for a player to work correctly you need to handle all [events]() that the HTML5
2 changes: 1 addition & 1 deletion addon-development/_posts/2012-12-12-plugins.md
Expand Up @@ -19,7 +19,7 @@ Popcorn offers a plugin factory that allows user to create their own plugins to


Choose a pattern from the Popcorn Plugin API section below. Choose a pattern from the Popcorn Plugin API section below.


Be sure to eliminate dependencies. A plugin should not require jQuery to run. Be sure to eliminate dependencies. A plugin should not require jQuery to run. We have also written a [best practices](https://docs.google.com/document/pub?id=17f6iSpXM_pZ8Wj6rirHpLnt2fpCtTnpQxzvVoibOJio&pli=1) guide for plugin development.


## Making unit tests ## ## Making unit tests ##


Expand Down
4 changes: 2 additions & 2 deletions utility-methods/_posts/2012-12-12-plugin.md
Expand Up @@ -7,13 +7,13 @@ title: Popcorn.plugin


Creates a new Popcorn proto method of the name provided with the definitionObject. Creates a new Popcorn proto method of the name provided with the definitionObject.


All Popcorn instances will inherit this newly created method. See below for plugin authoring patterns; see the [Step-by-step instructions](http://popcornjs.org/creating-plugins) for creating Popcorn Plugins for detailed plugin authoring information. All Popcorn instances will inherit this newly created method. See below for plugin authoring patterns; see the [Step-by-step instructions](http://popcornjs.org/popcorn-docs/addon-development/#Plugins) for creating Popcorn Plugins for detailed plugin authoring information.


## Options ## ## Options ##


* **pluginName** \[String\] - will be the name for your newly created plugin. Will also be the name of the instance method in which your plugin will be accessed through. * **pluginName** \[String\] - will be the name for your newly created plugin. Will also be the name of the instance method in which your plugin will be accessed through.
* **definitionObject** \[Object\] - an object in which the setup, start, end, teardown functions will be implemented for the given plugin * **definitionObject** \[Object\] - an object in which the setup, start, end, teardown functions will be implemented for the given plugin
* **manifest** \[Object\] - an object that explains the given plugin. Any options that are passed on to the user are documented here. Manifest are read in by Popcorn-Maker in order to create a meaningful editor. A more [in-depth explanation can be found here]() * **manifest** \[Object\] - an object that explains the given plugin. Any options that are passed on to the user are documented here. Manifest are read in by Popcorn-Maker in order to create a meaningful editor. A more [in-depth explanation can be found here](http://popcornjs.org/popcorn-docs/plugins/#Manifest)


## Use Cases ## ## Use Cases ##


Expand Down

0 comments on commit 5fefaa8

Please sign in to comment.