Open ranyefet opened 12 years ago
We may also want to outline the callback and flag setting separation between core ( 'EmbedPlayer' and modules 'AdTimeline'. i.e prior to triggering "playback started" you should set a flag like startContentFlag, and then if AdTimeline binds to 'playback started' in the ad sequence you set that flag as to inform the core not to jump directly into start content but to instead wait for a callback from the 'playback started' before starting content. You can see this flag setting already in the code, but certainly can be cleaned up by avoiding bindings to the base video events and it could made much cleaner with the use of callbacks instead of re-calling / re-triggering the same methods with different flags.
We should follow the following development plan: 1) Clearly map out the 'player sequence' events for different player types. ( what your already doing ) 2) Write automated tests that test this player sequence ( its fine if they fail at first ) 3) Proceed to write the code refactor and event clean up as you have outlined. 4) Run the tests for both flash and html5 so that we are sure we are consistent.
There is some complexity in the conditional triggers ( some ad providers triggering different sets of events from other ad providers, players without ads triggering a different sequence etc. ) This is of course a relatively high risk refactor because all the analytics plugins are also tied to specific ad events. NielsenCombined for example has had countless hours syncing up with flash, ABC and Nielsen requirements. We now have automated tests for NielsenCombined which should give us a bit of info, for my part I will add an ad player to the automtated tests for NielsenCombined so that we have more visibility for refactors like this.
Its very very important that we make automated tests part of the development processes, especially for refactors of components like this that touch a lot of other components.
p.s Michal re:4 we "fixed" a bug for the HTML5 player where double Click did not update the playhead? Was this fix ever made for flash as well?
--michael
On 1/25/2012 2:18 AM, Michal Radwantzor wrote:
From: Ran Yefet Sent: Wednesday, January 25, 2012 11:43 AM To: Michael Dale; Michal Radwantzor Cc: Boaz Telem; Avi Vaisenberger Subject: Ads events / Player Timeline
Hi,
I like to start this discussion regarding the player timeline. Currently our timeline not covering all points we need to interact with the playback.
This is what I like to achieve:
Few questions to Michal:
Also will make our lives easier for analytics plugins with clear separation between Ad/Content playback/resume When there's no Ads we should only see: playbackStarted -> startContent -> endContent - > playbackCompleted
Right now we're using 'play' event and 'ended' event for everything which cause a lot of issues and make it hard to support all these different parts of the timeline. We should avoid using native play/ended events and use our custom events that I listed above.
Thanks, Ran.
Timeline refactor
#highPrioirty better timeline support for pre/mid/post events during video playback
Created with WorkFlowy.com