跳至主要內容
Video

影片元件

BRICKS TOOLS avatar
作者:BRICKS TOOLS
Updated over a week ago
  • Video 影片元件介紹

影片元件用於承載影片,提供使用者在顯示裝置上呈現影片內容

影片元件在畫布上的各種呈現樣貌


  • Frame 區塊

Frame 基本屬性和 Rect 方塊元件相同,詳細可參考方塊元件 Frame 區塊解說

  • Properties 區塊

文字輸入框元件的 Properties 基本屬性繼承方塊元件,詳細可參考方塊元件 Properties 區塊解說

其他屬性解說如下:

Property Name

屬性名稱

Property Type

屬性形態

Description

說明

Path

One Of

  • String

  • Object

  • Array of


清單

  • 字串

  • 物件

  • 陣列

The video path list or the single video file path (URL or video file from Media Box).


設定影片的連結路徑,可選擇使用在 Media Box 中上傳的影片檔。

  • 字串:直接填寫影片連結或選擇Media Box 影片

  • 物件:可使用 Property Bank 新增Object 變數,並在變數 Value 下新增 url 的字串格式,將影片連結填寫其中

  • 陣列:可使用Property Bank 新增 array of string 或 array of object 來包含多組影片字串連結或物件連結。

MD5

String


字串 (128位元的散列值)

The checksum of the file.


自動生成的雜湊值,用於確保檔案在傳輸中的一致性及正確性。

Resize mode

One Of


清單

The resize methods that will be applied when the image's dimensions differ from the image brick's (the container's) dimensions.

  • contain

  • cover

  • stretch


設定影片在影片元件中的呈現模式,一共有以下3種模式可選擇

  • contain: 在保持影片寬高比的前提下縮放圖片,直到寬度和高度都小於等於容器視影片的尺寸。影片完全被包裹在影片元件中,影片元件中可能留有空白

  • cover: 在保持影片寬高比的前提下縮放影片,直到寬度和高度都大於等於容器視影片的尺寸。影片完全覆蓋甚至超出影片元件,影片元件中不留任何空白。

  • stretch: 拉伸影片且不維持寬高比,直到寬高都剛好填滿影片元件。

Repeat

Boolean


布林值 Yes 或 No

To set whether the video/ video list will be played on repeat.


設定影片是否重覆播放

Replay On Error

Boolean


布林值 Yes 或 No

To set whether to replay the video when errors occurred.


設定當錯誤發生時是否要重新播放

Replay Timeout

ms


毫秒

(When repeat is set to Yes and ReplayOnError is set to Yes)

The replay timeout is the wait time before the video/ video list is being replayed.


設定如果影片結束或發生錯誤且 Repeat 為 Yes 或 ReplayOnError 為 Yes時,需要等待的重播時間

  • Properties - Border 區塊

基本邊框屬性和 Rect 方塊元件相同,詳細可參考方塊元件 Border 區塊解說


  • Animations 區塊

基本動畫事件屬性和 Rect 方塊元件相同,詳細可參考方塊元件 Animation 區塊解說

其他動畫事件屬性解說如下:

Next Video

Animation that will be triggered when the next video is about to be played.


當準備播放下一個 Video 時觸發的動畫事件

Round End

Animation that will be triggered when all videos on the list are done playing.


當指定 path 中的清單完全播放完畢時觸發的動畫事件

On Load

Animation that will be triggered when the video is loaded.


當影片讀取完成觸發的動畫事件

On Error

Animation that will be triggered when the video is not successfully loaded.


當影片讀取錯誤時觸發的動畫事件


  • Events

基本事件屬性和 Rect 方塊元件相同,詳細可參考方塊元件 Event 區塊解說

其他事件屬性解說如下:

Next Video

Event that will be triggered when the next video is about to be played.


當準備播放下一個 Video 時觸發的事件

Round End

Event that will be triggered when all videos on the list are done playing.


當指定 path 中的清單完全播放完畢時觸發的事件

On Load

Event that will be triggered when the video is loaded.


當影片讀取完成觸發的事件

On Error

Event that will be triggered when the video is not successfully loaded.


當影片讀取錯誤時觸發的事件

是否回答了您的問題?