Repository navigation
Android: touch timeline with desktop parity - #1100
Merged
Merged
Conversation
Rebuilds the mobile timeline on the desktop's shared modules (timeline.js, timeline-edit.js, timeline-compose.js, showclock.js) so the data, editing operations and output match the desktop Timeline page. - Live output uses the desktop's "Use timeline" mode: the engine draws the composition at the playhead every frame (transitions, opacity, fades, automation, video clips). The playhead reaches the engine as a show-clock anchor through the new SVAndroid.showClock. The in-app player follows the transport (play/pause/seek, loop wrap, cue hold). - Canvas lanes with touch gestures: select, drag (snap + magnet, vertical track change), trim handles outside the clip, fade handles, pinch zoom, fling scroll, long-press context menu, marquee multi-select, ruler scrubbing, marker/tempo/loop dragging. - Desktop features: timeline bank, clip and automation tracks (mute/solo/lock/opacity/order), all clip types with sources and targets, phone equivalents of action clips, inspector fields, split/duplicate/copy/cut/paste/nudge/move track, markers and cues with GO, tempo map, loop, all snap modes, ruler units, follow, lane height, undo/redo, markers from lyrics, YouTube chapters, automation targets from the desktop catalog, learn and record. - Layouts: dock under the visible stage in portrait, side by side in landscape phones, wide headers and a side inspector on tablets. - A chip on the main screen shows when the output follows the timeline, with a way back to manual settings. - Parity checklist: docs/android/TIMELINE.md (+ .tr.md). - Probe `timeline` rewritten for the canvas: 15 checks with real touches. Co-authored-by: caganturgut <[email protected]>
- Wait for the song after play, a jump or a loop wrap, and while it buffers; continue from the song's position. A state counts only if it was read after the seek was done (the seek reply carries `at`). - While waiting, poll the player four times a second (a "playing" event can be missed); while playing, twice a second through the new light `playerPosition` request (`player.refresh()`), and follow the song when they differ by more than 80 ms. - The player state carries `at`, so a late event is corrected. - With the loop on, a song found outside the loop goes back in with showclock.wrap instead of pulling the playhead out. - If the player does not start within 6 s, pause both; turning "Use timeline" off pauses the song too. - Probe: compensated positions, loop sampled ten times (with the mode off: on SwiftShader the page freezes 1.5-3 s when a scene clip starts), exports must report saved, partial results on error. - Docs: TIMELINE song clock and emulator precision; HOST player.refresh, playerPosition and `at`. For #1054 Co-authored-by: caganturgut <[email protected]>
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.
For #1054 (Phase 5).
Rebuilds the phone/tablet timeline on the desktop's shared modules so the data, the editing operations and the live output match the desktop Timeline page. Parity checklist with a status per feature:
docs/android/TIMELINE.md(TR:TIMELINE.tr.md).Shared code
src/shared/timeline.jssrc/shared/timeline-edit.jssrc/shared/timeline-compose.jssrc/shared/showclock.jssrc/admin/modulation-panel.jstargetCatalog(loads without the panel; added to the APK assets)src/shared/export-formats.jsPhone-only: the touch surface (
src/mobile/shell-timeline.js,-lane.js,-forms.js) and the in-app player as the transport's clock.Live output
"Use timeline" works as on the desktop: the engine draws the composition at the playhead every frame (transitions, opacity, fades, automation, video clips). The playhead reaches the engine as a show-clock anchor through the new
SVAndroid.showClock(HOST.md updated). While the mode is on, a chip on the main screen says so and offers "Back to manual settings". The MVP's apply-scene-at-clip-boundary path is gone, so playing no longer overwrites the working scene.In-app player as the clock
When the in-app player has a song, the song is the clock:
at).player.refresh()→playerPosition, no cover art). It moves to the song when they differ by more than 80 ms. Answers asked before a jump are dropped.showclock.wrap), and the playhead waits for it. This happens when a wrap seek came late or was lost. Measured on the emulator: the song ran 1.4 s past the loop end, and drift correction pulled the playhead out with it.at(whenpositionwas read), so a late event is corrected. On the emulator, events reached the page up to ~0.9 s late while the page was busy.Layouts
Differences from the desktop (documented in the checklist)
timeline-target.js). On the phone, "Open scene" goes back to manual settings, applies the scene and opens Layers. Clip copies from desktop backups are kept and drawn.Fixes found while testing
cfg.timelinechanges from outside.bufferingflag that the player never sends (it sends astatestring). The loop wrap depended on a cached state that was stale. A pause from outside right after play was swallowed.Verification (API 36 emulator, SwiftShader)
node android/tools/probe.js timeline: 19 checks with real touches (adb, plus CDP touch events for pinch and double tap), all passing:SVShowDebug.time/.composedsv-test-song (31).mp4.pagespasses on this build and on the 1117e dev/android build. The earlier single failure on the favorite star did not repeat.gradlew assembleDebugbuilds;node --test android/js-tests/*.test.js: 72 pass;npm test: 4570 pass, 1 skipped.wm size 2560x1600(tablet).