-
Notifications
You must be signed in to change notification settings - Fork 1
Cue zones
acoiro edited this page Feb 26, 2013
·
2 revisions
var cuezones = [{
id: 'Paris',
from: 0,
to: 5
}, {
id: 'Zurich',
from: 10.5
}, {
id: 'London',
from: 50
}, {
id: 'NYC',
from: -10 // converted to duration - 10
}];
Notes
-
id
can't contain dots - 'id' is optional (however you won't be able to use
goTo
). -
to
is optional: thefrom
of the next zone will be used asto
(the end will be theto
of the last cue zone). -
from
is optional: theto
of the previous zone will be used asfrom
(the begin will be thefrom
of the first cue zone).
Adding cuezones
sublime('video').cuezones.addGroup({
id: 'cities',
cuezones: cuezones,
onenter: function(player, groupId, cuezone, index) {
// cuezone object will also contain computedFrom and computedTo
// these are the real values (-x is converted to duration -x).
},
onexit: function(player, groupId, cuezone, index) {
}
})
Go to a cuezone
sublime('video').cuezones.goTo('cities.Zurich')
And since I love iOS, you can forget the above and just do
sublime('video').cuezones.addGroup({
id: 'cities',
visualFormat: '|-[Paris]-5-[]-10.5-[Zurich]-50-[London]-|',
onenter: function(player, groupId, cuezone, index) {
},
onexit: function(player, groupId, cuezone, index) {
}
})
Notes
- negative
from
andto
are not supported with the visual format. - empty zones
[]
will be skipped -
|
are optionals, they are used to mark the begin or the end of the playback