Skip to content

adding fix for when using web components

Vinay Rosenberg requested to merge github/fork/lmckeen/development into development

Created by: lmckeen

resolving an issue where if the user places the video element that dashjs is attached to inside a shadow dom at its root, it will throw an error. this error is caused by the captions trying to use getBoundingClientRect() on the parent and in this case that will be a document fragment where getBoundingClientRect() will not be accessible.

the applied fix is to return the host value of the parent if available; which will instead return the web component node and then if host is not found fallback to the just the normal parentNode

Merge request reports