smol.stream's first side project: a simple #owncast badge you can add to your website, which shows if your stream (or your friend's) is online or offline.

- Repo: https://codeberg.org/smolstream/owncast-live-badge
- Demo: https://pub.disquette.top/owncast-badge/demo/

#owncast #stream #floss #smolstream

@lefractal

This is great! I think my favorite style would be invisible when offline and gigantic (like my full width) when online.

Then I could put it between my menu and video here:
https://www.kristofferlislegaard.com/

And if I was online there would be a big card that greeted people about me being online.

Is this something you would be open to adding? Feel free to say no if not. Great job anyways!

Kristoffer Lislegaard - Norwegian electronic musician

Kristoffer Lislegaard - Atmospheric electronic music from Oslo, ranging from deep meditative textures to intense, layered sound design.

@lislegaard I pushed a new version, that hides the badge when offline if you add the `hide-offline` attribute. eg., <owncast-badge .... hide-offline></owncast-badge>

For the full width, you can override the css like this:

```
owncast-badge {
width: 100% !important;
}
```

@lefractal

amazing! thank you so much!

@lislegaard ping me if needed!

@lefractal

It started perfectly, but now it looks like it says I am online even if my short test stream has stopped.

Edit:

https://www.kristofferlislegaard.com/

+

https://lislegaard.stream/

Kristoffer Lislegaard - Norwegian electronic musician

Kristoffer Lislegaard - Atmospheric electronic music from Oslo, ranging from deep meditative textures to intense, layered sound design.

@lislegaard There is a a "short" delay between the end of the stream, and when Owncast stops serving the frame grab. It shouldn't take too long to appear offline!

@lefractal

Looks like it is working perfectly now! I will experiment more, but for now this seems to "just work". Thanks for this, really dig it!

I will now think about other places to implement it :D!