sample
Browse files
App/Generate/database/Model.py
CHANGED
|
@@ -132,6 +132,7 @@ class Project(orm.Model):
|
|
| 132 |
"loop": "true",
|
| 133 |
"startFrom": 1 * 30,
|
| 134 |
"endAt": 3 * 30,
|
|
|
|
| 135 |
"style": {
|
| 136 |
"transform": "translate(-50%, -50%)",
|
| 137 |
"position": "absolute",
|
|
|
|
| 132 |
"loop": "true",
|
| 133 |
"startFrom": 1 * 30,
|
| 134 |
"endAt": 3 * 30,
|
| 135 |
+
"playbackRate": 0.75,
|
| 136 |
"style": {
|
| 137 |
"transform": "translate(-50%, -50%)",
|
| 138 |
"position": "absolute",
|
Remotion-app/src/HelloWorld/VideoStream.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import {Series} from 'remotion';
|
| 2 |
import React from 'react';
|
| 3 |
import {Video, staticFile, useVideoConfig} from 'remotion';
|
| 4 |
import videoSequences from './Assets/VideoSequences.json';
|
|
@@ -30,16 +30,25 @@ const VideoStream = React.memo(() => {
|
|
| 30 |
|
| 31 |
const VideoX = React.memo(({entry}) => {
|
| 32 |
const {fps} = useVideoConfig();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
return (
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
);
|
| 44 |
});
|
| 45 |
|
|
|
|
| 1 |
+
import {Loop, Series} from 'remotion';
|
| 2 |
import React from 'react';
|
| 3 |
import {Video, staticFile, useVideoConfig} from 'remotion';
|
| 4 |
import videoSequences from './Assets/VideoSequences.json';
|
|
|
|
| 30 |
|
| 31 |
const VideoX = React.memo(({entry}) => {
|
| 32 |
const {fps} = useVideoConfig();
|
| 33 |
+
const videoProps = {
|
| 34 |
+
pauseWhenBuffering: true,
|
| 35 |
+
startFrom: (fps * entry.props.startFrom) / 30,
|
| 36 |
+
endAt: (fps * entry.props.endAt) / 30,
|
| 37 |
+
volume: (fps * entry.props.volume) / 30,
|
| 38 |
+
src: staticFile(entry.name),
|
| 39 |
+
style: entry?.style,
|
| 40 |
+
};
|
| 41 |
+
|
| 42 |
return (
|
| 43 |
+
<>
|
| 44 |
+
{entry?.loop ? (
|
| 45 |
+
<Loop>
|
| 46 |
+
<Video {...videoProps} />
|
| 47 |
+
</Loop>
|
| 48 |
+
) : (
|
| 49 |
+
<Video {...videoProps} />
|
| 50 |
+
)}
|
| 51 |
+
</>
|
| 52 |
);
|
| 53 |
});
|
| 54 |
|