obsproject / obsproject/obs-browser
image "error" event does not work on OBS but it does work on regular chrome
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 904
- Forks
- 267
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
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:

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

I've used both "load" and "error", but only "load" seems to work. Was this purposefully removed or is it unintended?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the missing-image case in OBS BrowserSource and compare it with regular Chrome, using the remote debugger mentioned in the report. Done means the JavaScript image error listener fires for a nonexistent local image in BrowserSource and the failure is visible in the debugger.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100