-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request/suggestion: conditional values for start and end #37
Comments
Interesting idea! I say go for it. Though, I do have one concern with a syntax like I think supporting an array of events would be better: start: ['loadstart', 'pause'],
end: ['playing', 'vast.adStart'] That would trigger an overlay to start on the first of Moving beyond that - not necessarily for the same PR - we can expand on that further by allowing an object-based configuration, which supports a conditional function that determines whether or not the overlay is allowed to start. This is a bit of an unrealistic example, but... start: {
// Start at 1 second.
at: 1,
// Start on any of these events.
on: ['loadstart', 'pause'],
// Some kind of conditional function that determines if the overlay can start.
condition: function(player, event) {
return player.currentTime() < 10;
}
}
That would open up a ton of customizable options and leave it mostly up to the implementer. |
An array also matches videojs's support for multiple events. |
This would be useful. Conditions would also help with #31 . |
So this could be possible:
Or is it already possible ? Because without these conditionals its impossible to apply overlays during complex scenarios such as VPAID/interactive ads and I have to remove those overlays manually.
@gkatsev @misteroneill @dmlap
I am happy to do a PR if you guys give me a go ahead.
The text was updated successfully, but these errors were encountered: