Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

adscanceled doesn't do the job #77

Open
michalk-k opened this issue May 10, 2015 · 0 comments
Open

adscanceled doesn't do the job #77

michalk-k opened this issue May 10, 2015 · 0 comments

Comments

@michalk-k
Copy link

To be honest I don't know what is the intention of this event but found it not sufficient enough in case of problem reading/loading vast. By this I mean, I would expect video playback should start immediately when vast fails. But it doesn't - if getContent method fails, we have to wait a few seconds for ad timeout to see video playing.

By analyzing state diagram of videojs.ads I found we should trigger adserror event to play user video. However it doesn't work as expected until adsready is already called,

As quick mockup I added following delegate for adscanceled event:

player.on('adscanceled', function(){

        // Dirty. Without adsready adserror doesn't fire user video
        player.trigger('adsready');
        player.trigger('adserror');

    });

with regards

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

No branches or pull requests

1 participant