Sub-flow › Add Video
Background: Course Editor (SCR-CCM.02) — this dialog opens over the course editing page
Spec notes

Identity

SUC-CCM-04 · Screen: SCR-CCM.04 (Media Upload Dialog — parameterized: resource_type = video)

ReturnUrl context

Current returnUrl: /author-course/
Fallback: / when returnUrl is empty.
Propagation: all state-toggle links carry returnUrl. Save → returnUrl. Cancel → returnUrl + &sub_cancelled=1.

Sub-flow context

SUC-CCM-04 · Invoked by (Backoffice Portal): UC-CCM.01 (Author Course Content), step 6 "Add Content → Video".
Precondition: the selected Content Item on the course editing page has no content linked yet.
Success: video saved and bound to the lesson; Course Editor updates its structure to display the new video.
Cancel after upload (AF 5A): the uploaded video file is deleted; the lesson item remains empty.
Selecting an existing video from the asset library (reuse) happens at SCR-CCM.26 "From library" tab, before this dialog opens — out of scope here.

Screen spec: SCR-CCM.04 (video)

  • Regions: Context header · Upload area · Resource metadata · Dialog actions
  • context_header: read-only · default: param.context_header · data_ref: passed from calling SUC
  • file_input: required · visible when upload_state == idle · accept: MP4, WebM (SS-CCM.02) · max size TBD (SS-CCM.02)
  • upload_progress: read-only · visible when upload_state == uploading · range 0–100
  • resource_title: required · min length 1 · default = param.original_filename · visible when upload_state == complete · data_ref: CourseDraftResource.title
  • resource_description: optional · visible when upload_state == complete · data_ref: CourseDraftResource.description
  • duration_estimate: optional · min 1 · visible when upload_state == complete && resource_type == video · default: param.auto_detect_duration · data_ref: CourseDraftResource.metadata.duration_seconds
  • Actions: save (enabled when upload_state == complete && resource_title != '') → SUC-CCM-04-M-6; cancel (always enabled) → SUC-CCM-04-A-5A
  • AR#1: parameterized by resource_type — video has no file preview, metadata = filename_original, file_size_bytes, mime_type, duration_seconds
  • AR#2: 2-stage format/size validation — client-side (AF 2A) + server-side re-check
  • AR#3: atomic save (SS-CCM.07) — binary write + CourseDraftResource insert + CourseDraftItem link commit/rollback together
  • AR#4: upload transfer failure → error + Retry button; user can pick a new file or cancel
  • AR#5: WCAG-AA — file input label linkage, accessible progress bar, field-associated error messages, full keyboard navigation