1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-12 11:15:04 +02:00
video.js/test/unit/tech
Michael Vogel 8706941573 feat: Allow techs to change poster if player option techCanOverridePoster is set (#4921)
The option for the player techCanOverridePoster is introduced in this commit. It allows techs to update the post whenever they like. isPosterFromTech_ is introduced as a private player field in order to track when a poster was set by a tech. This allows us to clear the poster whenever the tech is disposed of by the player.

Additionally, attempting to set the same poster more than once will have no effect / no changes will be made, since the poster is the same. This was done in order to stop triggering multiple posterchange events when calling player.poster(aPoster) with techCanOverridePoster set to true.

When a tech is disposed and a poster was set by it, unset the poster.

Pass a `canOverridePoster` option to techs to know whether techCanOverridePoster was set.

Fixes #4910.
2018-03-07 14:31:50 -05:00
..
html5.test.js feat: sourceset event (#4660) 2018-03-07 14:28:37 -05:00
middleware.test.js fix: cache middleware instances per player (#4939) 2018-02-12 17:30:27 -05:00
tech-faker.js feat: Allow techs to change poster if player option techCanOverridePoster is set (#4921) 2018-03-07 14:31:50 -05:00
tech.test.js fix: auto-removal remote text tracks being removed when not supposed to (#4450) 2017-06-28 16:38:29 +10:00