@kieransimkin/dancemoves 3.1.20 → 3.1.22

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/README.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # DanceMoves
2
2
 
3
+ **3.1.22** fixes WordPress.org submission metadata: the Author URI points to
4
+ [Kieran's website](https://kieransimkin.co.uk/), separately from the plugin
5
+ homepage. The release checker rejects duplicate plugin/author URLs before
6
+ packaging. The plugin name remains **DanceMoves**.
7
+
3
8
  **3.1.20** adds a shared playback transport for explicitly verified native and
4
9
  YouTube players. Full-master players drive the existing musical effects; Shorts
5
10
  map their offset and duration onto the master clock. See
6
11
  [playback sources](docs/playback-sources.md) for provenance, controls and lifecycle.
7
12
 
13
+ **3.1.21** adds `publishPlayback()` and `receiveChildPlayback()` to connect an explicitly selected
14
+ child watch page to its parent runtime. The parent retains its existing cues,
15
+ lyrics and effect owners; closing or losing the child stops its clock. The
16
+ integration composes with the shared player API and requires its verified
17
+ master/excerpt mapping. See [child-page playback](docs/child-playback.md) and the
18
+ [standalone/modal example](examples/child-playback/README.md).
19
+
8
20
  `connectPhoneMotion()` attaches suitable existing spatial effects to one shared
9
21
  phone input route, preserving desktop pointer input. See the
10
22
  [connection guide](docs/phone-motion-connections.md) for permission UI, consumer
@@ -0,0 +1,94 @@
1
+ # Playback from a child watch page
2
+
3
+ The parent EPK owns its timing metadata, master association and existing effect
4
+ controllers. A watch page owns its visible player. DanceMoves forwards the
5
+ child's actual playback state into the parent's shared player transport. It
6
+ does not forward cue labels, timing-file URLs, artwork or choreography.
7
+
8
+ ```js
9
+ // Parent: mount the runtime and its effects before opening the modal.
10
+ // Register after the selected master duration is known.
11
+ const child = motion.receiveChildPlayback({
12
+ iframe: document.querySelector('#watch-frame'),
13
+ origin: location.origin,
14
+ channel: 'watch-player',
15
+ assetId: 'verified-published-video-id',
16
+ master: document.querySelector('audio'),
17
+ masterVerified: true,
18
+ offset: 0, duration: 180
19
+ });
20
+ await child.ready;
21
+ // The existing motion.playbackSource(master) now follows the child.
22
+ // On modal close, dispose BEFORE removing the iframe:
23
+ child.teardown();
24
+ ```
25
+
26
+ ```js
27
+ // Child watch page: its real player is present on initial load.
28
+ // Standalone visits have no parent bridge or autoplay.
29
+ if (window.parent !== window) {
30
+ const publisher = motion.publishPlayback({
31
+ source: motion.playbackSource(master), // Native or registered YouTube transport.
32
+ targetWindow: window.parent,
33
+ origin: location.origin,
34
+ channel: 'watch-player',
35
+ assetId: 'verified-published-video-id'
36
+ });
37
+ // Dispose on route removal; runtime destruction also disposes the publisher.
38
+ }
39
+ ```
40
+
41
+ The scoped receiver requires the shared `registerPlaybackProvider`/`playbackSource` API.
42
+ Both low-level `createPlaybackReceiver()` and `createPlaybackPublisher()` are
43
+ exported for composition outside a mounted runtime. Their `window` option is an
44
+ explicit browser Window; module import is safe during SSR.
45
+
46
+ Supply an exact HTTP(S) origin including its port, never `*` or an opaque
47
+ origin. Source Window, channel, asset ID, a fresh receiver session, monotonic
48
+ sequence and finite bounded numeric state are checked on both sides. The asset
49
+ ID is a caller-selected identity, not runtime proof of soundtrack provenance.
50
+ Each frame has one receiver and each explicit route has one publisher until
51
+ teardown; reuse their transports for additional effect consumers.
52
+ Preserve verified published player IDs, render/source hashes and master mappings
53
+ outside the runtime. Do not bind unrelated edits using equal titles/durations.
54
+
55
+ Playback state includes position, duration, rate, pause, seek, buffering, end and
56
+ error. Position updates are coalesced to four per second; transport changes
57
+ remain immediate. The receiver interpolates between samples for
58
+ at most 500 ms and stops a playing source after 1500 ms without data. The
59
+ `staleAfterMilliseconds` option accepts 750–10000 ms. Native media events can
60
+ arrive sooner. No independent cue/beat parser or animation scheduler is added.
61
+ After a stale connection, call `reconnect()` to start a fresh session and await
62
+ its returned readiness promise; late packets from a disconnected session cannot
63
+ restart it. `ready` exposes the current connection attempt.
64
+
65
+ Parent pause and seek commands reach the child; parent play is rejected unless
66
+ the publisher explicitly enables `allowPlayCommands:true`. Browser autoplay
67
+ policies still apply and play-command rejection is observable through the
68
+ returned promise. Registering, reconnecting and receiving state never starts
69
+ media. Use real visitor controls and preserve consent flows before registering
70
+ a YouTube iframe. The parent does not play a muted duplicate soundtrack.
71
+
72
+ For Escape inside the child document, enable `notifyEscape:true` on the
73
+ publisher and subscribe to the receiver player's `dismiss` event to close the
74
+ dialog. Explicit child close buttons may call `publisher.requestClose()`.
75
+ Fullscreen retains its native Escape behaviour. Cross-origin nested players
76
+ may keep keyboard events in their own document; keep a visible parent close
77
+ control and test the actual embed's keyboard behaviour separately.
78
+
79
+ Frame load, visibility suspension and page restoration rotate the session.
80
+ Closing/removing the frame, pagehide, stale data and teardown stop the remote
81
+ clock; teardown also asks the child to pause and removes timers/listeners.
82
+ `ready` rejects after ten seconds without valid metadata or when removed before
83
+ readiness. Catch readiness failures and show accurate availability. A ready
84
+ bridge does not prove public playback or Google classification.
85
+
86
+ The parent source retains existing reduced-motion, forced-colour, quality,
87
+ visibility, cue/seek reconciliation and cleanup policies. The modal adapter owns
88
+ only dialog focus, ordinary controls, the iframe and lifecycle calls. Keep a
89
+ normal crawlable watch-page link and a player visible on the standalone page.
90
+ The browser fixture uses original synthetic media and tests cross-document
91
+ playback, seek, rate, preferences and removal; it is not physical Safari or
92
+ phone performance evidence.
93
+
94
+ Protocol design follows [Window.postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).
@@ -76,3 +76,10 @@ reduced-motion, forced-colour, quality and visibility policies. Physical-device
76
76
  performance still needs physical evidence.
77
77
 
78
78
  Reference: [YouTube IFrame Player API](https://developers.google.com/youtube/iframe_api_reference).
79
+
80
+ `registerPlaybackProvider()` registers an explicit non-DOM, event-driven player
81
+ with the same verified master and excerpt mapping. It accepts the
82
+ media-compatible player produced by the [child-page receiver](child-playback.md).
83
+ Native DOM players retain `registerPlayer()` and its runtime-root checks.
84
+ Provider registrations share ownership, cue/lyric dispatch and teardown; no
85
+ additional timing engine or hidden media element is created.
@@ -7,6 +7,7 @@ physical tests were executed in a restricted development environment.
7
7
 
8
8
  | Feature | Shared entry/API | Demo/test coverage |
9
9
  |---|---|---|
10
+ | Child watch-page playback | `publishPlayback`, `receiveChildPlayback`, low-level receiver/publisher | Origin/session/state and lifecycle contracts; standalone/modal synthetic-media browser example |
10
11
  | BPM, ticks, duration quantization, boundaries | Main factory/core methods | Existing clock/scheduling/interval gallery; original core tests |
11
12
  | CSS timing/control/lyric disclosure | Core properties + CSS | WordPress-style clock/shared timing demos; original CSS contracts |
12
13
  | Named cues, intervals, DOM events, animation ownership | Core methods | React cue panel; original 23-page gallery and core contracts |
@@ -1,5 +1,11 @@
1
1
  # WordPress.org publication
2
2
 
3
+ The plugin and author URI headers must identify different pages. The author
4
+ header uses https://kieransimkin.co.uk/; the plugin retains its published My Songs
5
+ homepage. `npm run check:release` rejects duplicate URLs (including a trailing
6
+ slash variation), matching the directory upload validation. Keep the public
7
+ plugin name **DanceMoves** and its existing compatibility identifiers.
8
+
3
9
  Run the official Plugin Check against the exact production ZIP with the intended directory slug. Do not scan tests as installed runtime code, ignore an entire category or treat a passing static scan as a security audit. Review all warnings and document each contextual finding. Keep the readme stable tag, main PHP version and GitHub release aligned. After directory approval, publish the same verified source through the assigned SVN repository; verify the downloaded directory ZIP independently. No directory password belongs in source.
4
10
 
5
11
  ## Potential problems
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": "dancemoves-library-build/v1",
3
3
  "name": "@kieransimkin/dancemoves",
4
- "version": "3.1.20",
4
+ "version": "3.1.22",
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": 201822,
35
- "sha256": "2c2f314a6582488e8c969009ff7115428f6bcf8b5f0b1467c683adca59cdd30b"
34
+ "bytes": 212321,
35
+ "sha256": "36651cd57003477609ac0024c66ae69698cf51ef1ae083f3dd25e7a7ad41e3c4"
36
36
  },
37
37
  {
38
38
  "path": "index.cjs",
39
- "bytes": 342587,
40
- "sha256": "9bdad4f199b86ea24644342c7fbd65afaf301f476dcfb7c3d21fa6c32dd198f3"
39
+ "bytes": 361185,
40
+ "sha256": "1f02fb91fa046ac132a0757ceed994843adae20728fbb80327a1ea6c314a515a"
41
41
  },
42
42
  {
43
43
  "path": "index.d.ts",
44
- "bytes": 11816,
45
- "sha256": "2f579874839048da9bfdb207e8dc90941bfeae1b09d61e5f94d56d8780f2cb5c"
44
+ "bytes": 13718,
45
+ "sha256": "82ec16610754f0237cd91e2a7a7ce4f6fe17617d8a61b78d089143e9fdb142e4"
46
46
  },
47
47
  {
48
48
  "path": "index.mjs",
49
- "bytes": 341503,
50
- "sha256": "30f1ec52e914f24a2b0ae73d2ba8a14bcc8c05ae070a223ad7a9ff320d7e55af"
49
+ "bytes": 360040,
50
+ "sha256": "1766fb4365f13191b75dc77ac01c9e51c8e8250e8408c34a7d7bf19ce77fe32b"
51
51
  },
52
52
  {
53
53
  "path": "react.cjs",
@@ -106,8 +106,8 @@
106
106
  },
107
107
  {
108
108
  "path": "wordpress.js",
109
- "bytes": 200656,
110
- "sha256": "df31e8c47103cb28bbd0c12b230d6804cabd872882c8cbe35045e1bee11e1fcb"
109
+ "bytes": 211126,
110
+ "sha256": "fcea9c493f3e895320eb15673580cdfebd6b8fd333cd90e2a11c0054fbe8317d"
111
111
  }
112
112
  ]
113
113
  }