@hyperframes/player 0.8.85 → 0.8.87
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 +24 -2
- package/dist/hyperframes-player.cjs +12 -3
- package/dist/hyperframes-player.cjs.map +1 -1
- package/dist/hyperframes-player.d.cts +43 -0
- package/dist/hyperframes-player.d.ts +43 -0
- package/dist/hyperframes-player.global.js +12 -3
- package/dist/hyperframes-player.global.js.map +1 -1
- package/dist/hyperframes-player.js +12 -3
- package/dist/hyperframes-player.js.map +1 -1
- package/package.json +2 -2
|
@@ -112,6 +112,10 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
112
112
|
private _runtimeDataRequestId;
|
|
113
113
|
private _pendingRuntimeData;
|
|
114
114
|
private _afterUpdate;
|
|
115
|
+
private _videoSource;
|
|
116
|
+
private _runtimeOwnsPlayRange;
|
|
117
|
+
private _enteringRange;
|
|
118
|
+
private _rangeClampReported;
|
|
115
119
|
constructor();
|
|
116
120
|
connectedCallback(): void;
|
|
117
121
|
disconnectedCallback(): void;
|
|
@@ -132,6 +136,7 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
132
136
|
duration: number;
|
|
133
137
|
}[];
|
|
134
138
|
play(): void;
|
|
139
|
+
private _play;
|
|
135
140
|
pause(): void;
|
|
136
141
|
stopMedia(): void;
|
|
137
142
|
seek(timeInSeconds: number): void;
|
|
@@ -197,6 +202,30 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
197
202
|
set disableClickToPlay(disabled: boolean);
|
|
198
203
|
get loop(): boolean;
|
|
199
204
|
set loop(l: boolean);
|
|
205
|
+
/** Film time where range playback starts; null (no `range-start`) starts at 0. */
|
|
206
|
+
get rangeStart(): number | null;
|
|
207
|
+
set rangeStart(seconds: number | null);
|
|
208
|
+
/** Film time where range playback ends or loops; null (no `range-end`) plays to the end.
|
|
209
|
+
* When it ends inside the film, `currentTime` at `ended` is inside its last frame, before this. */
|
|
210
|
+
get rangeEnd(): number | null;
|
|
211
|
+
set rangeEnd(seconds: number | null);
|
|
212
|
+
private _readSeconds;
|
|
213
|
+
private _writeSeconds;
|
|
214
|
+
private _hasPlayRange;
|
|
215
|
+
private _playRange;
|
|
216
|
+
private _sendPlayRange;
|
|
217
|
+
/** A new range or duration: the runtime gets the new end and the host hears of a clamp. With
|
|
218
|
+
* `park`, a paused player moves to the start and a playing one outside the range jumps there;
|
|
219
|
+
* a queued play() starts at the range start itself. */
|
|
220
|
+
private _applyPlayRange;
|
|
221
|
+
private _reportRangeClamp;
|
|
222
|
+
private _moveIntoPlayRange;
|
|
223
|
+
/** A `play-range` runtime jumps by itself and a player clock seeks without pausing; an older
|
|
224
|
+
* runtime is seeked and resumed, with no second `play` event. */
|
|
225
|
+
private _jumpWhilePlaying;
|
|
226
|
+
/** Where the player's own clock stops, and the time it then shows: mid last frame, since a video
|
|
227
|
+
* seeked onto a frame boundary can decode the frame before it. */
|
|
228
|
+
private _clockStop;
|
|
200
229
|
private _sendControl;
|
|
201
230
|
private _deliverRuntimeData;
|
|
202
231
|
private _deliverRuntimeDataClear;
|
|
@@ -227,11 +256,25 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
227
256
|
*/
|
|
228
257
|
private _replayBridgeState;
|
|
229
258
|
private _reloadShaderOptions;
|
|
259
|
+
private _navigateSrc;
|
|
260
|
+
/** A `type="video/..."` src plays in a `<video>`, unless `srcdoc` (which wins, as in an iframe)
|
|
261
|
+
* shows a composition. */
|
|
262
|
+
private _wantsVideo;
|
|
263
|
+
private _pauseForVideoSwitch;
|
|
264
|
+
private _loadSrc;
|
|
265
|
+
private _loadVideo;
|
|
266
|
+
private _teardownVideo;
|
|
267
|
+
private _syncVideoAudio;
|
|
268
|
+
private _onVideoReady;
|
|
269
|
+
private _applyTimelineDuration;
|
|
270
|
+
private _applyVideoSize;
|
|
271
|
+
private _onVideoPlayRejected;
|
|
230
272
|
private _trySyncSeek;
|
|
231
273
|
private _withDirectTimeline;
|
|
232
274
|
private _tryDirectTimelineSeek;
|
|
233
275
|
private _tryDirectTimelinePlay;
|
|
234
276
|
private _tryDirectTimelinePause;
|
|
277
|
+
private _showPausedVideoTime;
|
|
235
278
|
/**
|
|
236
279
|
* Widget-frame RAF loop that sends "tick" postMessages to the composition
|
|
237
280
|
* iframe on every frame. Used for the runtime bridge path so that animation
|
|
@@ -112,6 +112,10 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
112
112
|
private _runtimeDataRequestId;
|
|
113
113
|
private _pendingRuntimeData;
|
|
114
114
|
private _afterUpdate;
|
|
115
|
+
private _videoSource;
|
|
116
|
+
private _runtimeOwnsPlayRange;
|
|
117
|
+
private _enteringRange;
|
|
118
|
+
private _rangeClampReported;
|
|
115
119
|
constructor();
|
|
116
120
|
connectedCallback(): void;
|
|
117
121
|
disconnectedCallback(): void;
|
|
@@ -132,6 +136,7 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
132
136
|
duration: number;
|
|
133
137
|
}[];
|
|
134
138
|
play(): void;
|
|
139
|
+
private _play;
|
|
135
140
|
pause(): void;
|
|
136
141
|
stopMedia(): void;
|
|
137
142
|
seek(timeInSeconds: number): void;
|
|
@@ -197,6 +202,30 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
197
202
|
set disableClickToPlay(disabled: boolean);
|
|
198
203
|
get loop(): boolean;
|
|
199
204
|
set loop(l: boolean);
|
|
205
|
+
/** Film time where range playback starts; null (no `range-start`) starts at 0. */
|
|
206
|
+
get rangeStart(): number | null;
|
|
207
|
+
set rangeStart(seconds: number | null);
|
|
208
|
+
/** Film time where range playback ends or loops; null (no `range-end`) plays to the end.
|
|
209
|
+
* When it ends inside the film, `currentTime` at `ended` is inside its last frame, before this. */
|
|
210
|
+
get rangeEnd(): number | null;
|
|
211
|
+
set rangeEnd(seconds: number | null);
|
|
212
|
+
private _readSeconds;
|
|
213
|
+
private _writeSeconds;
|
|
214
|
+
private _hasPlayRange;
|
|
215
|
+
private _playRange;
|
|
216
|
+
private _sendPlayRange;
|
|
217
|
+
/** A new range or duration: the runtime gets the new end and the host hears of a clamp. With
|
|
218
|
+
* `park`, a paused player moves to the start and a playing one outside the range jumps there;
|
|
219
|
+
* a queued play() starts at the range start itself. */
|
|
220
|
+
private _applyPlayRange;
|
|
221
|
+
private _reportRangeClamp;
|
|
222
|
+
private _moveIntoPlayRange;
|
|
223
|
+
/** A `play-range` runtime jumps by itself and a player clock seeks without pausing; an older
|
|
224
|
+
* runtime is seeked and resumed, with no second `play` event. */
|
|
225
|
+
private _jumpWhilePlaying;
|
|
226
|
+
/** Where the player's own clock stops, and the time it then shows: mid last frame, since a video
|
|
227
|
+
* seeked onto a frame boundary can decode the frame before it. */
|
|
228
|
+
private _clockStop;
|
|
200
229
|
private _sendControl;
|
|
201
230
|
private _deliverRuntimeData;
|
|
202
231
|
private _deliverRuntimeDataClear;
|
|
@@ -227,11 +256,25 @@ declare class HyperframesPlayer extends HTMLElement {
|
|
|
227
256
|
*/
|
|
228
257
|
private _replayBridgeState;
|
|
229
258
|
private _reloadShaderOptions;
|
|
259
|
+
private _navigateSrc;
|
|
260
|
+
/** A `type="video/..."` src plays in a `<video>`, unless `srcdoc` (which wins, as in an iframe)
|
|
261
|
+
* shows a composition. */
|
|
262
|
+
private _wantsVideo;
|
|
263
|
+
private _pauseForVideoSwitch;
|
|
264
|
+
private _loadSrc;
|
|
265
|
+
private _loadVideo;
|
|
266
|
+
private _teardownVideo;
|
|
267
|
+
private _syncVideoAudio;
|
|
268
|
+
private _onVideoReady;
|
|
269
|
+
private _applyTimelineDuration;
|
|
270
|
+
private _applyVideoSize;
|
|
271
|
+
private _onVideoPlayRejected;
|
|
230
272
|
private _trySyncSeek;
|
|
231
273
|
private _withDirectTimeline;
|
|
232
274
|
private _tryDirectTimelineSeek;
|
|
233
275
|
private _tryDirectTimelinePlay;
|
|
234
276
|
private _tryDirectTimelinePause;
|
|
277
|
+
private _showPausedVideoTime;
|
|
235
278
|
/**
|
|
236
279
|
* Widget-frame RAF loop that sends "tick" postMessages to the composition
|
|
237
280
|
* iframe on every frame. Used for the runtime bridge path so that animation
|