This addresses a couple of issues surrounding contentupdates:
Content can start playing immediately after a source change because we don't proactively pause the player if it is playing following a contentupdate
There is no contentupdate event handler in the 'preroll?' state, so if one occurs we remain in ‘preroll?’ through the source change. And because the ad timeout isn’t cleared, the eventual adtimeout event causes a transition directly into ‘content-playback’, bypassing 'content-set' / 'ads-ready?' / 'ads-ready'
EDIT: We are going to wait to address no.2 in the upcoming refactor
Specific Additions
If we are in 'content-playback' and a contentupdate occurs, pause the player if it is not already paused.
Add a contentupdate() handler in 'preroll?' that changes state to 'content-set'
As mentioned above: we'll hold off on no.2 until the refactor
Description
This addresses a couple of issues surrounding contentupdates:
contentupdate
contentupdate
event handler in the 'preroll?' state, so if one occurs we remain in ‘preroll?’ through the source change. And because the ad timeout isn’t cleared, the eventualadtimeout
event causes a transition directly into ‘content-playback’, bypassing 'content-set' / 'ads-ready?' / 'ads-ready'EDIT: We are going to wait to address no.2 in the upcoming refactor
Specific Additions
contentupdate
occurs, pause the player if it is not already paused.contentupdate()
handler in 'preroll?' that changes state to 'content-set'As mentioned above: we'll hold off on no.2 until the refactor