@kieransimkin/dancemoves 3.1.19 → 3.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -7,3 +7,9 @@
7
7
  - Keep credentials, account data, private media and rights records out of source, fixtures, logs and packages. Use synthetic fixtures or explicitly authorised public examples and preserve their provenance/licences.
8
8
  - Use [CONTRIBUTING.md](CONTRIBUTING.md) for review. Maintainers publish accepted, validated improvements as a fresh matching GitHub release and verify configured registry destinations. Preserve existing tags and release assets; publication and deployment remain subject to applicable authorisation.
9
9
  - Website: https://kieransimkin.co.uk/danceflow/
10
+
11
+ ## Keep README documentation current
12
+
13
+ - Whenever a feature is added or changed, update the relevant README.md in the same change to reflect the resulting behaviour. This applies to every feature addition or modification, including APIs, commands, configuration, defaults, integrations and removals.
14
+ - Update affected feature descriptions, usage instructions, options, examples and limitations. For tools or packages with their own README.md, update that README as well as the repository README when its overview or usage is affected.
15
+ - Check the README against the implemented and verified behaviour before committing, opening or merging a PR, publishing a release or handing off the work. A feature change is incomplete until its README documentation is current; a changelog or other documentation does not replace this requirement.
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # DanceMoves
2
2
 
3
+ **3.1.20** adds a shared playback transport for explicitly verified native and
4
+ YouTube players. Full-master players drive the existing musical effects; Shorts
5
+ map their offset and duration onto the master clock. See
6
+ [playback sources](docs/playback-sources.md) for provenance, controls and lifecycle.
7
+
3
8
  `connectPhoneMotion()` attaches suitable existing spatial effects to one shared
4
9
  phone input route, preserving desktop pointer input. See the
5
10
  [connection guide](docs/phone-motion-connections.md) for permission UI, consumer
@@ -946,3 +951,12 @@ back into this section. Existing release and deployment history remains in Git,
946
951
  ## WordPress.org publication
947
952
 
948
953
  The release workflow can update the WordPress.org directory automatically after a validated release tag. Initial directory submission and human approval remain required. After approval, configure repository variables `WPORG_PLUGIN_APPROVED=true` and `WPORG_PLUGIN_SLUG` with the directory-assigned slug, plus `WPORG_SVN_USERNAME` and `WPORG_SVN_PASSWORD` secrets in the `wordpress-org` environment. The job verifies the exact tested release artifacts after the matching GitHub release exists, then uploads the packaged plugin through SVN. It remains disabled while the initial submission is queued; it does not install the plugin on a website. Website: https://kieransimkin.co.uk/danceflow/
954
+
955
+ ## Agent guidance releases
956
+
957
+ Source-only agent guidance releases use `readme-policy-vMAJOR.MINOR.PATCH` tags
958
+ and contain the updated instructions with a source manifest and checksums.
959
+ They version the documentation policy independently of the runtime packages.
960
+ The runtime release workflow accepts tags starting with `v` and then verifies
961
+ the exact semantic version and immutable source before building and publishing
962
+ packages. Guidance release events skip that workflow's build and publishing jobs.
@@ -0,0 +1,78 @@
1
+ # Audio, video and excerpt playback
2
+
3
+ One verified master can have several native audio/video and YouTube players.
4
+ `playbackSource(master)` returns a stable, event-driven transport. Existing
5
+ shared cues, lyrics, pulse, sprite, timeline and rudiment consumers resolve that
6
+ transport automatically when given its native master element. Page callbacks
7
+ that directly read a native element must instead read the returned transport.
8
+ The visible native controls keep controlling their original element.
9
+
10
+ Register each additional player explicitly, after its master duration is known:
11
+
12
+ ```js
13
+ const master = root.querySelector('audio');
14
+ const source = motion.playbackSource(master);
15
+ const full = motion.registerPlayer({master, player: root.querySelector('video'),
16
+ masterVerified: true});
17
+ const short = motion.registerYouTube({master,
18
+ iframe: root.querySelector('iframe'), masterVerified: true,
19
+ offset: 48, duration: 20});
20
+ await short.ready;
21
+ // Player time 3 seconds is master time 51 seconds.
22
+ // Dispose before removing/replacing the player:
23
+ short.teardown();
24
+ ```
25
+
26
+ A video-only page may pass one stable `{id, duration}` master reference instead
27
+ of a native element, using the verified recording identity and exact master
28
+ duration. This avoids adding or playing hidden audio. Reuse that reference for
29
+ all of the recording's players and pass `playbackSource(reference)` to its
30
+ effects. Registration joins the existing timing engine after runtime readiness.
31
+ WordPress still obtains its lyric/cue files exclusively from selected metadata.
32
+ If a native master is present but its metadata is still loading, include that
33
+ element as `element` in the reference. Its existing consumers keep the same
34
+ transport and the verified duration supplies the initial clock without waiting
35
+ for another media download. Conflicting or mismatched durations are rejected.
36
+
37
+ All values are seconds. `offset` is the start in the associated master,
38
+ `duration` is its contiguous excerpt length, and optional `playerStart` is the
39
+ point in the video where that soundtrack starts. Default offset/playerStart are
40
+ zero and default duration is the complete master. Negative, nonfinite, empty or
41
+ out-of-master windows are rejected. Preroll/postroll do not acquire a song clock.
42
+ This mapping describes a contiguous, unchanged-rate excerpt, not a mashup,
43
+ reordered edit or changed recording. Such media needs a separately verified
44
+ mapping and must not be falsely assigned to this master.
45
+
46
+ `masterVerified: true` is the caller's explicit provenance attestation. It is
47
+ never inferred from equal duration, similar titles or artwork. Preserve the
48
+ render/source hashes and exact published-player identity outside the runtime.
49
+ The top campaign video must use the exact release master as its soundtrack;
50
+ other full-master players share its clock, while distinct edits retain their
51
+ own identity. YouTube necessarily transcodes the upload: exactness here means
52
+ the supplied soundtrack and timing, not byte identity of YouTube's stream.
53
+
54
+ The first playing associated player pauses the prior associated player. It does
55
+ not secretly play muted duplicate audio. The source exposes master `currentTime`
56
+ and `duration`, actual playback state/rate, `activePlayer` and native `element`.
57
+ Mapped source seeks are clamped to the selected excerpt. Switching players
58
+ reconciles a seek without replaying skipped cues. Buffering pauses the source;
59
+ seek/rate/loop changes use the same existing effect lifecycle.
60
+ Preroll and postroll stay outside the song clock. Replaying an excerpt re-arms
61
+ its actual starting cue. Existing consumers of another associated native audio
62
+ element retain a stable source while the group keeps one cue dispatcher.
63
+
64
+ YouTube uses the official IFrame API, adds `enablejsapi=1` and the current origin,
65
+ and preserves an existing API-ready callback. Register after the visitor/consent
66
+ flow permits the iframe. Registration itself never requests autoplay. `ready`
67
+ rejects API/player failures or timeout. Always handle that promise and show an
68
+ accurate unavailable state. A successfully constructed player does not prove
69
+ playback or soundtrack identity. Test an advancing content timeline, controls,
70
+ pause, seek, rate, buffering, replay, visibility and teardown on real embeds.
71
+
72
+ Sampling runs only for the active, playing, visible YouTube source. Native
73
+ players use their events without a second scheduler. `teardown()` is idempotent;
74
+ runtime destruction releases registered owners. Shared effects retain their
75
+ reduced-motion, forced-colour, quality and visibility policies. Physical-device
76
+ performance still needs physical evidence.
77
+
78
+ Reference: [YouTube IFrame Player API](https://developers.google.com/youtube/iframe_api_reference).
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": "dancemoves-library-build/v1",
3
3
  "name": "@kieransimkin/dancemoves",
4
- "version": "3.1.19",
4
+ "version": "3.1.20",
5
5
  "homepage": "https://kieransimkin.co.uk/my-songs/",
6
6
  "files": [
7
7
  {
@@ -31,23 +31,23 @@
31
31
  },
32
32
  {
33
33
  "path": "dancemoves.min.js",
34
- "bytes": 189980,
35
- "sha256": "2d9f8a6b5ac0ff32d6f940c31c16213e145c85c48fc9957ee2e405ce91d02d02"
34
+ "bytes": 201822,
35
+ "sha256": "2c2f314a6582488e8c969009ff7115428f6bcf8b5f0b1467c683adca59cdd30b"
36
36
  },
37
37
  {
38
38
  "path": "index.cjs",
39
- "bytes": 320229,
40
- "sha256": "df4670757481c736796dd9878148f33a2a7095713851f2d14218e6efeb4edd4a"
39
+ "bytes": 342587,
40
+ "sha256": "9bdad4f199b86ea24644342c7fbd65afaf301f476dcfb7c3d21fa6c32dd198f3"
41
41
  },
42
42
  {
43
43
  "path": "index.d.ts",
44
- "bytes": 10545,
45
- "sha256": "218096340a1ac20451ce28a04c31c74881a37ff3dad065decfcc8ac03d883143"
44
+ "bytes": 11816,
45
+ "sha256": "2f579874839048da9bfdb207e8dc90941bfeae1b09d61e5f94d56d8780f2cb5c"
46
46
  },
47
47
  {
48
48
  "path": "index.mjs",
49
- "bytes": 319145,
50
- "sha256": "8cc48f64271c91392d8036ac4d361c08af310454b9a2132e80cd584858acb8da"
49
+ "bytes": 341503,
50
+ "sha256": "30f1ec52e914f24a2b0ae73d2ba8a14bcc8c05ae070a223ad7a9ff320d7e55af"
51
51
  },
52
52
  {
53
53
  "path": "react.cjs",
@@ -66,8 +66,8 @@
66
66
  },
67
67
  {
68
68
  "path": "rudiments.d.ts",
69
- "bytes": 4579,
70
- "sha256": "cde62af2e915cd2c7dd7ea2356cf877886642b019223f4dcff0b6f7753cc24c1"
69
+ "bytes": 4900,
70
+ "sha256": "e7e534e3c78addfafe8b3994a7c4931b36b22f93d1587ef4eeea842cc4f03964"
71
71
  },
72
72
  {
73
73
  "path": "server.cjs",
@@ -106,8 +106,8 @@
106
106
  },
107
107
  {
108
108
  "path": "wordpress.js",
109
- "bytes": 188795,
110
- "sha256": "a759919bdc14b8850adc8a68a87445fa6341d629113c282834d798b27da97e9c"
109
+ "bytes": 200656,
110
+ "sha256": "df31e8c47103cb28bbd0c12b230d6804cabd872882c8cbe35045e1bee11e1fcb"
111
111
  }
112
112
  ]
113
113
  }