Skip to content

Instantly share code, notes, and snippets.

@annasob
Created February 4, 2011 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save annasob/811326 to your computer and use it in GitHub Desktop.
Save annasob/811326 to your computer and use it in GitHub Desktop.
Popcornjs XML API
<popcorn>
<manifest>
// parent tag for <person>, optional
<people>
// identifies one specific person involved with the video
// Attribute
// id - a unique identifier for the person
// name - full name of person
// salutation - optional prefix before name, default blank
// title - optional job title or an organization association, default blank
<person id="" name="" salutation="" title="">
// identifies one url object related to a person
// Attribute
// id - a unique identifier for the resource
// src - the url source
// description - optional description for the url, default is the url of the src
<resource id="" src="" description=""></resource>
</person>
</people>
// parent tag for <place>, optional
<places>
// identifies one specific place involved with the video
// Attribute
// id - a unique identifier for the place, required
// name - full name of place, required
<place id="" name="">
// identifies one resource object related to a place
// Attribute
// id - a unique identifier for the url
// src - the url source
// description - a description for the url, optional, default url source
<resource id="" src="" description=""> </resource>
</place>
</places>
// set of attributions for the video, parent tag for <attribution>, optional
<attributions>
// identifies one attribution item, optional
// Attribute
// id - unique identifier for the attribution, required unique
// nameofwork - the name of the work to attribute credit to, optional
// nameofworkurl - the url to the name of the work to attribute credit to, optional
// copyrightholder - the person or company that holds the copyright, optional
// copyrightholderurl - the url to the person or company that holds the copyright, optional
// license - the license used on this copyright, optional
// licenseurl - the url to the license used on this copyright, optional
<attribution id="" nameofwork="" nameofworkurl="" copyrightholder="" copyrightholderurl="" license="" licenseurl=""></attribution>
</attributions>
// set of articles for the video, usually referenced by wikipedia tag in timeline
<articles>
// identifies one article related to the video
// Attribute
// id - a unique identifier for the url
// src - the url source
// description - a description for the url, optional, default url source
<resource id="" src="" description="" ></resource>
</articles>
// optional parent of <transcript>;
<transcripts>
// identifies one transcript item, optional
// Attribute
// id - unique identifier for the transcript, required unique
// narrator - person narrating the transcript
// language - original language of the transcript, required
// src - source file of the transcript, required
<transcript id="" narrator="" language="" src=""></transcript>
</transcripts>
</manifest>
<timeline>
// parent of <subtitle>, optional
// language - the language being spoken of the subtitles listed in this block
// align - the alignment of the subtitles in this block. Valid options are left, right, center.
<subtitles>
// a single subtitle to display
// Attribute
// in - time to show the subtitle, hh:mm:ss:frame format, required
// out - time to hide the subtitle, hh:mm:ss:frame format, required
// target - target div to send subtitle to, default bottom center, optional
// text - text of the subtitle between open and closing <subtitle> tags, required
<subtitle in="" out="" class="" effect="" target=""> text</subtitle>
</subtitles>
// parent of <footnote>, optional
<footnotes>
// a single footnote to display in a div
// Attributes
// in - time to show the footnote, hh:mm:ss:frame format, required
// out - time to hide the footnote, hh:mm:ss:frame format, required
// target - target div to send footnote to, default TBD, optional
// text - text of the footnote between open and closing <footnote> tags, required
<footnote in="" out="" class="" effect="" target="">text</footnote>
</footnotes>
// parent of <caption>, optional
<captions>
// a single popup caption to show on the video or in a target div
// Attribute
// in - time to show the caption , hh:mm:ss:frame format, required
// out - time to hide the caption , hh:mm:ss:frame format, required
// target - target div to send caption to, default bottom center, optional
// text - text of the caption between open and closing <caption> tags, required
// x - x coordinate of the video to show the caption, top left of caption, optional
// y - y coordinate of the video to show the caption, top left of caption, optional
// type - type of the caption. Valid types include: thought, speech, pointer
// resourceid - id of the item in the manifest you want to show, optional, uses text if not specified
<caption in="" out="" class="" effect="" target="" x="" y="" type="" resourceid=""></captions>
// parent of <lowerthird>, optional
<lowerthirds>
// a single lower third caption to show on the video
// Attribute
// in - time to show the lowerthird, hh:mm:ss:frame format, required
// out - time to hide the lowerthird, hh:mm:ss:frame format, required
// format - format for the lowerthird. Valid types include: center, left, right
// resourceid - id of the item in the manifest you want to show
<lowerthird in="" out="" class="" effect="" format="" resourceid =""></lowerthird>
</lowerthirds>
// parent of <location>, optional
<map>
// one google map of significance to show for the video
// Attributes
// in - time to show the location, hh:mm:ss:frame format, required
// out - time to hide the location, hh:mm:ss:frame format, required
// lat - latitude of the location, required
// lng - longitude of the location, required
// zoom - zoom level of the map
// target - target div to send map to, optional default is map container
// resourceid - id of the item in the manifest you want to show
// type - type of map either: HYBRID (default), ROADMAP, SATELLITE, TERRAIN
<googlemap in="" out="" lat="" long="" zoom="" target="" resourceid=""></location>
</map>
// parent of multiple resource tags, optional
<resources>
// one twitter feed for a given username or hashtag
// Attribute
// in - time to show the twitter feed, hh:mm:ss:frame format, required
// out - time to hide the twitter feed, hh:mm:ss:frame format, required
// target - target div to send twitter feed to, optional default is map container
// src- id of the user or hashtag you want to show
// width - width of the twitter widget
// height - height of the twitter widget
<twitter in="" out="" target="" src="" width="" height="" overlay=""></twitter>
// one attribution credit to show for the video
// Attribute
// in - time to show the attribution, hh:mm:ss:frame format, required
// out - time to hide the attribution, hh:mm:ss:frame format, required
// target - target div to send attribution to, optional default is attribution container
// resourceid - id of the item in the manifest you want to show
// text - optional text to use if no resourceid is used. Place text between open and closing attribution tags
<attribution in="" out="" target="" resourceid="" >text</attribution>
// one video tag used to tag a person in a video
// Attribute
// in - time to show the video tag, hh:mm:ss:frame format, required
// out - time to hide the video tag, hh:mm:ss:frame format, required
// target - target div to send attribution to, optional
// person - name of the person
<tagthisperson in="" out="" target="" person="" />
// one wiki tag used to insert a wikipedia article related to the video into the page
// Attribute
// in - time to show the wiki tag, hh:mm:ss:frame format, required
// out - time to hide the wiki tag, hh:mm:ss:frame format, required
// resourceid - id of the item in the manifest you want to show
// target - target div to send wiki article to, optional
// numberofwords - the number of words to show from the wikipedia article
// lang (optional, defaults to english) is the language in which the article is in.
// src is the url of the article
// title (optional) is the title of the article
<wikipedia in="" out="" resourceid ="" target="" overlay =""></wiki>
// one flickr tag used to insert a flickr photostream related to the video into the page
// Attribute
// in - time to show the flickr feed, hh:mm:ss:frame format, required
// out - time to hide the flickr feed, hh:mm:ss:frame format, required
// userid - the user id of the flickr feed to display
// target - target div to send flickr feed to
// height - the height of the container defaults to '50px'
// width - the width of the container defaults to '50px'
// border - size in pixels around images, defaults to '0px'
// numberofimages - the number of images to show from the flikr feed
// padding - the padding you want around each photo. ex: \"4px\"
<flickr in="" out="" userid ="" target="" overlay ="" numberofimages ="" padding=""></flickr></strong>
// one googlenews tag used to insert a google news panel related to a topic from the video
// Attribute
// in - time to show the googlenews tag, hh:mm:ss:frame format, required
// out - time to hide the googlenews tag, hh:mm:ss:frame format, required
// target - target div to send wiki article to, optional
// topic - the topic to search google news for to populate the news panel
<googlenews in="" out="" target="" topic =""></googlenews>
</resources>
</timeline>
</popcorn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment