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: docs/docs/video.md
+82-91
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,17 @@ slug: /video
7
7
8
8
React Native Skia provides a way to load video frames as images, enabling rich multimedia experiences within your applications. A video frame can be used anywhere a Skia image is accepted: `Image`, `ImageShader`, and `Atlas`.
9
9
10
-
## Requirements
10
+
###Requirements
11
11
12
12
-**Reanimated** version 3 or higher.
13
13
-**Android:** API level 26 or higher.
14
-
-**Video URL:** Must be a local path. We recommend using it in combination with [expo-asset](https://docs.expo.dev/versions/latest/sdk/asset/) to download the video.
15
14
16
15
## Example
17
16
18
17
Here is an example of how to use the video support in React Native Skia. This example demonstrates how to load and display video frames within a canvas, applying a color matrix for visual effects. Tapping the screen will pause and play the video.
19
18
19
+
The video can be a remote (`http://...`) or local URL (`file://`), as well as a [video from the bundle](#using-assets).
You can seek a video via the `seek` playback option. By default, the seek option is null. If you set a value in milliseconds, it will seek to that point in the video and then set the option value to null again.
149
-
150
-
`looping` indicates whether the video should be looped or not.
151
-
152
-
`playbackSpeed` indicates the playback speed of the video (default is 1).
153
-
154
-
In the example below, every time we tap on the video, we set the video to 2 seconds.
172
+
Below is an example where we use [expo-asset](https://docs.expo.dev/versions/latest/sdk/asset/) to load a video file from the bundle.
To encode videos from Skia images, you can use ffmpeg or also look into [react-native-skia-video](https://github.com/AzzappApp/react-native-skia-video).
0 commit comments