You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/docs/player/api.md
+32-44
Original file line number
Diff line number
Diff line change
@@ -114,9 +114,9 @@ _optional_
114
114
115
115
A boolean property defining whether you can play or pause a video using space key. If enabled, playing the video and subsequently pressing the space key pauses and resumes the video. Only works if `controls` is true. Default `true`.
A boolean property defining whether the video position should go back to zero once the video has ended. Only works if `loop` is disabled. Default `true`.
122
122
@@ -132,21 +132,21 @@ _optional_
132
132
133
133
A regular `style` prop for a HTMLDivElement. You can pass a different height and width if you would like different dimensions for the player than the original composition dimensions.
134
134
135
-
### `className`
135
+
### `className` <AvailableFromv="3.1.3" />
136
136
137
-
_optional - available since v3.1.3_
137
+
_optional_
138
138
139
139
A HTML class name to be applied to the container.
140
140
141
-
### `initialFrame`
141
+
### `initialFrame` <AvailableFromv="3.1.14" />
142
142
143
-
_optional - available since v3.1.14_
143
+
_optional_
144
144
145
145
Start the playback from a specific frame. Default `0`. Once the player is mounted, this property cannot be changed.
If you use an [`<Audio />`](/docs/audio) tag, it might not play in some browsers (specifically iOS Safari) due to browser autoplay policies. This is why the Remotion Player pre-mounts a set of audio tags with silent audio that get played upon user interaction. These audio tags can then be used to play real audio later and will not be subject to the autoplay policy of the browser.
Render the poster when the video is in its initial state and has not been played yet. Requires [`renderPoster()`](#renderposter) to be set. Default: `false`.
Render the poster when the video is paused. Although considered a paused state, the poster will not render while the user is scrubbing through the video. Requires [`renderPoster()`](#renderposter) to be set. Default: `false`.
Render the poster when the video has ended. Requires [`moveToBeginning`](#movetobeginningwhenended) to be set to `false`. [`renderPoster()`](#renderposter) to be set. Default: `false`.
279
279
280
-
### `inFrame`
280
+
### `inFrame` <AvailableFromv="3.2.15" />
281
281
282
-
_optional, available from v3.2.15_
282
+
_optional_
283
283
284
284
Limit playback to only play after a certain frame. The video will start from this frame and move to this position once it has ended. Must be an integer, not smaller than `0`, not bigger than [`outFrame`](#outframe) and not bigger than `durationInFrames - 1`. Default `null`, which means the beginning of the video.
285
285
286
-
### `outFrame`
286
+
### `outFrame` <AvailableFromv="3.2.15" />
287
287
288
-
_optional, available from v3.2.15_
288
+
_optional_
289
289
290
290
Limit playback to only play before a certain frame. The video will end at this frame and move to the beginning once it has ended. Must be an integer, not smaller than `1`, not smaller than [`inFrame`](#inframe) and not bigger than `durationInFrames - 1`. Default `null`, which means the end of the video.
If true, the controls flash when the player enters the scene. After 2 seconds without hover, the controls fade out. This is similar to how YouTube does it, and signals to the user that the player is in fact controllable. You can also pass a `number`, with which you can customize the duration in milliseconds. Default `true` since `v3.2.24`, before that unsupported.
Allows you to customise the fullscreen button of the player controls, must return a valid React element. If fullscreen is disabled or not available in a browser, it will not be rendered.
342
342
@@ -418,9 +418,7 @@ The following methods are available on the player ref:
418
418
419
419
Pause the video. Nothing happens if the video is already paused.
If the video is playing, pause it and return to the playback position where the video has last been played.
426
424
@@ -442,15 +440,11 @@ Gets the current position expressed as the current frame. Divide by the `fps` yo
442
440
443
441
[Special considerations must be made](https://www.remotion.dev/docs/player/current-time) if you want to display a component that synchronizes with the time of the player.
444
442
445
-
### `isPlaying()`
446
-
447
-
_Available from v2.5.7_
443
+
### `isPlaying()` <AvailableFromv="2.5.7" />
448
444
449
445
Returns a boolean indicating whether the video is playing.
Gets the container `HTMLDivElement` of the player. Useful if you'd like to manually attach listeners to the player element.
456
450
@@ -526,9 +520,7 @@ Requests the video to go to fullscreen. This method throws if the `allowFullscre
526
520
527
521
Exit fullscreen mode.
528
522
529
-
### `getScale()`
530
-
531
-
_available since v3.2.24_
523
+
### `getScale()` <AvailableFromv="3.2.24" />
532
524
533
525
Returns a number which says how much the content is scaled down compared to the natural composition size. For example, if the composition is `1920x1080`, but the player is 960px in width, this method would return `0.5`.
534
526
@@ -643,9 +635,7 @@ Prefer the [`seeked`](#seeked) event if you only want to get time updates during
643
635
644
636
Prefer the [`frameupdate`](#frameupdate) event if you need an update for every single frame.
645
637
646
-
### `frameupdate`
647
-
648
-
_Available from v3.2.27_
638
+
### `frameupdate` <AvailableFromv="3.2.27" />
649
639
650
640
Fires whenever the current time has changed, during both playback and seeking.
651
641
@@ -666,9 +656,7 @@ Prefer the [`seeked`](#seeked) event if you only want to get time updates during
666
656
667
657
Prefer the [`timeupdate`](#timeupdate) event if you only need periodical updates (at most every 250ms).
668
658
669
-
### `fullscreenchange`
670
-
671
-
_Available from v3.2.0_
659
+
### `fullscreenchange` <AvailableFromv="3.2.0" />
672
660
673
661
Fires when the player enters or exits fullscreen. By reading `e.detail.isFullscreen` or calling `playerRef.isFullscreen()` you can determine if the player is currently in fullscreen or not.
0 commit comments