| author | cavaliet |
| Tue, 21 Feb 2012 17:26:51 +0100 | |
| branch | popcorn-port |
| changeset 819 | 9b8e68803f6f |
| permissions | -rw-r--r-- |
|
819
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
1 |
// PLUGIN: Code |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
2 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
3 |
(function ( Popcorn ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
4 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
5 |
/** |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
6 |
* Code Popcorn Plug-in |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
7 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
8 |
* Adds the ability to run arbitrary code (JavaScript functions) according to video timing. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
9 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
10 |
* @param {Object} options |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
11 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
12 |
* Required parameters: start, end, template, data, and target. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
13 |
* Optional parameter: static. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
14 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
15 |
* start: the time in seconds when the mustache template should be rendered |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
16 |
* in the target div. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
17 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
18 |
* end: the time in seconds when the rendered mustache template should be |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
19 |
* removed from the target div. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
20 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
21 |
* onStart: the function to be run when the start time is reached. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
22 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
23 |
* onFrame: [optional] a function to be run on each paint call |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
24 |
* (e.g., called ~60 times per second) between the start and end times. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
25 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
26 |
* onEnd: [optional] a function to be run when the end time is reached. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
27 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
28 |
* Example: |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
29 |
var p = Popcorn('#video') |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
30 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
31 |
// onStart function only |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
32 |
.code({ |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
33 |
start: 1, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
34 |
end: 4, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
35 |
onStart: function( options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
36 |
// called on start |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
37 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
38 |
}) |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
39 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
40 |
// onStart + onEnd only |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
41 |
.code({ |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
42 |
start: 6, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
43 |
end: 8, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
44 |
onStart: function( options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
45 |
// called on start |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
46 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
47 |
onEnd: function ( options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
48 |
// called on end |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
49 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
50 |
}) |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
51 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
52 |
// onStart, onEnd, onFrame |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
53 |
.code({ |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
54 |
start: 10, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
55 |
end: 14, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
56 |
onStart: function( options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
57 |
// called on start |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
58 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
59 |
onFrame: function ( options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
60 |
// called on every paint frame between start and end. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
61 |
// uses mozRequestAnimationFrame, webkitRequestAnimationFrame, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
62 |
// or setTimeout with 16ms window. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
63 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
64 |
onEnd: function ( options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
65 |
// called on end |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
66 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
67 |
}); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
68 |
* |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
69 |
*/ |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
70 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
71 |
Popcorn.plugin( "code" , function( options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
72 |
var running = false; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
73 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
74 |
// Setup a proper frame interval function (60fps), favouring paint events. |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
75 |
var step = (function() { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
76 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
77 |
var buildFrameRunner = function( runner ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
78 |
return function( f, options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
79 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
80 |
var _f = function() { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
81 |
running && f(); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
82 |
running && runner( _f ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
83 |
}; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
84 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
85 |
_f(); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
86 |
}; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
87 |
}; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
88 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
89 |
// Figure out which level of browser support we have for this |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
90 |
if ( window.webkitRequestAnimationFrame ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
91 |
return buildFrameRunner( window.webkitRequestAnimationFrame ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
92 |
} else if ( window.mozRequestAnimationFrame ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
93 |
return buildFrameRunner( window.mozRequestAnimationFrame ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
94 |
} else { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
95 |
return buildFrameRunner( function( f ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
96 |
window.setTimeout( f, 16 ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
97 |
}); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
98 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
99 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
100 |
})(); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
101 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
102 |
if ( !options.onStart || typeof options.onStart !== "function" ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
103 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
104 |
if ( Popcorn.plugin.debug ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
105 |
throw new Error( "Popcorn Code Plugin Error: onStart must be a function." ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
106 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
107 |
options.onStart = Popcorn.nop; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
108 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
109 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
110 |
if ( options.onEnd && typeof options.onEnd !== "function" ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
111 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
112 |
if ( Popcorn.plugin.debug ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
113 |
throw new Error( "Popcorn Code Plugin Error: onEnd must be a function." ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
114 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
115 |
options.onEnd = undefined; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
116 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
117 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
118 |
if ( options.onFrame && typeof options.onFrame !== "function" ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
119 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
120 |
if ( Popcorn.plugin.debug ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
121 |
throw new Error( "Popcorn Code Plugin Error: onFrame must be a function." ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
122 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
123 |
options.onFrame = undefined; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
124 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
125 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
126 |
return { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
127 |
start: function( event, options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
128 |
options.onStart( options ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
129 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
130 |
if ( options.onFrame ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
131 |
running = true; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
132 |
step( options.onFrame, options ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
133 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
134 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
135 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
136 |
end: function( event, options ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
137 |
if ( options.onFrame ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
138 |
running = false; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
139 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
140 |
|
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
141 |
if ( options.onEnd ) { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
142 |
options.onEnd( options ); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
143 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
144 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
145 |
}; |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
146 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
147 |
{ |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
148 |
about: { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
149 |
name: "Popcorn Code Plugin", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
150 |
version: "0.1", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
151 |
author: "David Humphrey (@humphd)", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
152 |
website: "http://vocamus.net/dave" |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
153 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
154 |
options: { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
155 |
start: { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
156 |
elem: "input", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
157 |
type: "text", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
158 |
label: "In" |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
159 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
160 |
end: { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
161 |
elem: "input", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
162 |
type: "text", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
163 |
label: "Out" |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
164 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
165 |
onStart: { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
166 |
elem: "input", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
167 |
type: "function", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
168 |
label: "onStart" |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
169 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
170 |
onFrame: { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
171 |
elem: "input", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
172 |
type: "function", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
173 |
label: "onFrame" |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
174 |
}, |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
175 |
onEnd: { |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
176 |
elem: "input", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
177 |
type: "function", |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
178 |
label: "onEnd" |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
179 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
180 |
} |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
181 |
}); |
|
9b8e68803f6f
add allocine player, and add an full test with this allocine player.
cavaliet
parents:
diff
changeset
|
182 |
})( Popcorn ); |