* For video layers, if parent `clip.duration` is specified, the video will be slowed/sped-up to match `clip.duration`. * If `cutFrom`/`cutTo` is set, the resulting segment (`cutTo`-`cutFrom`) will be slowed/sped-up to fit `clip.duration`. * If the layer has audio, it will be kept (and mixed with
| 287 | * If the layer has audio, it will be kept (and mixed with other audio layers if present). |
| 288 | */ |
| 289 | interface VideoLayer extends BaseLayer { |
| 290 | |
| 291 | /** |
| 292 | * Layer type. |
| 293 | */ |
| 294 | type: 'video'; |
| 295 | |
| 296 | /** |
| 297 | * Path to video file. |
| 298 | */ |
| 299 | path: string; |
| 300 | |
| 301 | /** |
| 302 | * How to fit video to screen. |
| 303 | * |
| 304 | * @default 'contain-blur' |
| 305 | * @see [Resize modes]{@link https://github.com/mifi/editly#resize-modes} |
| 306 | */ |
| 307 | resizeMode?: ResizeMode; |
| 308 | |
| 309 | /** |
| 310 | * Time value to cut from (in seconds). |
| 311 | * |
| 312 | * @default 0 |
| 313 | */ |
| 314 | cutFrom?: number; |
| 315 | |
| 316 | /** |
| 317 | * Time value to cut to (in seconds). |
| 318 | * Defaults to *end of video*. |
| 319 | */ |
| 320 | cutTo?: number; |
| 321 | |
| 322 | /** |
| 323 | * Width relative to screen width. |
| 324 | * Must be between 0 and 1. |
| 325 | * |
| 326 | * @default 1 |
| 327 | */ |
| 328 | width?: number; |
| 329 | |
| 330 | /** |
| 331 | * Height relative to screen height. |
| 332 | * Must be between 0 and 1. |
| 333 | * |
| 334 | * @default 1 |
| 335 | */ |
| 336 | height?: number; |
| 337 | |
| 338 | /** |
| 339 | * X-position relative to screen width. |
| 340 | * Must be between 0 and 1. |
| 341 | * |
| 342 | * @default 0 |
| 343 | */ |
| 344 | left?: number; |
| 345 | |
| 346 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected