Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
fddb7b6
👽️ upgraded code to socket.io usage
ryzetech Aug 17, 2024
bad2998
✨ added logo lmao
ryzetech Aug 17, 2024
504b4a5
oops accidentally broke that
ryzetech Aug 17, 2024
21ffea7
readded connect error
ryzetech Aug 17, 2024
1d1edc4
Cider 2.5 yoooooo
ryzetech Aug 17, 2024
a721fd4
📝 updated documentary after #4
ryzetech Aug 17, 2024
63f5641
🐛 fixes #5
ryzetech Aug 18, 2024
b4ead2c
📝 beatutified readme once more
ryzetech Aug 18, 2024
6d9a6ba
Add issue templates
ryzetech Aug 20, 2024
40191c6
Create CODE_OF_CONDUCT.md
ryzetech Aug 20, 2024
2ea8619
✨ Add support for disconnect fade
ryzetech Sep 2, 2024
3b29e4b
📝 updated documentation to f6
ryzetech Sep 2, 2024
e33bb10
🔀 F6: fade on disconnect
ryzetech Sep 2, 2024
5dedb9a
✨ added addtitional fade delay
ryzetech Sep 2, 2024
94bb6b5
Updated contact ways
ryzetech Sep 19, 2024
8129553
reupdate readme
ryzetech Sep 19, 2024
d897084
✨ add hide_on_idle_connect setting to control content visibility
ryzetech Jan 6, 2025
6df0ce2
📝 updated documentation to align with f7
ryzetech Jan 6, 2025
f00b4bf
f7: hide on idle connect (#9)
ryzetech Jan 6, 2025
0c73896
hide unless playing
yuma-dev Jan 10, 2025
0478303
.
yuma-dev Jan 10, 2025
5d9c1d8
revert css changes
yuma-dev Jan 10, 2025
affba98
fixed
yuma-dev Jan 10, 2025
df8b6c5
initial state hidden
yuma-dev Jan 11, 2025
a1c1088
✨ progress bar smooth
ryzetech Jan 13, 2025
85e5766
forgot linear definiton woops
ryzetech Jan 13, 2025
8dcd8d3
update readme
ryzetech May 14, 2025
5bff5ae
fix crossorigin issues
ryzetech Nov 29, 2025
30924d5
more ignoring on my part
ryzetech Nov 29, 2025
9fce039
Merge branch 'main' of https://github.com/yuma-dev/cider4obs into yum…
ryzetech Nov 30, 2025
0121eb1
hide unless playing (#11)
ryzetech Nov 30, 2025
c427904
MAJOR refractors, no breaks!
ryzetech Nov 30, 2025
0a25ef9
Add time labels to progress bar and format playback time
ryzetech Nov 30, 2025
8cf02cc
fix pause/unpause nag
ryzetech Nov 30, 2025
96850f7
added time labels and next in queue feature
ryzetech Nov 30, 2025
2698475
minor style improvements
ryzetech Nov 30, 2025
3c255dc
Add slide direction feature for next in queue box
ryzetech Nov 30, 2025
bf2a77c
Merge branch 'f3_customizer' into main
ryzetech Nov 30, 2025
84ac3f4
Revert "Merge branch 'f3_customizer' into main"
ryzetech Nov 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/i-have-an-idea-.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: I have an idea!
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/something-isn-t-working-.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Something isn't working!
about: Create a report to help me fix issues
title: ''
labels: bug
assignees: ''

---

**Preamble**
[ ] I have checked previous open and closed issues and didn't find any help
[ ] I agree to follow the [code of conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)

**Cider Version used**
e.g. 2.5.0

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
CiderWSPlaying.json
.vscode/settings.json
.history/
exampleData.jsonc
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
conduct@finnley.dev.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
132 changes: 111 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
<div align="center">
<img src="c4obs.png" width="275px" style="border-radius: 5%;">

# 🎵 Cider 4 OBS 🔴
### Connect your Cider Client to OBS and show what you're listening to!

![Apple Music](https://img.shields.io/badge/Apple_Music-9933CC?style=for-the-badge&logo=apple-music&logoColor=white)
![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)
![Socket.io](https://img.shields.io/badge/Socket.io-black?style=for-the-badge&logo=socket.io&badgeColor=010101)
![GitHub Pages](https://img.shields.io/badge/github%20pages-121013?style=for-the-badge&logo=github&logoColor=white)


#### <ins>This project is NOT dormant, I'm always open for suggestions and issues! :)</ins>

</div>

## ❗ Requirements
* [Open Broadcaster Software](https://obsproject.com/)
* [Cider 2.3+](https://cider.sh)
* [Cider Version 3+](https://cider.sh)
* An Apple Music subscription (duh)

## 🛠 Setup
1. Setup Cider if you haven't done so already and open the settings. Go to "Connectivity" and scroll down all the way. Enable the Switch "WebSockets API".
2. Create a new Browser Source in OBS and set the URL to [`https://ryzetech.github.io/cider4obs/`](https://ryzetech.github.io/cider4obs/).
3. The source will spawn with a width of `800` by default. Resize it if necessary (my personal sweet spot is `400`) and change the height to `170` or something like that.
4. The browser in OBS will now attempt to connect to Cider every five seconds and reestablish the connection if necessary!
1. Setup Cider if you haven't done so already and open the settings. Go to **Connectivity** and scroll down all the way. Enable the **WebSockets API** switch. This isn't technically needed anymore, but it's good to have it enabled nevertheless.
2. Create a new **Browser Source** in OBS and set the URL to [`https://ryzetech.github.io/cider4obs/`](https://ryzetech.github.io/cider4obs/).
3. The source will spawn with a default width of `800`. Resize it if necessary (recommended: `400` width) and set the height to approximately `170`.
4. The browser will automatically attempt to connect to Cider and reestablish the connection if needed!
5. To customize appearance and behavior, see the customization section below. Add your custom CSS to the **Custom CSS** box in the OBS browser source settings!

## 🎨 Customization & Settings
Unhappy with the way the app looks and behaves by default? You can change the settings with the "Custom CSS" box in the OBS browser source. I have compiled some **examples** below to just copy and change to your liking.
Not happy with the default appearance and behavior? You can customize everything using the **Custom CSS** box in the OBS browser source settings. Here are some examples to copy and modify:

To pick colors, I recommend https://rgbacolorpicker.com/.

Expand All @@ -29,7 +43,7 @@ To pick colors, I recommend https://rgbacolorpicker.com/.
```

### Text Customization
Customizable elements are `span, #title, #artist, #album`
Customizable elements are `span, .track-title, .track-artist, .track-album`
```css
/* to change the text color, do */
span {
Expand All @@ -38,19 +52,24 @@ span {
}

/* to make the title look neutral instead of bold, do: */
#title {
.track-title {
font-weight: normal;
}

/* similar with the album name (pay attention to the attribute!) */
#album {
.track-album {
font-style: normal;
}

/* you can even hide elements: */
#album {
.track-album {
display: none;
}

/* or target by ID if you prefer: */
#title, #artist, #album {
/* your styles here */
}
```


Expand All @@ -73,28 +92,99 @@ Customizable elements are `#progressBg, #progressBar`.
}
```

### Settings
Some settings adjusting the behavior of certain elements.
## ⚙️ Configuration Options

You can control the behavior of the Cider4OBS overlay using CSS custom properties. Add these to the `body` selector in the OBS browser source's Custom CSS box:

```css
body {
/* general key: 1=on, 0=off */

/* fade the box in and out depending on whether music is playing or not */
--fade-on-stop: 1;
/* Fade the box in/out when music is paused or stopped */
--fade-on-stop: 1; /* 1 = enabled, 0 = disabled */

/* Fade the box in/out when Cider disconnects */
--fade-on-disconnect: 1; /* 1 = enabled, 0 = disabled */

/* Delay (ms) before fading out after pausing/stopping */
--fade-delay: 2000; /* Default: 2000ms */

/* Delay (ms) before fading out after disconnecting */
--fade-disconnect-delay: 2000; /* Default: 2000ms, falls back to --fade-delay if not set */

/* Hide the box when connected but Cider is idle */
--hide-on-idle-connect: 1; /* 1 = enabled, 0 = disabled */

/* how long playback must be paused until the box fades (if enabled) */
/* Hide the box unless music is playing */
--hide-unless-playing: 1; /* 1 = enabled, 0 = disabled */
}
```

**Tip:** You can combine these options to customize exactly when the overlay appears or fades out. For example, to only show the overlay when music is playing and fade out quickly when paused:

```css
body {
--fade-on-stop: 1;
--fade-delay: 1000;
--hide-unless-playing: 1;
}
```

### [NEW] Additional Display Options

- `--show-time-labels`: Set to `inline-block` to show current playback time and song duration on either end of the progress bar. Default: `none` (hidden)
```css
#overlay {
--show-time-labels: inline-block;
}
```

- `--show-next-in-queue`: Set to `block` to show a box with the next song in queue that fades/slides in before the current song ends. Default: `none` (hidden)
```css
#overlay {
--show-next-in-queue: block;
}
```

- `--next-in-queue-reveal-time`: Number of seconds before the current song ends to reveal the next-in-queue box. Default: `10`
```css
#overlay {
--next-in-queue-reveal-time: 15;
}
```

- `--next-in-queue-slide-direction`: Direction from which the next-in-queue box slides in. Options: `top`, `bottom`, `left`, `right`, or `none` to disable slide animation. Default: `top`
```css
#overlay {
--next-in-queue-slide-direction: left;
}
```

## 💜 Trusted by streamers
Thank you for supporting this project with links and by word-of-mouth! You are my heroes!
Thank you for supporting this project by using and spreading it! You are my heroes!

<div align="center">

| [ 🥇 iamtheratio](https://www.twitch.tv/iamtheratio) |
|:-----------------------------------------------------------------------------------------:|
| [ 🥇 iamtheratio](https://www.twitch.tv/amtheratio) |
|:-:|
| [![iamtheratio](https://zip.finnley.dev/r/DErk2u.png)](https://www.twitch.tv/iamtheratio) |

</div>

Do you want to appear here? Open a new issue and outline your involvement. I'll be happy to add you here!

## ❤ Special Thanks
A list of entities I want to thank for supporting me in different ways!

<div align="center">

| [![logo](https://avatars.githubusercontent.com/u/87914859?s=70)<br>Cider Collective](https://github.com/ciderapp/) |
| :-: |
| Thank you so much for giving me access to early builds,<br>making change response much faster! |

| [![logo](https://static-cdn.jtvnw.net/jtv_user_pictures/245fe4a9-fc34-411f-8db8-c27728ca6e7e-profile_image-70x70.png)<br>Aquasius](https://www.twitch.tv/aquasius) |
| :-: |
| Thanks for the original idea, initial feedback,<br>and the driving force to make this open source! |
</div>

## Issues, Ideas, Comments?
Tell me in the issues tab! <3
Tell me in the issues tab! <3
Don't have a GitHub account? Feel free to contact me on [Discord](https://discord.com/users/373135347791560706), [Telegram](https://t.me/finnleyfox), or via [Mail](mailto:cider4obs@finnley.dev)
Binary file added c4obs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading