Skip to content

Commit

Permalink
202407270726
Browse files Browse the repository at this point in the history
  • Loading branch information
Remote committed Jul 26, 2024
1 parent 37b48bc commit 971c01e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
src/** filter=git-crypt diff=git-crypt
sass/** filter=git-crypt diff=git-crypt

# 指定文件的語言,並將 .min.js 文件計入語言統計
*.ts linguist-language=JavaScript
*.js linguist-language=JavaScript
*.min.js linguist-generated=false

# 將目錄下的所有文件與檔案視為第三方代碼,不計入語言統計
static/* linguist-vendored
static/** linguist-vendored
*.html linguist-vendored

# 視文件為文檔類型,忽略語言統計
Expand Down
23 changes: 23 additions & 0 deletions interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* PlayerEvent 介面。
* 定義播放器各種事件的可選回調函數。
*/
interface PlayerEvent {
ready?: () => void; // 當播放器準備好時觸發
playing?: () => void; // 當影片開始播放時觸發
pause?: () => void; // 當影片暫停時觸發
end?: () => void; // 當影片播放結束時觸發
}

/**
* PlayerConfig 介面。
* 定義初始化播放器時所使用的配置物件的結構。
*/
interface PlayerConfig {
videoId?: string; // 可選:YouTube 影片 ID 或其他影片來源
src?: string; // 可選:影片的來源 URL
volume?: number; // 可選:預設音量 (0-100)
mute?: boolean; // 可選:預設靜音狀態
panel?: string[]; // 可選:控制面板元素的陣列 [play, timebar, time, mute, volume, rate, full]
event?: PlayerEvent; // 可選:播放器事件的處理程序
}

0 comments on commit 971c01e

Please sign in to comment.