Merge pull request #353 from rakoo/fix-remote-media

Remote media: avoid never-ending loops if it won't work
This commit is contained in:
Chee Aun 2023-12-11 19:28:13 +08:00 committed by GitHub
commit a9c624dc59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -274,7 +274,7 @@ function Media({
}}
onError={(e) => {
const { src } = e.target;
if (src === mediaURL) {
if (src === mediaURL && mediaURL !== remoteMediaURL) {
e.target.src = remoteMediaURL;
}
}}
@ -307,7 +307,7 @@ function Media({
}}
onError={(e) => {
const { src } = e.target;
if (src === mediaURL) {
if (src === mediaURL && mediaURL !== remoteMediaURL) {
e.target.src = remoteMediaURL;
}
}}