Skip to content
This repository was archived by the owner on May 26, 2021. It is now read-only.

Fixed initialization failure when providing an array of elements.#41

Open
helgeholm wants to merge 2 commits intocgiffard:masterfrom
brikteknologier:master
Open

Fixed initialization failure when providing an array of elements.#41
helgeholm wants to merge 2 commits intocgiffard:masterfrom
brikteknologier:master

Conversation

@helgeholm
Copy link
Copy Markdown

When providing an array of elements to the initializer function, e.g. captionator.captionify([document.getElementById("mainVideo")]), it would call processVideoElement with an invalid videoElement because it used a "spent" iterator index variable for accessing the videoElements array.

Since the rest of the code in the loop appears to work on an iterator value videoElement, it seems this is what should be used anyway.

This may also fix the following open issue: #39

@helgeholm
Copy link
Copy Markdown
Author

Also added "pointer-events: none" to overlay style, to avoid it capturing clicks on the video element as these are a popular interaction to play/pause the video.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant