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:
commit
a9c624dc59
|
@ -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;
|
||||
}
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue