Skip to content
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: when inlineImages is true, image is cors, the image tag is broken #1243

Closed
wants to merge 11 commits into from

Conversation

xujiujiu
Copy link
Contributor

inlineImages is true,image.src is cors, when start record,the image tag is broken

ccb.png is cors

not start
image

started
image

@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2023

⚠️ No Changeset found

Latest commit: 3932cd9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@xujiujiu xujiujiu changed the title when inlineImages is true, image is cors, the image tag is broken when inlineImages is true, image is cors, the image tag is broken Jun 27, 2023
@xujiujiu xujiujiu marked this pull request as draft July 6, 2023 07:52
@xujiujiu xujiujiu marked this pull request as ready for review July 6, 2023 07:52
@xujiujiu xujiujiu changed the title when inlineImages is true, image is cors, the image tag is broken fix: when inlineImages is true, image is cors, the image tag is broken Jul 13, 2023
@eoghanmurray
Copy link
Contributor

It looks like we are the ones adding the crossorigin attribute on the image.
This is presumably a prerequisite to access the image as a blob.
As this can cause failure of image loading as you have discovered, we likely should do this in a separate new Image() instead. Or at least only add it if we have checked document.location.origin === (new URL(image.src)).origin

Also note that Justin is working on some async asset code loading in #1239 which will have the side effect of deprecate this inlineImages approach.

@xujiujiu
Copy link
Contributor Author

It looks like we are the ones adding the crossorigin attribute on the image. This is presumably a prerequisite to access the image as a blob. As this can cause failure of image loading as you have discovered, we likely should do this in a separate new Image() instead. Or at least only add it if we have checked document.location.origin === (new URL(image.src)).origin

Also note that Justin is working on some async asset code loading in #1239 which will have the side effect of deprecate this inlineImages approach.

Will there be any configuration after #1239 that can instead of inlineImages? After all, we don’t want to affect the picture display speed due to the network speed during playback

@xujiujiu xujiujiu closed this Aug 15, 2023
@xujiujiu xujiujiu reopened this Nov 27, 2023
@xujiujiu
Copy link
Contributor Author

Tracking in PR of #1359

@xujiujiu xujiujiu closed this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants