image "error" event does not work on OBS but it does work on regular chrome #83

Open
opened 2017-07-09 22:38:05 -05:00 by fabricioanciaes · 1 comment
fabricioanciaes commented 2017-07-09 22:38:05 -05:00 (Migrated from github.com)

Tried to do a simple slideshow that I could use as a browser source on my stream. It would show every image within a folder, it would keep looping until it tries to load an image that does not exist, then goes back to the first one.

Chrome does show file not found error for local images:
image

I used an eventListener to look for when this happens:

selector.img.addEventListener("error", function () {
        console.log("error");
    });

And it works just as intended, it goes back to first image, no problems. Except when using BrowserSource. It goes to the last image but it won't fire the image "error" event.

Also, logging in with the remote debugger on OBS does not log any file not found
image
I've used both "load" and "error", but only "load" seems to work. Was this purposefully removed or is it unintended?

Tried to do a simple slideshow that I could use as a browser source on my stream. It would show every image within a folder, it would keep looping until it tries to load an image that does not exist, then goes back to the first one. Chrome does show file not found error for local images: ![image](https://user-images.githubusercontent.com/5115119/28001928-fcd93252-6506-11e7-96b4-987937276e07.png) I used an eventListener to look for when this happens: ```javascript selector.img.addEventListener("error", function () { console.log("error"); }); ``` And it works just as intended, it goes back to first image, no problems. Except when using BrowserSource. It goes to the last image but it won't fire the image "error" event. Also, logging in with the remote debugger on OBS does not log any file not found ![image](https://user-images.githubusercontent.com/5115119/28001989-6a717216-6507-11e7-9989-8c419896917e.png) I've used both "load" and "error", but only "load" seems to work. Was this purposefully removed or is it unintended?
OsirisNL commented 2017-12-11 08:09:54 -06:00 (Migrated from github.com)

This seems to work fine for me, though you have to use file:/// to reference the images.

This seems to work fine for me, though you have to use file:/// to reference the images.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-obsproject/obs-browser#83
No description provided.