轉場在兩個連續的視頻或圖像元素之間創造平滑的視覺效果。
preNodeId)與另一個元素的開始(postNodeId)來運作start 時間應與重疊期間對齊轉場的最大持續時間由以下公式確定:
maxDuration = min(
availableEndTime_of_preNode,
availableStartTime_of_postNode
)如果您設置的持續時間超過此值,轉場可能無法正確呈現。
| 屬性 | 類型 | 必要 | 範例 | 值範圍 | 描述 |
|---|---|---|---|---|---|
| preNodeId | string | true | - | - | 轉場開始的前一元素的唯一標識符。 |
| postNodeId | string | true | - | - | 轉場結束的後一元素的唯一標識符。 |
| transitionType | string | true | - | directionalwarp, directionalwipe, Bounce, BowTieHorizontal, BowTieVertical, ButterflyWaveScrawler, CircleCrop, ColourDistance, CrazyParametricFun, Directional, DoomScreenTransition, Dreamy, DreamyZoom, GridFlip, InvertedPageCurl, LinearBlur, Mosaic, PolkaDotsCurtain, Radial, SimpleZoom, StereoViewer, Swirl, WaterDrop, ZoomInCircles, angular, burn, cannabisleaf, circle, colorphase, crosshatch, crosswarp, cube, displacement, doorway, fade, fadecolor, fadegrayscale, flyeye, heart, hexagonalize, kaleidoscope, luma, luminance_melt, morph, multiply_blend, pinwheel, pixelize, polar_function, ripple, rotate_scale_fade, squareswire, squeeze, swap, undulatingBurnOut, wind, windowblinds, windowslice, wipeDown, wipeLeft, wipeRight, wipeUp | 應用的轉場效果類型。名稱區分大小寫。 |
重要說明:
preNodeId和postNodeId必須引用view陣列中現有的元素- 區分大小寫:轉場類型名稱區分大小寫。使用上述列出的確切名稱
- 命名約定:一些轉場使用 PascalCase(例如,
Bounce,CircleCrop),其他則使用小寫(例如,fade,wipeLeft)。使用顯示的確切名稱- 持續時間限制:確保轉場持續時間不超過元素之間的重疊時間
- 轉場元素本身不需要
trackIndex- 它從引用的元素中獲取時間
示例用例:
fade轉場提供經典的交叉溶解效果,適用於兩個視頻wipeLeft創造從右到左的滑動擦拭效果Bounce在轉場期間增添了俏皮的彈跳效果- 自定義轉場如
directionalwarp創造扭曲效果
兩個視頻有 2 秒的轉場重疊:
{
"view": [
{
"id": "435862f1-2358-464d-b379-26f4b63b12e3",
"type": "Video",
"start": 0,
"duration": 10.218542,
"trackIndex": 0,
"externalUrl": "https://example.com/video1.mp4",
"ext": "mp4"
},
{
"id": "2b82ffe3-7c6e-4d28-9c11-9e3de94c5a49",
"type": "Video",
"start": 8.218542,
"duration": 15,
"trackIndex": 0,
"externalUrl": "https://example.com/video2.mp4",
"ext": "mp4"
}
],
"transition": [
{
"id": "52b20852-e260-41aa-afab-70c22e20f62b",
"type": "Transition",
"start": 8.218542,
"duration": 2,
"preNodeId": "435862f1-2358-464d-b379-26f4b63b12e3",
"postNodeId": "2b82ffe3-7c6e-4d28-9c11-9e3de94c5a49",
"transitionType": "directionalwarp"
}
]
}