Media Sources
Braincandy supports three types of media sources that can be used individually or combined. This guide covers every detail about how content is loaded and processed.
Reddit Content
Reddit is the primary media source for Braincandy. Content is fetched via a server-side OAuth2 proxy that authenticates with the Reddit API.
Reddit Presets
Reddit presets are one-click buttons that add a curated set of subreddits to your session. When you click a preset button, all of its subreddits are added to your active list. Clicking it again removes them.
Available category presets include:
| Preset | Description |
|---|---|
| General | A broad mix of popular NSFW subreddits |
| MILF | Mature content subreddits |
| Teen | Legal teen/college-age content subreddits |
| Amateur | Amateur and homemade content |
| Gonewild | The Gonewild family of subreddits |
| Lesbian | Lesbian content subreddits |
| Beta Safe | Safe/softcore content |
| Censored | Censored content subreddits |
| ...and more | Additional category presets are regularly added |
Each preset contains anywhere from 3 to 30+ subreddits covering the topic.
A preset button appears in a solid (filled) style when active and a subtle (outlined) style when inactive.
Pornstar Presets
Similar to category presets, pornstar presets let you quickly add subreddits dedicated to specific performers. Each pornstar preset typically contains 1–2 subreddits.
Available pornstar presets include performers such as: Alice Delish, Belle Delphine, Sweetie Fox, Violet Myers, Angela White, Riley Reid, Mia Khalifa, Autumn Falls, Amouranth, Emily Willis, Eva Elfie, Abella Danger, Faye Reagan, Little Caprice, Mia Malkova, and many more.
Pornstar presets use the same toggle logic as category presets:
- A preset is considered active only if all of its subreddits are present in the current subreddit list
- This means if you manually remove one subreddit from a preset, the preset button will show as inactive
Manual Subreddit Input
You can type any subreddit name into the input field and add it:
- Type a subreddit name (without the
r/prefix — it is stripped automatically) - Press Enter or click the + button
- The subreddit is added to your list
Bulk input: You can add multiple subreddits at once by typing them as a comma-separated list:
nsfw, legalteens, realgirls, amateur
Each entry is trimmed, the r/ prefix is stripped, and duplicates are ignored.
Removing subreddits: Each active subreddit appears as a small button tag (e.g., r/nsfw). Click on any tag to remove that subreddit from the list.
Sorting Options
Control how Reddit posts are sorted:
| Option | Icon | Description |
|---|---|---|
| Hot | 🔥 | Currently trending posts (default) |
| Rising | 📈 | Posts gaining traction |
| Top | ⬆️ | Highest-rated posts |
| Controversial | ↕️ | Posts with mixed voting |
Only one sorting option can be active at a time. The selected option is highlighted with a solid button style.
Time Range Filter
Filter posts by their age:
| Option | Icon | Description |
|---|---|---|
| Past Hour | 🕐 | Posts from the last 60 minutes |
| Past Day | 📅 | Posts from the last 24 hours (default) |
| Past Week | 📅 | Posts from the last 7 days |
| Past Month | 📅 | Posts from the last 30 days |
| Past Year | 📅 | Posts from the last 365 days |
| All Time | 🚀 | All posts regardless of age |
Use "All Time" with "Top" sorting to get the highest-rated content from a subreddit's entire history. Use "Hot" with "Past Day" for the freshest content.
Sorting Mode
Determines how content from multiple subreddits is combined:
| Mode | Icon | Description |
|---|---|---|
| Source Rotation | 🔄 | Round-robin — alternates one item from each subreddit in sequence |
| All Mixed | 🔀 | All items from all subreddits are merged and shuffled together |
Source Rotation ensures equal representation from all subreddits. If you selected 3 subreddits, the order would be: Sub1-Item1, Sub2-Item1, Sub3-Item1, Sub1-Item2, Sub2-Item2, Sub3-Item2, etc.
All Mixed pools everything together and shuffles randomly. Subreddits with more content will naturally appear more frequently.
How Reddit Fetching Works (Technical Details)
When you start a session, the following process occurs:
- Request pooling: Up to 2 parallel workers process fetch tasks simultaneously
- Pagination: Each subreddit is fetched for up to 4 pages (each page returns up to 100 posts)
- Per-subreddit limit: A maximum of 400 media items are kept per subreddit
- API calls: Requests are made to the server-side
/api/redditendpoint, which handles Reddit OAuth2 authentication using client credentials - Deduplication: Duplicate URLs are removed per subreddit
- Imgur filtering: All imgur.com URLs are automatically filtered out (due to hotlinking restrictions)
Supported Media Extraction
The fetcher parses Reddit post data and extracts media from:
| Source | Detection | Media Type |
|---|---|---|
| Direct image links | URL ends with .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg, .tiff | Image or GIF |
| Direct video links | URL ends with .mp4, .webm, .ogg, .mov, .avi, .mkv, .flv, .wmv, .3gp | Video |
| Reddit galleries | Post has gallery_data and media_metadata | Multiple images |
| Redgifs links | URL matches redgifs.com/watch/ or redgifs.com/detail/ | Redgifs (native video via API v2) |
Redgifs handling: Redgifs URLs are resolved via a separate server-side API endpoint (/api/redgifs) that communicates with the Redgifs API v2. The server fetches a temporary authentication token (cached for 23 hours), then retrieves the direct MP4 video URL and a poster image for each Redgifs slug. The resulting media item is typed as redgifs and rendered using a native <video> tag in the player, which enables full support for custom video controls, pixelation, and play/pause functionality.
Stickied posts are always skipped.
Rate Limiting
Reddit enforces rate limits (~60 requests per minute per IP). If a rate limit is hit:
- The error is captured and displayed
- Fetching stops for all remaining subreddits
- Any media already loaded is still usable — you can start the session with partial results
Local Files
The local files feature lets you use media from your computer.
How It Works
- Click "Pick Folder" on the configuration page
- A system folder picker dialog opens
- Select a folder on your computer
- Braincandy recursively scans the folder and all subfolders
- All supported media files are loaded as blob URLs (
URL.createObjectURL)
Supported File Types
| Category | Extensions |
|---|---|
| Images | .jpg, .jpeg, .png, .bmp, .webp, .svg, .tiff |
| GIFs | .gif |
| Videos | .mp4, .webm, .ogg, .mov, .avi, .mkv, .flv, .wmv, .3gp |
Browser Compatibility
The folder picker uses the File System Access API (window.showDirectoryPicker), which is only supported in:
| Browser | Supported |
|---|---|
| Google Chrome | ✅ Yes |
| Microsoft Edge | ✅ Yes |
| Firefox | ❌ No |
| Safari | ❌ No |
If you try to use the folder picker in an unsupported browser, an error message is displayed.
Notes on Local Files
- Files are loaded into browser memory as blob URLs — they do not leave your computer
- Very large folders may take a moment to scan
- If you select a new folder, the previous files are replaced (old blob URLs are revoked)
- Local files are mixed with Reddit content and playlists in the final media pool
Playlist Upload
Upload a playlist file to add pre-defined media URLs to your session.
Supported Formats
JSON Playlists (.json)
The JSON file must contain three arrays:
{
"images": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.png"
],
"gifs": [
"https://example.com/animation.gif"
],
"videos": [
"https://example.com/clip.mp4"
]
}
All three keys (images, gifs, videos) must be present. Empty arrays are allowed.
XSPF Playlists (.xspf, .xml)
XSPF (XML Shareable Playlist Format) files are parsed for <location> elements:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>https://example.com/photo.jpg</location>
</track>
<track>
<location>https://example.com/clip.mp4</location>
</track>
</trackList>
</playlist>
URLs are automatically categorized by file extension:
- Image extensions → Image type
.gif→ GIF type- Video extensions → Video type
Duplicate URLs are removed.
Upload Behavior
- Use the file input to select a
.json,.xspf, or.xmlfile - On successful parse, a green message shows: "Loaded X media items"
- On error (invalid format, missing fields, no valid URLs), a red error message is displayed
- Only one playlist can be loaded at a time — uploading a new file replaces the previous one
Combining Sources
All three sources (Reddit, local files, playlists) are combined before the session starts:
- Reddit media items are collected
- Local file items are added
- Playlist items are added
- The combined pool is filtered by your enabled media types
- The entire pool is shuffled using the Fisher-Yates algorithm
- The shuffled pool becomes the session's
mediaPool
This means you can have a session that mixes Reddit content, your local files, and playlist URLs all together in a random order.
Next: Learn about shareable URLs and configuration persistence in the Sharing & Persistence guide.