Skip to content

FCHub Stream v0.9.3

Choose a tag to compare

@github-actions github-actions released this 19 Nov 21:29
· 6 commits to main since this release

FCHub Stream v0.9.3

Video streaming for FluentCommunity. Built because WordPress media library and video don't mix.

πŸ“₯ Download

  • Versioned: fchub-stream-0.9.3.zip
  • Latest (always newest): fchub-stream.zip

Both files identical. Pick one. Works.

Installation

  1. Download ZIP (either one)
  2. WordPress Admin β†’ Plugins β†’ Add New β†’ Upload Plugin
  3. Upload β†’ Install β†’ Activate
  4. Done. No composer. No npm. Just works.

Updating? Upload new ZIP. WordPress updates automatically. Won't duplicate.

Requirements

  • WordPress 6.7+
  • PHP 8.3+
  • FluentCommunity (must be active)
  • Cloudflare Stream OR Bunny.net account

Changes

Changed

Upload Modal Now Supports Dark Mode

  • Upload modal now inherits FluentCommunity's dark mode. Replaced hardcoded light colors with theme CSS variables.
  • Because uploading videos at 2am in blinding white wasn't the vibe. Auto-detects light/dark theme and matches it.

Fixed

Videos No Longer Disappear When Editing Posts

  • Fixed videos vanishing after editing posts. Turns out isset() and null aren't the same thing. PHP 101 but easy to forget.
  • Used array_key_exists() instead of isset() to differentiate between "user didn't touch media" and "user explicitly deleted it". Revolutionary? No. Correct? Finally.
  • Built because losing your video after fixing a typo in your post is not a feature. It's a bug.

Video Deletion Actually Works Now

  • Fixed videos refusing to delete when you removed them from posts. Two hooks were fighting over the same video. Hook #1 deleted it. Hook #2 restored it. Classic.
  • Added global flag for hooks to communicate. Now they work together instead of against each other.
  • Videos delete from post AND Cloudflare when you remove them. No leftovers. Clean slate.

Code Quality Improvements

  • Fixed WordPress Coding Standards violations. Added proper comments, aligned variables, ignored debug warnings correctly.
  • Code now passes phpcs without errors. Does this make it better? Debatable. Does it make WordPress happy? Apparently.

Notes

Bug Discovery:

  • Reported by Jacob Windham. Videos disappearing after editing posts. Thank you for actually testing this and reporting it instead of silently suffering.

What Was Broken:

  • Edit post with video β†’ save β†’ video disappeared. isset($var) when $var = null returns false. We thought user didn't send media. They sent null.
  • Remove video from post β†’ save β†’ video stayed in post AND Cloudflare. Hook #1 deleted it. Hook #2 saw "no media in request" and restored existing video. Teamwork at its finest.

The Fix:

  • array_key_exists() checks if key exists regardless of value. null is a value. Not the same as missing key.
  • Global flag between hooks: "Hey Hook #2, Hook #1 already deleted this video. Don't restore it." Communication works.
  • Cloudflare API cleanup verified. DELETE returns 200. Video gone. Database updated. Works as intended.

Testing Results:

  • Test 1 (Edit without changing video): βœ… Video stays
  • Test 2 (Replace video): ⏸️ Skipped (frontend issue, not backend)
  • Test 3 (Delete video): βœ… Video deletes from post + Cloudflare
  • Test 4 (Create new post): βœ… Works
  • Test 5 (Edit post without video): βœ… No errors
  • Test 6 (Multiple edits): βœ… Video survives 3+ edits

Built because editing posts shouldn't require sacrificing videos to the WordPress gods.


Documentation: https://docs.fchub.co/docs/fchub-stream

Part of FCHub Ecosystem: https://fchub.co

Support Development: Donate via Stripe

Building design systems nobody asked for but everyone secretly needs. Your $20 won't solve my problems, but it might cover electricity bills or buy the coffee that powers my 4am "this'll definitely work" commits.

Latest Download Link:

https://github.com/vcode-sh/fchub-stream-public/releases/latest/download/fchub-stream.zip

Built out of media library trauma. Streams out of necessity.