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
**Very experimental**: This component is in a very early stage and **slower** than OffthreadVideo.
8
+
**Very experimental**: This component is in a very early stage and does not support some basic features such as volume or playback rate or CSS styling.
9
9
The current focus is on correctness, not on performance.
10
10
11
11
We recommend that you use [`<OffthreadVideo/>`](/docs/offthreadvideo) for now.
Removes a portion of the video at the end (right side). See [`trimBefore`](/docs/video#trimbefore) for an explanation.
82
82
83
83
### `volume?`
84
84
85
-
Allows you to control the volume for the whole track or change it on a per-frame basis. Refer to the [using audio](/docs/audio/volume) guide to learn how to use it.
85
+
**Currently not supported!**
86
86
87
-
```tsx twoslash title="Example using static volume"
Controls the `frame` which is returned when using the [`volume`](#volume) callback function and wrapping `OffthreadVideo` in a [`<Loop>`](/docs/loop).
121
-
122
-
Can be either `"repeat"` (default, start from 0 on each iteration) or `"extend"` (keep increasing frames).
123
-
124
-
### `style?`
125
-
126
-
You can pass any style you can pass to a native HTML element. Keep in mind that during rendering, `<NewVideo>` renders a `canvas` tag, but a `<video>` tag is used during preview.
A name and that will be shown as the label of the sequence in the timeline of the Remotion Studio. This property is purely for helping you keep track of items in the timeline.
144
94
145
-
### `toneFrequency?`<AvailableFromv="4.0.47"/>
146
-
147
-
Adjust the pitch of the audio - will only be applied during rendering.
148
-
149
-
Accepts a number between `0.01` and `2`, where `1` represents the original pitch. Values less than `1` will decrease the pitch, while values greater than `1` will increase it.
150
-
151
-
A `toneFrequency` of 0.5 would lower the pitch by half, and a `toneFrequency` of `1.5` would increase the pitch by 50%.
152
-
153
95
### `onError?`
154
96
155
-
Handle an error playing the video. From v3.3.89, if you pass an `onError` callback, then no exception will be thrown. Previously, the error could not be caught.
156
-
157
-
### `playbackRate?`<AvailableFromv="2.2.0" />
158
-
159
-
Controls the speed of the video. `1` is the default and means regular speed, `0.5` slows down the video so it's twice as long and `2` speeds up the video so it's twice as fast.
97
+
**Currently not supported!**
160
98
161
-
While Remotion doesn't limit the range of possible playback speeds, in development mode the [`HTMLMediaElement.playbackRate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate) API is used which throws errors on extreme values. At the time of writing, Google Chrome throws an exception if the playback rate is below `0.0625` or above `16`.
162
-
163
-
```tsx twoslash title="Example of a video playing twice as fast"
In the [Studio](/docs/terminology/studio) or in the [Remotion Player](/docs/player), Remotion will seek the video if it gets too much out of sync with Remotion's internal time - be it due to the video loading or the page being too slow to keep up in real-time. By default, a seek is triggered if `0.45` seconds of time shift is encountered. Using this prop, you can customize the threshold.
201
-
202
-
### `toneFrequency?`<AvailableFromv="4.0.47"/>
120
+
### `acceptableTimeShiftInSeconds?`
203
121
204
-
Adjust the pitch of the audio - will only be applied during rendering.
205
-
206
-
Accepts a number between `0.01` and `2`, where `1` represents the original pitch. Values less than `1` will decrease the pitch, while values greater than `1` will increase it.
207
-
208
-
A `toneFrequency` of 0.5 would lower the pitch by half, and a `toneFrequency` of `1.5` would increase the pitch by 50%.
If set to `true` and the video is loading, the Player will enter into the [native buffering state](/docs/player/buffer-state). The default is `false`, but will become `true` in Remotion 5.0.
240
127
241
-
### `showInTimeline?`<AvailableFromv="4.0.122"/>
128
+
### `showInTimeline?`
242
129
243
130
If set to `false`, no layer will be shown in the timeline of the Remotion Studio. The default is `true`.
A callback function that gets called when the video fails to play due to autoplay restrictions.
256
-
If you don't pass a callback, the video will be muted and be retried once.
257
-
This prop is useful if you want to handle the error yourself, e.g. for pausing the Player.
258
-
Read more here about [autoplay restrictions](/docs/player/autoplay).
142
+
**Pending removal**: Future iterations will also have client-side playback and not support this prop which was designed for the `<video>` tag.
259
143
260
-
### `onVideoFrame?`<AvailableFromv="4.0.190" />
144
+
### `onVideoFrame?`
261
145
262
146
A callback function that gets called when a frame is extracted from the video.
263
147
Useful for [video manipulation](/docs/video-manipulation).
264
-
The callback is called with a [`CanvasImageSource`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasImageSource) object.
265
-
During preview, this is a `HTMLVideoElement` object, during rendering, it is an `HTMLImageElement`.
148
+
The callback is called with a [`CanvasImageSource`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasImageSource) object, more specifically, either an `ImageBitmap` or a `VideoFrame`.
266
149
267
150
### `crossOrigin?`<AvailableFromv="4.0.190" />
268
151
269
-
Corresponds to the [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin) attribute of the `<video>` element.
270
-
One of `"anonymous"`, `"use-credentials"` or `undefined`.
271
-
Default: `"anonymous"` if `onVideoFrame` is specified, `undefined`, otherwise.
152
+
**Pending removal**: Future iterations will also have client-side playback and not support this prop which was designed for the `<video>` tag.
272
153
273
154
### `useWebAudioApi?`<AvailableFromv="4.0.306" />
274
155
275
-
Enable the [Web Audio API](/docs/audio/volume#limitations)for the video tag.
156
+
**Pending removal**: Future iterations will also have client-side playback and not support this prop which was designed for the `<video>` tag.
276
157
277
158
## See also
278
159
279
-
-[Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/video/src/video.tsx)
160
+
-[Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/video/src/new-video.tsx)
0 commit comments