-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: manage images with relative path in iframe #5
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the image sources in a web-browser, I agree. But I have some questions about the other changes.
// Keep only visible elements and delete source tags | ||
children = children.filter( | ||
(child) => child.style == null || child.style.display !== 'none', | ||
(child) => | ||
(child.style == null || child.style.display !== 'none') && | ||
(child.tagName == null || child.tagName.toLowerCase() !== 'source'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why deleting source tags ? What will happen to a video with source tags ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The library relies on the video tag to generate the snapshot, not on the source tags. For the moment, I don't know why the source tag is causing a problem and preventing the image from displaying correctly.
clonedNode.onload = resolve | ||
clonedNode.onerror = reject | ||
clonedNode.onerror = resolve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the changes we've made, an error can occur ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so: image not found, CORS, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be detected before with the fetchAsDataURL
, done when requesting image. I don't think it can happens now with our changes in the player (the imagePlaceholder
option set)
This PR fixes an issue with the images with relative path in iframe.
Description
Images with relative path in iframe are not displayed because they do not contain the iframe domain.
Types of changes
Self Check before Merge