remove two way event system in media clips

VERIFIED FIXED

Status

Webmaker
Popcorn Maker
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: thecount, Assigned: thecount)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Right now sequencer has a two way event system.

If play is hit on the main timeline, it sends messages to all the clips to also play.

If a clip detects a play, it sends a message to the main timeline.

This has the advantage of allowing the youtube clips actual embed to be clicked on to toggle play, and it'll keep things in sync. Clicking on the clips is the only way this end of the api can be hit.

I have a fairly complex event system to handle this two way communication, but, it causes more issue than it fixes, mainly, has a really hard time dealing with fast clicks, is slower than it could be, is hard to work with and, these events are flash events and don't go on the same stack as the javascript events, which I suspect is the root of a lot of problems. Causing clips to go out of sync when seeks and plays happen in complex ways.

If we force only a one way communication, we remove a large chunk of complexity, and things seek faster, but, we lose the ability to click on the actual player and keep it in sync.

I think that's actually a fair trade. The use case for clicking on the clip is smaller than things being stable and working when clicking on the timeline.

If a user does click on the clip now, it simply plays the clip and the rest stays still, if you touch the main timeline again, everything resyncs.

I explored having some timeouts to keep things in sycn, but it also wasn't worth it.
(Assignee)

Updated

4 years ago
Assignee: nobody → scott
(Assignee)

Comment 1

4 years ago
Created attachment 817289 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/262

Follow up from bug 924521
Attachment #817289 - Flags: review?(schranz.m)
Attachment mime type: text/plain → text/x-github-pull-request
Attachment #817289 - Flags: review?(schranz.m) → review+
(Assignee)

Comment 2

4 years ago
Staged: https://github.com/mozilla/popcorn.webmaker.org/commit/9770ac8a672953e7a9b08fc77df1715cb1f8c6dc

Needs verification.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Flags: needinfo?(scott)
Resolution: --- → FIXED
(Assignee)

Updated

4 years ago
Status: RESOLVED → VERIFIED
Flags: needinfo?(scott)
You need to log in before you can comment on or make changes to this bug.