#786 ✓ staged
David Humphrey

Create a Document Cloud Plugin

Reported by David Humphrey | October 21st, 2011 @ 10:34 PM | in 1.1 (closed)

http://www.documentcloud.org/help/api is an API I've heard mentioned a few times, and I know people are looking for to use with Popcorn.js.

Comments and changes to this ticket

  • David Humphrey
  • cadecairos

    cadecairos October 24th, 2011 @ 04:20 PM

    • Milestone changed from 1.0 Release to 1.1
    • Milestone order changed from “61” to “0”

    unless someone wants to get this in before 1.0, I'm pushing to 1.1

  • David Humphrey

    David Humphrey November 5th, 2011 @ 09:13 PM

    • Assigned user set to “David Humphrey”
    • State changed from “bugs” to “assigned”

    Initial quick-and-dirty work from Mozilla Festival hack session in https://github.com/humphd/popcorn-js/tree/documentcloud/plugins/doc... This needs tests and love, but we can do it for sure.

  • cadecairos

    cadecairos December 7th, 2011 @ 02:22 PM

    • Assigned user changed from “David Humphrey” to “cadecairos”
  • cadecairos

    cadecairos December 12th, 2011 @ 03:47 PM

    • State changed from “assigned” to “peer-review-requested”
    • Assigned user changed from “cadecairos” to “David Seifried”

    https://github.com/cadecairos/popcorn-js/tree/t786

    Alright, so this is working now. but there are a few catches.

    The Viewer API is limiting what I can do in 2 ways:

    The first problem is that I have to use the visibility attribute to hide the viewers. This is necessary because the display attrubute, when set to 'none' will cause the viewer to throw errors. Visibility is a problem because if I have 2 viewers in the same element, hidden viewers displace the visible ones.

    The second issue is that Viewers are tracked and indexed using the document title. This is a problem if I want 2 viewers and one document, displaying different pages simultaneously. The second viewer will overwrite the first in the DV.viewers object.

    Other than those two issues, I've got the plug0in into a usable state. It supports displaying pages or annotations. I cache and count references to existing players so that if you add an instance which needs a document that has already been loaded, it will use that viewer object instead of trying to load a new one.

  • David Seifried

    David Seifried December 13th, 2011 @ 02:17 PM

    • Assigned user changed from “David Seifried” to “cadecairos”
    • State changed from “peer-review-requested” to “review-needs-work”

    Few style issues:

    popcorn.documentcloud.unit.html:

    • line 38 should be using double quotes

    popcorn.documentcloud.js:

    • do we need the comments from line 23 - 48? They don't seem to be describing much and seem to be leftover code
    • manifest block needs to be expanded according to style guide, lines 60 - 72
    • Seems like we could run into race conditions with your load function, it is being defined after the block above it and inside a getScript call ( on line 109 ) you call it. Seems unlikely that this could happen, but still a possibility. Mind defining it above that block at the start of the setup function?
    • remove line 137

    Passes lint, passes in FF Chrome Opera Safari

    AFter those fixes assign to Rick for SR.

  • cadecairos

    cadecairos December 13th, 2011 @ 03:25 PM

    • State changed from “review-needs-work” to “peer-review-requested”
    • Assigned user changed from “cadecairos” to “David Seifried”
  • David Seifried

    David Seifried December 13th, 2011 @ 04:32 PM

    • State changed from “peer-review-requested” to “super-review-requested”
    • Assigned user changed from “David Seifried” to “Rick”

    Nice, everything looks good to me, PR+

  • David Seifried

    David Seifried December 14th, 2011 @ 05:13 PM

    • Milestone changed from 1.1 to 1.2
    • Milestone order changed from “24” to “0”

    Pushing to 1.2, never got reviewed in time.

  • Jon Buckley

    Jon Buckley December 16th, 2011 @ 03:30 PM

    • Milestone changed from 1.2 to 1.1
    • Assigned user changed from “Rick” to “Jon Buckley”
    • Milestone order changed from “18” to “0”

    Taking for review

  • Jon Buckley

    Jon Buckley December 16th, 2011 @ 03:49 PM

    • State changed from “super-review-requested” to “review-looks-good”
    • Assigned user changed from “Jon Buckley” to “cadecairos”

    This looks good Chris, SR+ when you delete blank lines 217 and 218.

  • cadecairos
  • cadecairos

    cadecairos December 19th, 2011 @ 11:08 AM

    • State changed from “review-looks-good” to “staged”

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

Tags

Pages