Difference between revisions of "User:Minooz/OSD600/popcorn/doc"

From CDOT Wiki
Jump to: navigation, search
(Documentation for tagthisperson plugin)
(Documentation for tagthisperson plugin)
Line 8: Line 8:
 
::  
 
::  
 
var p = Popcorn('#video')
 
var p = Popcorn('#video')
 
.play()
 
 
.volume(0)
 
 
 
.tagthisperson({
 
.tagthisperson({
 
 
start: 0, // seconds
 
start: 0, // seconds
 
 
end: 10, // seconds
 
end: 10, // seconds
 
 
person: 'Anna Sob',
 
person: 'Anna Sob',
 
+
image: 'http://newshour.s3.amazonaws.com/RichardNSmith_thumbnail.jpg',
image: 'http://newshour.s3.amazonaws.com/photos%2Fspeeches%2Fguests%2FRichardNSmith_thumbnail.jpg',
 
 
 
 
href: 'http://annasob.wordpress.com',
 
href: 'http://annasob.wordpress.com',
 
 
target: 'tagdiv'
 
target: 'tagdiv'
 
 
} )
 
} )
 
 
.tagthisperson({
 
.tagthisperson({
 
 
start: 5, // seconds
 
start: 5, // seconds
 
 
end: 15, // seconds
 
end: 15, // seconds
 
 
person: 'Scott',
 
person: 'Scott',
 
href: 'http://scottdowne.wordpress.com/',
 
 
 
target: 'tagdiv'
 
target: 'tagdiv'
 
 
} )  
 
} )  
 
: Description
 
: Description

Revision as of 22:38, 26 February 2011

Documentation for tagthisperson plugin

Name
tagthisperson


Example

var p = Popcorn('#video') .tagthisperson({ start: 0, // seconds end: 10, // seconds person: 'Anna Sob', image: 'http://newshour.s3.amazonaws.com/RichardNSmith_thumbnail.jpg', href: 'http://annasob.wordpress.com', target: 'tagdiv' } ) .tagthisperson({ start: 5, // seconds end: 15, // seconds person: 'Scott', target: 'tagdiv' } )

Description
Adds people's names to an element on the page
Options parameter will need a start, end, target, image and person.
Start is the time that you want this plug-in to execute
End is the time that you want this plug-in to stop executing
Person is the name of the person who you want to tag
Image is the url to the image of the person - optional
Target is the id of the document element that the text needs to be
attached to, this target element must exist on the DOM
Parameters
{Object} options