Skip to content

Add fallback texture - #108

Closed
EtienneLachance wants to merge 3 commits into
solid-tv:mainfrom
EtienneLachance:feature/fallback-image
Closed

Add fallback texture #108
EtienneLachance wants to merge 3 commits into
solid-tv:mainfrom
EtienneLachance:feature/fallback-image

Conversation

@EtienneLachance

@EtienneLachance EtienneLachance commented Jun 17, 2026

Copy link
Copy Markdown

In draft

@chiefcll

chiefcll commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Can you give me some more details on the flow? I could have the placeHolderImage just stay if the image fails to load. Would that be better than a fallback? I didn't want to add the placeholder as its a lot of code and most folks might not use it.

@EtienneLachance

Copy link
Copy Markdown
Author

ok my original thought was that, these would be 2 different flow.
You would have the placegolderImage that would be there while the primaryTexture is loading. If the image fails to load, then it would fallback on an Image or color if set.

So basically, it would be this:
LoadingTexture (color since you added this with solid 1.3.0 I believe) -> primaryTexture -> fallbackImage.

@EtienneLachance

Copy link
Copy Markdown
Author

@chiefcll

@chiefcll

chiefcll commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closing this out - This is easy to do on Solid side (and already a part of primitive):

const FALLBACK = '/poster-missing.png';

// ONE handler for every node — emit passes the target as the first arg.
const onFailed = (node) => { node.src = FALLBACK; };

// per node
node.on('failed', onFailed);

@chiefcll chiefcll closed this Aug 6, 2026
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