Skip to content
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

Proper way to update TrackEvents ? #46

Open
menismu opened this issue Apr 4, 2018 · 0 comments
Open

Proper way to update TrackEvents ? #46

menismu opened this issue Apr 4, 2018 · 0 comments

Comments

@menismu
Copy link
Owner

menismu commented Apr 4, 2018

Issue reported: mozilla#443
Reported by: @JpEncausse

@JpEncausse
JpEncausse commented on 28 May 2015
Hi,
I have a GUI like popcorn webmaker to display events on a track. I add events with the folowing code:

popcorn.myplugin({ start: 1, end: 2, duration: 1, custiom: 'x' });
What is the proper way to clear this event or all events when my GUI update the start / end ? I assume clearing popcorn.data.trackEvents is not enought :-)

Should I provide an Id ? If yes I assume it should be something like myInternalId + '_' + start ?

Regards,
Jp

@JpEncausse JpEncausse referenced this issue in mozilla/popcorn.webmaker.org on 30 May 2015
Closed
Proper way to update TrackEvents ? #609
@mjschranz
Contributor
mjschranz commented on 18 Jun 2015
If you want to remove all trackEvents period you will need to simply loop over them and call popcorn.removeTrackEvent( trackEvent._id ). You can provide your own ID when creating a plugin in the format of p.myplugin({ id; 'asdf' })

Clearing popcorn.data.trackEvents is generally speaking a bad idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant