Repository navigation
fix(analytics-core): track video playback on playing (SDK-723) - #2177
Merged
daniel-graham-amplitude merged 3 commits intoNov 23, 2026
Merged
Conversation
Contributor
size-limit report 📦
|
daniel-graham-amplitude
force-pushed
the
SDK-723-switch-play-to-playing
branch
from
November 13, 2026 21:10
683fd69 to
09c3a1e
Compare
Collaborator
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 09c3a1e. Configure here.
daniel-graham-amplitude
force-pushed
the
SDK-723-switch-play-to-playing
branch
from
November 23, 2026 22:52
8a055a6 to
2993a11
Compare
…Script into SDK-723-switch-play-to-playing
daniel-graham-amplitude
force-pushed
the
SDK-723-switch-play-to-playing
branch
from
November 23, 2026 22:54
2993a11 to
412031d
Compare
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.
Summary
Report HTML and Mux video playback when
playingfires, so aplayrequest does not emit a start event before playback begins. When attaching to an unpaused element, requireHAVE_FUTURE_DATAbefore emitting the initial play event. Update listener cleanup, the media mock, and regression coverage for delayed playback and attachment at all five readiness states.Validation
pnpm install.pnpm test --concurrency 2 -- --runInBand --forceExitfor all 32 test projects. Explicit exit was needed because existing Jest runs retained open handles after reporting passing results.pnpm lint,pnpm docs:check, andpnpm lint:deps.pnpm buildcould not finish: the targeting Rollup process remained idle after writing its bundles on both attempts and was stopped.pnpm test:examplesis blocked by its reference to the missingjest.setup.examples.jsfile.Checklist
Note
Medium Risk
Changes when video start events are emitted in analytics, which can shift reported metrics and timing for existing integrations but stays confined to video lifecycle tracking.
Overview
Video start analytics now fire on the HTML media
playingevent instead ofplay, so a play request no longer emits a stream-started event before playback actually begins.When tracking attaches to an element that is already unpaused, an initial play is reported only if
readyStateis at leastHAVE_FUTURE_DATA; otherwise tracking waits untilplaying. Listener teardown, the test video mock, and browser teardown tests were aligned withplaying, with added coverage for all readiness states and delayed playback.Reviewed by Cursor Bugbot for commit 412031d. Bugbot is set up for automated code reviews on this repo. Configure here.