Open axten opened 6 years ago
I digged deeper and found out that the error content html is build properly. something went wrong after using fillWith
method of the dialog:
seams to be a race condition with: https://github.com/videojs/video.js/blob/2da7af1137e3c8f3b14bd603f17fef3173fe2da0/src/js/modal-dialog.js#L183
so errors plugin fills the dialog and dialog refills it on open with empty content o_0 @gkatsev any ideas how to fix that?
adding display.options_.fillAlways = false;
after that line fixed the race condition.
but a bit hacky...
this may be that videojs-errors expects the player to be created when it is initialized and so initializing it via options is too early for it. We probably should guard against that.
So now I'm sure that it's a race condition between the error
event handlers:
https://github.com/videojs/video.js/blob/2da7af1137e3c8f3b14bd603f17fef3173fe2da0/src/js/error-display.js#L27
https://github.com/brightcove/videojs-errors/blob/ee400679cde77971117bc0aab1ad50866c010d98/src/plugin.js#L320
They simply change order when errrors-plugin is invoked later by player.errors()
.
In this case, the error does not occure:
error-display#on('error')
calls-> open()
calls-> fill()
<-- then it is emptyerrors-plugin#on('error')
calls -> fillWith()
but with options init, these handlers change order and the custom error modal gets overriden.
ping @gkatsev
any plans to fix this?
some update?
Description
plugin initializing with video js options is not working.
Steps to reproduce
just do:
Results
Expected
custom error should be visible
Actual
error screen appears empty (except a white X)
Error output
-
Additional Information
videojs
6.8
errors plugin
4.1