Skip to content

Feature: CLI Support for Self-Hosted Player Builds from Installation Selections #1688

Description

@R-Delfino95

Note

Triage estimate — cycle priority and story points were assigned during an AI-assisted planning pass and are rough first guesses. Confirm or adjust when you pick this up.

Add CLI support for turning the installation-guide selections (framework, skin, media renderer, source URL) into a self-hosted player build: a generated entrypoint that imports the selected player configuration, plus a documented bundler command that produces a single file the user can serve without a CDN dependency.

This is the third outcome from #1637. PR #1680 covered the first two outcomes for HTML as docs only, and deferred this CLI work as a follow-up.
Today users hand-stitch the documented esbuild recipe; this would take them from selection to a self-hosted build in one step, reusing the selection model the docs already expose.

Relationship to the CLI epic (#247)

This is distinct from the epic's init command in intent:

  • init (as described in Epic: Video.js CLI Platform and Project Initialization #247) scaffolds Video.js into a project for development — detects framework/style, prompts for skin/eject, adds markup + styles, installs deps. Output: your project, wired up at the source level.
  • This issue produces a deployable, self-hosted artifact — a bundled file you serve yourself, for offline / air-gapped / corporate environments where CDNs are barred (the original use case from the Docs: Self-Hosted Builds #1637 Discord thread). Output: a built dist/player.js.

Open question — command shape

A. A mode/flag of init (a different output target of the same command):

npx @videojs/cli init --self-hosted

B. A separate command focused only on the deployable artifact:

npx @videojs/cli build --skin default --media hls --source-url <url>
# emits dist/player.js (+ index.html) ready to serve, no CDN dependency

Tasks

  • Decide the command shape: a mode of init vs. a separate command
  • Accept the installation selection flags (--framework, --preset, --skin, --media, --source-url) and prompt interactively when omitted
  • Generate the entrypoint + package.json / bundler config for the chosen selection
  • Wire up and document the bundler command that produces the self-hosted single-file build
  • Keep the generated output consistent with the "Self-host the player" docs section

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions