@remotion/player 4.0.536 → 4.0.538
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/dist/cjs/BufferingIndicator.js +3 -5
- package/dist/cjs/DefaultPlayPauseButton.js +3 -3
- package/dist/cjs/EmitterProvider.js +1 -1
- package/dist/cjs/MediaVolumeSlider.js +2 -2
- package/dist/cjs/PlaybackrateControl.js +5 -7
- package/dist/cjs/Player.d.ts +6 -1
- package/dist/cjs/Player.js +6 -4
- package/dist/cjs/PlayerControls.js +3 -11
- package/dist/cjs/PlayerSeekBar.js +1 -5
- package/dist/cjs/PlayerTimeLabel.js +1 -1
- package/dist/cjs/PlayerUI.d.ts +3 -3
- package/dist/cjs/PlayerUI.js +4 -7
- package/dist/cjs/SharedPlayerContext.d.ts +1 -0
- package/dist/cjs/SharedPlayerContext.js +2 -2
- package/dist/cjs/Thumbnail.d.ts +1 -1
- package/dist/cjs/Thumbnail.js +1 -1
- package/dist/cjs/ThumbnailUI.d.ts +1 -1
- package/dist/cjs/ThumbnailUI.js +3 -3
- package/dist/cjs/calculate-scale.d.ts +11 -11
- package/dist/cjs/error-boundary.js +5 -2
- package/dist/cjs/event-emitter.js +88 -84
- package/dist/cjs/icons.js +9 -13
- package/dist/cjs/index.d.ts +14 -32
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/license-blacklist.js +1 -1
- package/dist/cjs/player-css-classname.d.ts +1 -1
- package/dist/cjs/render-volume-slider.js +3 -5
- package/dist/cjs/set-global-time-anchor.d.ts +2 -1
- package/dist/cjs/use-hover-state.d.ts +1 -1
- package/dist/cjs/use-playback.d.ts +2 -1
- package/dist/cjs/use-playback.js +64 -39
- package/dist/cjs/use-player-methods.js +9 -8
- package/dist/cjs/use-remotion-license-acknowledge.d.ts +2 -1
- package/dist/cjs/utils/calculate-player-size.d.ts +4 -3
- package/dist/cjs/volume-persistence.d.ts +2 -1
- package/dist/esm/index.mjs +84 -56
- package/package.json +5 -5
|
@@ -2,22 +2,76 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ThumbnailEmitter = exports.PlayerEmitter = void 0;
|
|
4
4
|
class PlayerEmitter {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
constructor() {
|
|
6
|
+
this.listeners = {
|
|
7
|
+
ended: [],
|
|
8
|
+
error: [],
|
|
9
|
+
pause: [],
|
|
10
|
+
play: [],
|
|
11
|
+
ratechange: [],
|
|
12
|
+
scalechange: [],
|
|
13
|
+
seeked: [],
|
|
14
|
+
timeupdate: [],
|
|
15
|
+
frameupdate: [],
|
|
16
|
+
fullscreenchange: [],
|
|
17
|
+
volumechange: [],
|
|
18
|
+
mutechange: [],
|
|
19
|
+
waiting: [],
|
|
20
|
+
resume: [],
|
|
21
|
+
};
|
|
22
|
+
this.dispatchSeek = (frame) => {
|
|
23
|
+
this.dispatchEvent('seeked', {
|
|
24
|
+
frame,
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
this.dispatchVolumeChange = (volume) => {
|
|
28
|
+
this.dispatchEvent('volumechange', {
|
|
29
|
+
volume,
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
this.dispatchPause = () => {
|
|
33
|
+
this.dispatchEvent('pause', undefined);
|
|
34
|
+
};
|
|
35
|
+
this.dispatchPlay = () => {
|
|
36
|
+
this.dispatchEvent('play', undefined);
|
|
37
|
+
};
|
|
38
|
+
this.dispatchEnded = () => {
|
|
39
|
+
this.dispatchEvent('ended', undefined);
|
|
40
|
+
};
|
|
41
|
+
this.dispatchRateChange = (playbackRate) => {
|
|
42
|
+
this.dispatchEvent('ratechange', {
|
|
43
|
+
playbackRate,
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
this.dispatchScaleChange = (scale) => {
|
|
47
|
+
this.dispatchEvent('scalechange', {
|
|
48
|
+
scale,
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
this.dispatchError = (error) => {
|
|
52
|
+
this.dispatchEvent('error', {
|
|
53
|
+
error,
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
this.dispatchTimeUpdate = (event) => {
|
|
57
|
+
this.dispatchEvent('timeupdate', event);
|
|
58
|
+
};
|
|
59
|
+
this.dispatchFrameUpdate = (event) => {
|
|
60
|
+
this.dispatchEvent('frameupdate', event);
|
|
61
|
+
};
|
|
62
|
+
this.dispatchFullscreenChange = (event) => {
|
|
63
|
+
this.dispatchEvent('fullscreenchange', event);
|
|
64
|
+
};
|
|
65
|
+
this.dispatchMuteChange = (event) => {
|
|
66
|
+
this.dispatchEvent('mutechange', event);
|
|
67
|
+
};
|
|
68
|
+
this.dispatchWaiting = (event) => {
|
|
69
|
+
this.dispatchEvent('waiting', event);
|
|
70
|
+
};
|
|
71
|
+
this.dispatchResume = (event) => {
|
|
72
|
+
this.dispatchEvent('resume', event);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
21
75
|
addEventListener(name, callback) {
|
|
22
76
|
this.listeners[name].push(callback);
|
|
23
77
|
}
|
|
@@ -29,66 +83,27 @@ class PlayerEmitter {
|
|
|
29
83
|
callback({ detail: context });
|
|
30
84
|
});
|
|
31
85
|
}
|
|
32
|
-
dispatchSeek = (frame) => {
|
|
33
|
-
this.dispatchEvent('seeked', {
|
|
34
|
-
frame,
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
dispatchVolumeChange = (volume) => {
|
|
38
|
-
this.dispatchEvent('volumechange', {
|
|
39
|
-
volume,
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
dispatchPause = () => {
|
|
43
|
-
this.dispatchEvent('pause', undefined);
|
|
44
|
-
};
|
|
45
|
-
dispatchPlay = () => {
|
|
46
|
-
this.dispatchEvent('play', undefined);
|
|
47
|
-
};
|
|
48
|
-
dispatchEnded = () => {
|
|
49
|
-
this.dispatchEvent('ended', undefined);
|
|
50
|
-
};
|
|
51
|
-
dispatchRateChange = (playbackRate) => {
|
|
52
|
-
this.dispatchEvent('ratechange', {
|
|
53
|
-
playbackRate,
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
dispatchScaleChange = (scale) => {
|
|
57
|
-
this.dispatchEvent('scalechange', {
|
|
58
|
-
scale,
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
dispatchError = (error) => {
|
|
62
|
-
this.dispatchEvent('error', {
|
|
63
|
-
error,
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
dispatchTimeUpdate = (event) => {
|
|
67
|
-
this.dispatchEvent('timeupdate', event);
|
|
68
|
-
};
|
|
69
|
-
dispatchFrameUpdate = (event) => {
|
|
70
|
-
this.dispatchEvent('frameupdate', event);
|
|
71
|
-
};
|
|
72
|
-
dispatchFullscreenChange = (event) => {
|
|
73
|
-
this.dispatchEvent('fullscreenchange', event);
|
|
74
|
-
};
|
|
75
|
-
dispatchMuteChange = (event) => {
|
|
76
|
-
this.dispatchEvent('mutechange', event);
|
|
77
|
-
};
|
|
78
|
-
dispatchWaiting = (event) => {
|
|
79
|
-
this.dispatchEvent('waiting', event);
|
|
80
|
-
};
|
|
81
|
-
dispatchResume = (event) => {
|
|
82
|
-
this.dispatchEvent('resume', event);
|
|
83
|
-
};
|
|
84
86
|
}
|
|
85
87
|
exports.PlayerEmitter = PlayerEmitter;
|
|
86
88
|
class ThumbnailEmitter {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
constructor() {
|
|
90
|
+
this.listeners = {
|
|
91
|
+
error: [],
|
|
92
|
+
waiting: [],
|
|
93
|
+
resume: [],
|
|
94
|
+
};
|
|
95
|
+
this.dispatchError = (error) => {
|
|
96
|
+
this.dispatchEvent('error', {
|
|
97
|
+
error,
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
this.dispatchWaiting = (event) => {
|
|
101
|
+
this.dispatchEvent('waiting', event);
|
|
102
|
+
};
|
|
103
|
+
this.dispatchResume = (event) => {
|
|
104
|
+
this.dispatchEvent('resume', event);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
92
107
|
addEventListener(name, callback) {
|
|
93
108
|
this.listeners[name].push(callback);
|
|
94
109
|
}
|
|
@@ -100,16 +115,5 @@ class ThumbnailEmitter {
|
|
|
100
115
|
callback({ detail: context });
|
|
101
116
|
});
|
|
102
117
|
}
|
|
103
|
-
dispatchError = (error) => {
|
|
104
|
-
this.dispatchEvent('error', {
|
|
105
|
-
error,
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
dispatchWaiting = (event) => {
|
|
109
|
-
this.dispatchEvent('waiting', event);
|
|
110
|
-
};
|
|
111
|
-
dispatchResume = (event) => {
|
|
112
|
-
this.dispatchEvent('resume', event);
|
|
113
|
-
};
|
|
114
118
|
}
|
|
115
119
|
exports.ThumbnailEmitter = ThumbnailEmitter;
|
package/dist/cjs/icons.js
CHANGED
|
@@ -5,13 +5,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
exports.ICON_SIZE = 25;
|
|
6
6
|
exports.fullscreenIconSize = 16;
|
|
7
7
|
const PlayIcon = () => {
|
|
8
|
-
return (jsx_runtime_1.jsx("svg", { width: exports.ICON_SIZE, height: exports.ICON_SIZE, viewBox: "0 0 25 25", fill: "none", children: jsx_runtime_1.jsx("path", { d: "M8 6.375C7.40904 8.17576 7.06921 10.2486 7.01438 12.3871C6.95955 14.5255 7.19163 16.6547 7.6875 18.5625C9.95364 18.2995 12.116 17.6164 14.009 16.5655C15.902 15.5147 17.4755 14.124 18.6088 12.5C17.5158 10.8949 15.9949 9.51103 14.1585 8.45082C12.3222 7.3906 10.2174 6.68116 8 6.375Z", fill: "white", stroke: "white", strokeWidth: "6.25", strokeLinejoin: "round" }) }));
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: exports.ICON_SIZE, height: exports.ICON_SIZE, viewBox: "0 0 25 25", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M8 6.375C7.40904 8.17576 7.06921 10.2486 7.01438 12.3871C6.95955 14.5255 7.19163 16.6547 7.6875 18.5625C9.95364 18.2995 12.116 17.6164 14.009 16.5655C15.902 15.5147 17.4755 14.124 18.6088 12.5C17.5158 10.8949 15.9949 9.51103 14.1585 8.45082C12.3222 7.3906 10.2174 6.68116 8 6.375Z", fill: "white", stroke: "white", strokeWidth: "6.25", strokeLinejoin: "round" }) }));
|
|
9
9
|
};
|
|
10
10
|
exports.PlayIcon = PlayIcon;
|
|
11
11
|
const PauseIcon = () => {
|
|
12
|
-
return (jsx_runtime_1.jsxs("svg", { viewBox: "0 0 100 100", width: exports.ICON_SIZE, height: exports.ICON_SIZE, children: [
|
|
13
|
-
jsx_runtime_1.jsx("rect", { x: "25", y: "20", width: "20", height: "60", fill: "#fff", ry: "5", rx: "5" }), jsx_runtime_1.jsx("rect", { x: "55", y: "20", width: "20", height: "60", fill: "#fff", ry: "5", rx: "5" })
|
|
14
|
-
] }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 100 100", width: exports.ICON_SIZE, height: exports.ICON_SIZE, children: [(0, jsx_runtime_1.jsx)("rect", { x: "25", y: "20", width: "20", height: "60", fill: "#fff", ry: "5", rx: "5" }), (0, jsx_runtime_1.jsx)("rect", { x: "55", y: "20", width: "20", height: "60", fill: "#fff", ry: "5", rx: "5" })] }));
|
|
15
13
|
};
|
|
16
14
|
exports.PauseIcon = PauseIcon;
|
|
17
15
|
const FullscreenIcon = ({ isFullscreen, }) => {
|
|
@@ -20,32 +18,30 @@ const FullscreenIcon = ({ isFullscreen, }) => {
|
|
|
20
18
|
const out = isFullscreen ? 0 : strokeWidth / 2;
|
|
21
19
|
const middleInset = isFullscreen ? strokeWidth * 1.6 : strokeWidth / 2;
|
|
22
20
|
const inset = isFullscreen ? strokeWidth * 1.6 : strokeWidth * 2;
|
|
23
|
-
return (jsx_runtime_1.jsxs("svg", { viewBox: `0 0 ${viewSize} ${viewSize}`, height: exports.fullscreenIconSize, width: exports.fullscreenIconSize, children: [
|
|
24
|
-
jsx_runtime_1.jsx("path", { d: `
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${viewSize} ${viewSize}`, height: exports.fullscreenIconSize, width: exports.fullscreenIconSize, children: [(0, jsx_runtime_1.jsx)("path", { d: `
|
|
25
22
|
M ${out} ${inset}
|
|
26
23
|
L ${middleInset} ${middleInset}
|
|
27
24
|
L ${inset} ${out}
|
|
28
|
-
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" }), jsx_runtime_1.jsx("path", { d: `
|
|
25
|
+
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" }), (0, jsx_runtime_1.jsx)("path", { d: `
|
|
29
26
|
M ${viewSize - out} ${inset}
|
|
30
27
|
L ${viewSize - middleInset} ${middleInset}
|
|
31
28
|
L ${viewSize - inset} ${out}
|
|
32
|
-
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" }), jsx_runtime_1.jsx("path", { d: `
|
|
29
|
+
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" }), (0, jsx_runtime_1.jsx)("path", { d: `
|
|
33
30
|
M ${out} ${viewSize - inset}
|
|
34
31
|
L ${middleInset} ${viewSize - middleInset}
|
|
35
32
|
L ${inset} ${viewSize - out}
|
|
36
|
-
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" }), jsx_runtime_1.jsx("path", { d: `
|
|
33
|
+
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" }), (0, jsx_runtime_1.jsx)("path", { d: `
|
|
37
34
|
M ${viewSize - out} ${viewSize - inset}
|
|
38
35
|
L ${viewSize - middleInset} ${viewSize - middleInset}
|
|
39
36
|
L ${viewSize - inset} ${viewSize - out}
|
|
40
|
-
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" })
|
|
41
|
-
] }));
|
|
37
|
+
`, stroke: "#fff", strokeWidth: strokeWidth, fill: "none" })] }));
|
|
42
38
|
};
|
|
43
39
|
exports.FullscreenIcon = FullscreenIcon;
|
|
44
40
|
const VolumeOffIcon = () => {
|
|
45
|
-
return (jsx_runtime_1.jsx("svg", { width: exports.ICON_SIZE, height: exports.ICON_SIZE, viewBox: "0 0 24 24", children: jsx_runtime_1.jsx("path", { d: "M3.63 3.63a.996.996 0 000 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 101.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12zm-8.71-6.29l-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7zM16.5 12A4.5 4.5 0 0014 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24z", fill: "#fff" }) }));
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: exports.ICON_SIZE, height: exports.ICON_SIZE, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.63 3.63a.996.996 0 000 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 101.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12zm-8.71-6.29l-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7zM16.5 12A4.5 4.5 0 0014 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24z", fill: "#fff" }) }));
|
|
46
42
|
};
|
|
47
43
|
exports.VolumeOffIcon = VolumeOffIcon;
|
|
48
44
|
const VolumeOnIcon = () => {
|
|
49
|
-
return (jsx_runtime_1.jsx("svg", { width: exports.ICON_SIZE, height: exports.ICON_SIZE, viewBox: "0 0 24 24", children: jsx_runtime_1.jsx("path", { d: "M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.45v.2c0 .38.25.71.6.85C17.18 6.53 19 9.06 19 12s-1.82 5.47-4.4 6.5c-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85C18.6 19.11 21 15.84 21 12s-2.4-7.11-5.79-8.4c-.58-.23-1.21.22-1.21.85z", fill: "#fff" }) }));
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: exports.ICON_SIZE, height: exports.ICON_SIZE, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.45v.2c0 .38.25.71.6.85C17.18 6.53 19 9.06 19 12s-1.82 5.47-4.4 6.5c-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85C18.6 19.11 21 15.84 21 12s-2.4-7.11-5.79-8.4c-.58-.23-1.21.22-1.21.85z", fill: "#fff" }) }));
|
|
50
46
|
};
|
|
51
47
|
exports.VolumeOnIcon = VolumeOnIcon;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import './_check-rsc.js';
|
|
2
|
+
import { calculateCanvasTransformation } from './calculate-scale.js';
|
|
2
3
|
import type { CallbackListener, PlayerEventTypes } from './event-emitter.js';
|
|
3
4
|
import { PlayerEmitter } from './event-emitter.js';
|
|
5
|
+
import { useHoverState } from './use-hover-state.js';
|
|
6
|
+
import { usePlayback } from './use-playback.js';
|
|
7
|
+
import { usePlayerMethods } from './use-player-methods.js';
|
|
8
|
+
import { updateAllElementsSizes, useElementSize } from './utils/use-element-size.js';
|
|
4
9
|
export type { RenderMuteButton } from './MediaVolumeSlider.js';
|
|
5
10
|
export type { PlayerMethods, PlayerRef, RenderCustomControls, ThumbnailMethods, ThumbnailRef, } from './player-methods.js';
|
|
6
11
|
export { Player } from './Player.js';
|
|
@@ -15,42 +20,19 @@ export type { CallbackListener, PlayerEventTypes as EventTypes };
|
|
|
15
20
|
export declare const PlayerInternals: {
|
|
16
21
|
PlayerEventEmitterContext: import("react").Context<PlayerEmitter | undefined>;
|
|
17
22
|
PlayerEmitter: typeof PlayerEmitter;
|
|
18
|
-
usePlayerMethods:
|
|
19
|
-
usePlayback:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
outFrame: number | null;
|
|
25
|
-
browserMediaControlsBehavior: import("./browser-mediasession.js").BrowserMediaControlsBehavior;
|
|
26
|
-
getCurrentFrame: () => number;
|
|
27
|
-
muted: boolean;
|
|
28
|
-
}) => void;
|
|
29
|
-
useElementSize: (source: HTMLElement | import("react").RefObject<HTMLElement | null> | null, options: {
|
|
30
|
-
triggerOnWindowResize: boolean;
|
|
31
|
-
shouldApplyCssTransforms: boolean;
|
|
32
|
-
}) => import("./index.js").Size | null;
|
|
33
|
-
calculateCanvasTransformation: ({ previewSize, compositionWidth, compositionHeight, canvasSize, }: {
|
|
34
|
-
previewSize: number | "auto";
|
|
35
|
-
compositionWidth: number;
|
|
36
|
-
compositionHeight: number;
|
|
37
|
-
canvasSize: import("./index.js").Size;
|
|
38
|
-
}) => {
|
|
39
|
-
centerX: number;
|
|
40
|
-
centerY: number;
|
|
41
|
-
xCorrection: number;
|
|
42
|
-
yCorrection: number;
|
|
43
|
-
scale: number;
|
|
44
|
-
};
|
|
45
|
-
useHoverState: (ref: import("react").RefObject<HTMLDivElement | null>, hideControlsWhenPointerDoesntMove: number | boolean) => boolean;
|
|
46
|
-
updateAllElementsSizes: () => void;
|
|
23
|
+
usePlayerMethods: typeof usePlayerMethods;
|
|
24
|
+
usePlayback: typeof usePlayback;
|
|
25
|
+
useElementSize: typeof useElementSize;
|
|
26
|
+
calculateCanvasTransformation: typeof calculateCanvasTransformation;
|
|
27
|
+
useHoverState: typeof useHoverState;
|
|
28
|
+
updateAllElementsSizes: typeof updateAllElementsSizes;
|
|
47
29
|
PlayerEmitterProvider: import("react").FC<{
|
|
48
|
-
readonly children:
|
|
30
|
+
readonly children: React.ReactNode;
|
|
49
31
|
readonly currentPlaybackRate: number | null;
|
|
50
32
|
}>;
|
|
51
33
|
BufferingIndicator: import("react").FC<{
|
|
52
|
-
readonly type:
|
|
53
|
-
readonly color?: string
|
|
34
|
+
readonly type: 'player' | 'studio';
|
|
35
|
+
readonly color?: string;
|
|
54
36
|
}>;
|
|
55
37
|
TimelineSequenceObserverContext: import("react").Context<import("./timeline-sequence-observer-context.js").TimelineSequenceObserver | null>;
|
|
56
38
|
CanvasOverlayContext: import("react").Context<import("react").ReactNode>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -13,9 +13,9 @@ const use_hover_state_js_1 = require("./use-hover-state.js");
|
|
|
13
13
|
const use_playback_js_1 = require("./use-playback.js");
|
|
14
14
|
const use_player_methods_js_1 = require("./use-player-methods.js");
|
|
15
15
|
const use_element_size_js_1 = require("./utils/use-element-size.js");
|
|
16
|
-
|
|
16
|
+
var Player_js_1 = require("./Player.js");
|
|
17
17
|
Object.defineProperty(exports, "Player", { enumerable: true, get: function () { return Player_js_1.Player; } });
|
|
18
|
-
|
|
18
|
+
var Thumbnail_js_1 = require("./Thumbnail.js");
|
|
19
19
|
Object.defineProperty(exports, "Thumbnail", { enumerable: true, get: function () { return Thumbnail_js_1.Thumbnail; } });
|
|
20
20
|
exports.PlayerInternals = {
|
|
21
21
|
PlayerEventEmitterContext: emitter_context_js_1.PlayerEventEmitterContext,
|
|
@@ -123,6 +123,6 @@ const RenderWarningIfBlacklist = () => {
|
|
|
123
123
|
if (!unlicensed) {
|
|
124
124
|
return null;
|
|
125
125
|
}
|
|
126
|
-
return (jsx_runtime_1.jsx("div", { style: style, className: "warning-banner", children: jsx_runtime_1.jsx("a", { style: { color: 'white' }, href: "https://github.com/remotion-dev/remotion/pull/4589", children: "Remotion Unlicensed \u2013 Contact hi@remotion.dev" }) }));
|
|
126
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: style, className: "warning-banner", children: (0, jsx_runtime_1.jsx)("a", { style: { color: 'white' }, href: "https://github.com/remotion-dev/remotion/pull/4589", children: "Remotion Unlicensed \u2013 Contact hi@remotion.dev" }) }));
|
|
127
127
|
};
|
|
128
128
|
exports.RenderWarningIfBlacklist = RenderWarningIfBlacklist;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const playerCssClassname: (override?: string
|
|
1
|
+
export declare const playerCssClassname: (override?: string) => string;
|
|
@@ -110,15 +110,13 @@ const DefaultVolumeSlider = ({ volume, isVertical, onBlur, inputRef, setVolume,
|
|
|
110
110
|
width: ${KNOB_SIZE}px;
|
|
111
111
|
}
|
|
112
112
|
`;
|
|
113
|
-
return (jsx_runtime_1.jsxs("div", { style: sliderContainer, children: [
|
|
114
|
-
jsx_runtime_1.jsx("style", {
|
|
113
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: sliderContainer, children: [(0, jsx_runtime_1.jsx)("style", {
|
|
115
114
|
// eslint-disable-next-line react/no-danger
|
|
116
115
|
dangerouslySetInnerHTML: {
|
|
117
116
|
__html: sliderStyle,
|
|
118
|
-
} }), jsx_runtime_1.jsx("input", { ref: inputRef, "aria-label": "Change volume", className: randomClass, max: 1, min: 0, onBlur: onBlur, onChange: onVolumeChange, step: 0.01, type: "range", value: volume, style: inputStyle })
|
|
119
|
-
] }));
|
|
117
|
+
} }), (0, jsx_runtime_1.jsx)("input", { ref: inputRef, "aria-label": "Change volume", className: randomClass, max: 1, min: 0, onBlur: onBlur, onChange: onVolumeChange, step: 0.01, type: "range", value: volume, style: inputStyle })] }));
|
|
120
118
|
};
|
|
121
119
|
const renderDefaultVolumeSlider = (props) => {
|
|
122
|
-
return jsx_runtime_1.jsx(DefaultVolumeSlider, { ...props });
|
|
120
|
+
return (0, jsx_runtime_1.jsx)(DefaultVolumeSlider, { ...props });
|
|
123
121
|
};
|
|
124
122
|
exports.renderDefaultVolumeSlider = renderDefaultVolumeSlider;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LogLevel } from 'remotion';
|
|
1
2
|
export declare const setGlobalTimeAnchor: ({ audioContext, audioSyncAnchor, absoluteTimeInSeconds, globalPlaybackRate, logLevel, force, }: {
|
|
2
3
|
audioContext: AudioContext;
|
|
3
4
|
audioSyncAnchor: {
|
|
@@ -5,6 +6,6 @@ export declare const setGlobalTimeAnchor: ({ audioContext, audioSyncAnchor, abso
|
|
|
5
6
|
};
|
|
6
7
|
absoluteTimeInSeconds: number;
|
|
7
8
|
globalPlaybackRate: number;
|
|
8
|
-
logLevel:
|
|
9
|
+
logLevel: LogLevel;
|
|
9
10
|
force: boolean;
|
|
10
11
|
}) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useHoverState: (ref:
|
|
1
|
+
export declare const useHoverState: (ref: React.RefObject<HTMLDivElement | null>, hideControlsWhenPointerDoesntMove: boolean | number) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BrowserMediaControlsBehavior } from './browser-mediasession.js';
|
|
2
|
+
import { type UsePlayerMethods } from './use-player-methods.js';
|
|
2
3
|
export declare const usePlayback: ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, outFrame, browserMediaControlsBehavior, getCurrentFrame, muted, }: {
|
|
3
4
|
loop: boolean;
|
|
4
5
|
playbackRate: number;
|
|
@@ -6,6 +7,6 @@ export declare const usePlayback: ({ loop, playbackRate, moveToBeginningWhenEnde
|
|
|
6
7
|
inFrame: number | null;
|
|
7
8
|
outFrame: number | null;
|
|
8
9
|
browserMediaControlsBehavior: BrowserMediaControlsBehavior;
|
|
9
|
-
getCurrentFrame:
|
|
10
|
+
getCurrentFrame: UsePlayerMethods['getCurrentFrame'];
|
|
10
11
|
muted: boolean;
|
|
11
12
|
}) => void;
|
package/dist/cjs/use-playback.js
CHANGED
|
@@ -23,7 +23,11 @@ const shouldForceAnchorChange = (newState) => {
|
|
|
23
23
|
throw new Error(`Unexpected audio context state: ${newState}`);
|
|
24
24
|
};
|
|
25
25
|
const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, outFrame, browserMediaControlsBehavior, getCurrentFrame, muted, }) => {
|
|
26
|
+
var _a, _b, _c;
|
|
26
27
|
const config = remotion_1.Internals.useUnsafeVideoConfig();
|
|
28
|
+
const fps = (_a = config === null || config === void 0 ? void 0 : config.fps) !== null && _a !== void 0 ? _a : null;
|
|
29
|
+
const durationInFrames = (_b = config === null || config === void 0 ? void 0 : config.durationInFrames) !== null && _b !== void 0 ? _b : null;
|
|
30
|
+
const compositionId = (_c = config === null || config === void 0 ? void 0 : config.id) !== null && _c !== void 0 ? _c : null;
|
|
27
31
|
const frame = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
28
32
|
const playing = remotion_1.Internals.usePlaying();
|
|
29
33
|
const { pause, emitter, isPlaying } = (0, use_player_methods_js_1.usePlayerMethods)();
|
|
@@ -37,6 +41,9 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
37
41
|
// In that case, we use setTimeout() instead.
|
|
38
42
|
const isBackgroundedRef = (0, is_backgrounded_js_1.useIsBackgrounded)();
|
|
39
43
|
const lastTimeUpdateTimestamp = (0, react_2.useRef)(0);
|
|
44
|
+
const playbackClockRef = (0, react_2.useRef)(null);
|
|
45
|
+
const previousMutedRef = (0, react_2.useRef)(muted);
|
|
46
|
+
const anchoredAudioContextRef = (0, react_2.useRef)(null);
|
|
40
47
|
(0, browser_mediasession_js_1.useBrowserMediaSession)({
|
|
41
48
|
browserMediaControlsBehavior,
|
|
42
49
|
playbackRate,
|
|
@@ -51,7 +58,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
51
58
|
if (!sharedAudioContext.audioContext) {
|
|
52
59
|
return;
|
|
53
60
|
}
|
|
54
|
-
if (
|
|
61
|
+
if (fps === null) {
|
|
55
62
|
return;
|
|
56
63
|
}
|
|
57
64
|
if (muted) {
|
|
@@ -60,7 +67,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
60
67
|
const changed = (0, set_global_time_anchor_js_1.setGlobalTimeAnchor)({
|
|
61
68
|
audioContext: sharedAudioContext.audioContext,
|
|
62
69
|
audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
|
|
63
|
-
absoluteTimeInSeconds: frame /
|
|
70
|
+
absoluteTimeInSeconds: frame / fps,
|
|
64
71
|
globalPlaybackRate: playbackRate,
|
|
65
72
|
logLevel,
|
|
66
73
|
force: false,
|
|
@@ -68,7 +75,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
68
75
|
if (changed) {
|
|
69
76
|
sharedAudioContext.audioSyncAnchorEmitter.dispatch('changed');
|
|
70
77
|
}
|
|
71
|
-
}, [
|
|
78
|
+
}, [fps, frame, logLevel, playbackRate, sharedAudioContext, muted]);
|
|
72
79
|
// When the audio context is suspended, we use the opportunity to
|
|
73
80
|
// re-anchor the time to be exact.
|
|
74
81
|
(0, react_1.useLayoutEffect)(() => {
|
|
@@ -76,7 +83,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
76
83
|
if (!audioContext) {
|
|
77
84
|
return;
|
|
78
85
|
}
|
|
79
|
-
if (
|
|
86
|
+
if (fps === null) {
|
|
80
87
|
return;
|
|
81
88
|
}
|
|
82
89
|
if (muted) {
|
|
@@ -88,7 +95,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
88
95
|
const changed = (0, set_global_time_anchor_js_1.setGlobalTimeAnchor)({
|
|
89
96
|
audioContext,
|
|
90
97
|
audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
|
|
91
|
-
absoluteTimeInSeconds: getCurrentFrame() /
|
|
98
|
+
absoluteTimeInSeconds: getCurrentFrame() / fps,
|
|
92
99
|
globalPlaybackRate: playbackRate,
|
|
93
100
|
logLevel,
|
|
94
101
|
force: true,
|
|
@@ -102,52 +109,66 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
102
109
|
return () => {
|
|
103
110
|
audioContext === null || audioContext === void 0 ? void 0 : audioContext.removeEventListener('statechange', callback);
|
|
104
111
|
};
|
|
105
|
-
}, [
|
|
106
|
-
config,
|
|
107
|
-
getCurrentFrame,
|
|
108
|
-
logLevel,
|
|
109
|
-
muted,
|
|
110
|
-
playbackRate,
|
|
111
|
-
sharedAudioContext,
|
|
112
|
-
]);
|
|
112
|
+
}, [fps, getCurrentFrame, logLevel, muted, playbackRate, sharedAudioContext]);
|
|
113
113
|
(0, react_2.useEffect)(() => {
|
|
114
114
|
var _a;
|
|
115
115
|
var _b;
|
|
116
|
-
|
|
116
|
+
const wasMuted = previousMutedRef.current;
|
|
117
|
+
previousMutedRef.current = muted;
|
|
118
|
+
if (fps === null || durationInFrames === null || compositionId === null) {
|
|
119
|
+
playbackClockRef.current = null;
|
|
117
120
|
return;
|
|
118
121
|
}
|
|
119
122
|
if (!playing) {
|
|
123
|
+
playbackClockRef.current = null;
|
|
120
124
|
(_a = sharedAudioContext === null || sharedAudioContext === void 0 ? void 0 : sharedAudioContext.suspend) === null || _a === void 0 ? void 0 : _a.call(sharedAudioContext);
|
|
121
125
|
return;
|
|
122
126
|
}
|
|
127
|
+
// Duration and range changes update the endpoint without losing elapsed
|
|
128
|
+
// sub-frame time. A different composition or timebase needs a fresh clock.
|
|
129
|
+
const previousClock = playbackClockRef.current;
|
|
130
|
+
const shouldRestartClock = previousClock === null ||
|
|
131
|
+
previousClock.compositionId !== compositionId ||
|
|
132
|
+
previousClock.fps !== fps ||
|
|
133
|
+
previousClock.playbackRate !== playbackRate;
|
|
134
|
+
const clock = shouldRestartClock
|
|
135
|
+
? {
|
|
136
|
+
compositionId,
|
|
137
|
+
startedTime: performance.now(),
|
|
138
|
+
framesAdvanced: 0,
|
|
139
|
+
fps,
|
|
140
|
+
playbackRate,
|
|
141
|
+
}
|
|
142
|
+
: previousClock;
|
|
143
|
+
playbackClockRef.current = clock;
|
|
123
144
|
if ((sharedAudioContext === null || sharedAudioContext === void 0 ? void 0 : sharedAudioContext._experimentalKeepAudioContextAlive) &&
|
|
124
145
|
sharedAudioContext.audioContext &&
|
|
125
146
|
!muted) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
// anchor and reschedule.
|
|
147
|
+
const didUnmute = wasMuted && !muted;
|
|
148
|
+
const didReplaceAudioContext = anchoredAudioContextRef.current !== sharedAudioContext.audioContext;
|
|
149
|
+
const shouldRescheduleAudio = shouldRestartClock || didUnmute || didReplaceAudioContext;
|
|
150
|
+
// The native clock keeps running through pauses and muted playback.
|
|
151
|
+
// These transitions need an exact anchor, as does a replacement context
|
|
152
|
+
// with its own time origin. Other effect re-runs use the drift tolerance
|
|
153
|
+
// so duration changes do not introduce frame-quantized audio shifts.
|
|
134
154
|
const changed = (0, set_global_time_anchor_js_1.setGlobalTimeAnchor)({
|
|
135
155
|
audioContext: sharedAudioContext.audioContext,
|
|
136
156
|
audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
|
|
137
|
-
absoluteTimeInSeconds: getCurrentFrame() /
|
|
157
|
+
absoluteTimeInSeconds: getCurrentFrame() / fps,
|
|
138
158
|
globalPlaybackRate: playbackRate,
|
|
139
159
|
logLevel,
|
|
140
|
-
force:
|
|
160
|
+
force: shouldRescheduleAudio,
|
|
141
161
|
});
|
|
142
|
-
|
|
162
|
+
anchoredAudioContextRef.current = sharedAudioContext.audioContext;
|
|
163
|
+
// A changed timebase can invalidate queued audio even if the anchor
|
|
164
|
+
// happens to remain numerically equal (for example at frame zero).
|
|
165
|
+
if (changed || shouldRescheduleAudio) {
|
|
143
166
|
sharedAudioContext.audioSyncAnchorEmitter.dispatch('changed');
|
|
144
167
|
}
|
|
145
168
|
}
|
|
146
169
|
let hasBeenStopped = false;
|
|
147
170
|
let audioContextFailed = false;
|
|
148
171
|
let reqAnimFrameCall = null;
|
|
149
|
-
let startedTime = performance.now();
|
|
150
|
-
let framesAdvanced = 0;
|
|
151
172
|
let playbackFrame = getCurrentFrame();
|
|
152
173
|
let lastSeekRevision = (_b = seek === null || seek === void 0 ? void 0 : seek.revision.current) !== null && _b !== void 0 ? _b : null;
|
|
153
174
|
const cancelQueuedFrame = () => {
|
|
@@ -177,8 +198,8 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
177
198
|
if (!muted && !audioContextFailed && !isBuffering()) {
|
|
178
199
|
(_b = sharedAudioContext === null || sharedAudioContext === void 0 ? void 0 : sharedAudioContext.resume) === null || _b === void 0 ? void 0 : _b.call(sharedAudioContext);
|
|
179
200
|
}
|
|
180
|
-
const time = performance.now() - startedTime;
|
|
181
|
-
const actualLastFrame = outFrame !== null && outFrame !== void 0 ? outFrame :
|
|
201
|
+
const time = performance.now() - clock.startedTime;
|
|
202
|
+
const actualLastFrame = outFrame !== null && outFrame !== void 0 ? outFrame : durationInFrames - 1;
|
|
182
203
|
const actualFirstFrame = inFrame !== null && inFrame !== void 0 ? inFrame : 0;
|
|
183
204
|
const seekRevision = (_c = seek === null || seek === void 0 ? void 0 : seek.revision.current) !== null && _c !== void 0 ? _c : null;
|
|
184
205
|
if (seekRevision !== lastSeekRevision) {
|
|
@@ -191,13 +212,13 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
191
212
|
time,
|
|
192
213
|
currentFrame,
|
|
193
214
|
playbackSpeed: playbackRate,
|
|
194
|
-
fps
|
|
215
|
+
fps,
|
|
195
216
|
actualFirstFrame,
|
|
196
217
|
actualLastFrame,
|
|
197
|
-
framesAdvanced,
|
|
218
|
+
framesAdvanced: clock.framesAdvanced,
|
|
198
219
|
shouldLoop: loop,
|
|
199
220
|
});
|
|
200
|
-
framesAdvanced += framesToAdvance;
|
|
221
|
+
clock.framesAdvanced += framesToAdvance;
|
|
201
222
|
// A late callback can skip the endpoint. Hold that exact frame on end.
|
|
202
223
|
const frameToDisplay = hasEnded && !moveToBeginningWhenEnded
|
|
203
224
|
? playbackRate > 0
|
|
@@ -206,7 +227,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
206
227
|
: nextFrame;
|
|
207
228
|
if (frameToDisplay !== currentFrame && !isBuffering()) {
|
|
208
229
|
playbackFrame = frameToDisplay;
|
|
209
|
-
setFrameFromPlayback((c) => ({ ...c, [
|
|
230
|
+
setFrameFromPlayback((c) => ({ ...c, [compositionId]: frameToDisplay }));
|
|
210
231
|
}
|
|
211
232
|
if (hasEnded) {
|
|
212
233
|
stop();
|
|
@@ -235,8 +256,9 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
235
256
|
sharedAudioContext === null || sharedAudioContext === void 0 ? void 0 : sharedAudioContext.suspend();
|
|
236
257
|
setPlayerMuted(true);
|
|
237
258
|
}
|
|
238
|
-
|
|
239
|
-
|
|
259
|
+
// The audio context is being re-established; start a fresh clock.
|
|
260
|
+
clock.startedTime = performance.now();
|
|
261
|
+
clock.framesAdvanced = 0;
|
|
240
262
|
queueNextFrame();
|
|
241
263
|
});
|
|
242
264
|
return;
|
|
@@ -255,8 +277,9 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
255
277
|
(sharedAudioContext === null || sharedAudioContext === void 0 ? void 0 : sharedAudioContext._experimentalKeepAudioContextAlive)) {
|
|
256
278
|
sharedAudioContext.resume();
|
|
257
279
|
}
|
|
258
|
-
|
|
259
|
-
|
|
280
|
+
// Buffered media became reachable; start a fresh clock.
|
|
281
|
+
clock.startedTime = performance.now();
|
|
282
|
+
clock.framesAdvanced = 0;
|
|
260
283
|
queueNextFrame();
|
|
261
284
|
});
|
|
262
285
|
return;
|
|
@@ -265,7 +288,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
265
288
|
reqAnimFrameCall = {
|
|
266
289
|
type: 'timeout',
|
|
267
290
|
// Note: Most likely, this will not be 1000 / fps, but the browser will throttle it to ~1/sec.
|
|
268
|
-
id: setTimeout(callback, 1000 /
|
|
291
|
+
id: setTimeout(callback, 1000 / fps),
|
|
269
292
|
};
|
|
270
293
|
return;
|
|
271
294
|
}
|
|
@@ -287,7 +310,9 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
|
|
|
287
310
|
stop();
|
|
288
311
|
};
|
|
289
312
|
}, [
|
|
290
|
-
|
|
313
|
+
compositionId,
|
|
314
|
+
durationInFrames,
|
|
315
|
+
fps,
|
|
291
316
|
loop,
|
|
292
317
|
pause,
|
|
293
318
|
playing,
|