Skip course video intro/outro after first play per session#443
Merged
Conversation
Show the branded intro (first 9s) once per session: the first video a user plays runs in full, then every later video that session starts at 9s and stops 10s before the end. A session flag on LessonShow drives whether to skip; a new courseVideo Alpine component uses the Vimeo Player SDK to detect the first play, mark the session, and pause at duration-10s for the outro. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add a right-hand course outline column on the lesson page (matching the left nav width) and drop the module titles from the sidebar Masterclass group - Rename "Draft" content pills to "Coming Soon" - Hide the "content coming soon" banner once a playable video is shown - Remove Free/Pro pills and completion dots from the outline and index list - Show draft lessons to everyone as Coming Soon, clickable only by admins; skip inaccessible lessons in prev/next and count only published lessons toward progress - Right-align the Next button; strike through completed lessons in the outline and add a hover title to clipped lesson names Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Fix the intro/outro skip: the Vimeo player was held on a reactive Alpine
property, whose proxy broke the SDK's WeakMap lookups ("Unknown player").
Keep the player in a closure and let the SDK build the iframe; the intro
skip moves to setCurrentTime
- Toggle play/pause with the space bar anywhere on the lesson page
- Add markdown lesson notes: a MarkdownEditor field in the admin (like blog
articles) plus a notes column, rendered beneath the Prev/Next row via
CommonMark in a fixed-width left-aligned column
- Hide unpublished modules from non-admins and block access to their
lessons; label unpublished modules "Draft"
- Remove the Free/Pro labels from the lesson page
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
July 24, 2026 12:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Course lesson videos open with a branded intro (~9s) and close with an outro (~10s). Sitting through them on every lesson is tedious. This shows the intro once per session, then gets the viewer straight to the content.
Marking is on play, not on page view — opening a lesson without playing it doesn't burn the one-time intro.
How
LessonShowreads acourse_video_playedsession flag at mount into a$skipIntroOutroproperty. A#[Renderless] markVideoPlayed()action sets the flag.courseVideoAlpine component (resources/js/alpine/courseVideo.js) drives the Vimeo player:$wire.markVideoPlayed()so later videos skip.#t=9sURL fragment; the outro via the Vimeo Player SDK, pausing atduration − 10s(with a guard so short videos aren't left with a negative window).wire:ignoreso Livewire re-renders (e.g. Mark Complete) don't reload the player.Testing
CourseContentTest.phpcover: first video not skipping,markVideoPlayedrecording the session, a preset session skipping, and the end-to-end play-then-skip flow.CourseContentTestsuite passes (23 tests, 46 assertions); Pint clean;npm run buildbundles the new module.🤖 Generated with Claude Code