Skip to content

feat: AI-generated player content + regrouped Video Player options#10

Merged
eitanp461 merged 1 commit into
masterfrom
feat/video-player-ai-generation
Jun 9, 2026
Merged

feat: AI-generated player content + regrouped Video Player options#10
eitanp461 merged 1 commit into
masterfrom
feat/video-player-ai-generation

Conversation

@eitanp461

Copy link
Copy Markdown
Contributor

Summary

Two changes to the Widget → Video Player operation:

  1. New AI-Generated Content options — drive the player's on-demand AI generation, so users get captions, transcripts, title/description, and chapters with no files to author.
  2. Regrouped the Video Player UI — the 19 controls are no longer a flat wall; "Advanced Player Options" is gone, replaced by purpose-named collapsible groups with the source essentials kept top-level.

AI-Generated Content

A new collapsible section on the node:

  • Generate Captions — auto-generates a transcript shown as a toggleable captions track, in the video's original spoken language.
  • Subtitle Languagesoptional, comma-separated target language codes for AI-translated subtitle tracks. Empty by default.
  • Generate Title / Description / Chapters — AI-generated metadata + chapter markers. The chapters button is grouped under (and gated on) Generate Chapters, so it can never surface a button with no chapters source.

These are emitted into player_config (the JS player.source() config), not the iframe embed URL — matching how the player exposes them.

Out-of-the-box safety

  • The collection defaults to {} — with nothing added, the node emits zero AI keys and behaves exactly as before. Fully opt-in.
  • Captions/title/description/chapters are unsigned actions enabled by default on most accounts → work with no setup.
  • The only add-on-gated feature (translated subtitles) is never triggered by default: Subtitle Languages is empty, so a user must deliberately enter codes. The README documents a Google Translate add-on setup CTA for when they do.

New Video Player layout

VIDEO PLAYER
├─ Public ID · Type · Transformation · Poster · Source Types   (top-level essentials)
├─ ▸ Playback           Autoplay · Muted · Loop · Plays Inline · Show Controls · Big Play Button
├─ ▸ Size & Layout      Fluid · Width · Height · Aspect Ratio · Crop Mode
├─ ▸ AI-Generated Content   Captions (+Label, Languages) · Title · Description · Chapters (+Button)
├─ ▸ Appearance         Skin · Base/Accent/Text Color · Font Face
└─ ▸ Player Features     Floating · HDR · Picture-in-Picture · Seek Thumbnails

Also in this PR:

  • Poster promoted to a top-level source essential (it's about the source, like Transformation — not playback or chrome).
  • Source Types description rewritten to lead with plain meaning + an HLS/MP4 fallback tip, keeping the format-pin caveat. Name kept to mirror the Cloudinary API's sourceTypes property.
  • README documents the AI options + the Google Translate add-on enable steps.

Backward compatibility

⚠️ This relies on 0.0.9 being the currently active (latest published) npm version.

The only version ever published to npm is 0.0.9, which has no Video Player operation at all. Regrouping these fields into collections renames their parameter keys — but since no released version ever exposed Video Player fields, no saved workflow can reference them, so nothing breaks.

The backward-compatibility-check reports 0 breaking changes against the 0.0.9 baseline; every new/moved param registers as additive.

This holds only while 0.0.9 is the latest published version. Once a release that ships the flat Video Player fields goes out, any further regrouping would require a typeVersion bump.

Bumps version to 0.2.0 (additive feature).

Testing

  • npm test234 tests pass (widget suite extended for the new AI fields, the nested-collection reads, and the chapters-button gating).
  • tsc --noEmit, eslint, npm run build — clean.
  • npm run backward-compatibility-check — 0 breaking changes.

🤖 Generated with Claude Code

Add an "AI-Generated Content" section to the Widget → Video Player op that
drives the player's on-demand AI generation (no caption files to author):

- Generate Captions — auto-transcript shown as toggleable captions in the
  video's spoken language. Captions/title/description/chapters are unsigned
  actions enabled by default on most accounts, so they work with no setup.
- Subtitle Languages — optional, comma-separated target codes for AI-translated
  subtitle tracks. Empty by default (original-language captions only), so the
  Google-Translate-add-on dependency is opt-in and never triggered out of the box.
- Generate Title / Description / Chapters — AI metadata + chapter markers, with
  the chapters button gated on (and grouped under) Generate Chapters so it can't
  surface a button with no chapters source.

These keys are emitted into player_config (the JS player.source() config), not
the iframe embed URL, matching how the player exposes them.

Rework the Video Player UI so the 19 controls aren't a flat wall. "Advanced
Player Options" is removed; controls are grouped by intent into collapsible
collections, with the source essentials kept top-level:

  Public ID · Type · Transformation · Poster · Source Types   (top-level)
  ▸ Playback           Autoplay · Muted · Loop · Plays Inline · Show Controls · Big Play Button
  ▸ Size & Layout      Fluid · Width · Height · Aspect Ratio · Crop Mode
  ▸ AI-Generated Content   Captions (+Label, Languages) · Title · Description · Chapters (+Button)
  ▸ Appearance         Skin · Base/Accent/Text Color · Font Face
  ▸ Player Features    Floating · HDR · Picture-in-Picture · Seek Thumbnails

Also: Poster promoted to a top-level source essential (was a flat field);
Source Types description rewritten to lead with plain meaning + an HLS/MP4
fallback tip while keeping the format-pin caveat; README documents the AI
options with a Google Translate add-on setup CTA.

Backward compatibility: the only version published to npm is 0.0.9, which has
no Video Player operation at all — so regrouping these fields into collections
(which renames their parameter keys) cannot break any saved workflow, since no
released version ever exposed them. The backward-compatibility-check reports 0
breaking changes against the 0.0.9 baseline; all new params register as additive.
This holds only while 0.0.9 remains the latest published version; once a release
that ships the flat Video Player fields is out, further regrouping would require
a typeVersion bump.

Bumps version to 0.2.0 (additive feature). 234 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eitanp461 eitanp461 merged commit 3510600 into master Jun 9, 2026
1 check passed
@eitanp461 eitanp461 deleted the feat/video-player-ai-generation branch June 9, 2026 11:06
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