(以下內容均翻譯自英文版文件,最新資訊及內容敬請切換至英文語系參考原文)
要接收播放事件,可通過附加 logEvent
處理程序來整合 SDK 中的 PlaybackEvent 回調函式:
val player = UniPlayer.Builder(
... ,
PlayerConfig(
playLogger = object : PlayLogger {
override fun logEvent(eventName: String, properties: Map<string, any="Any">) {
// do something
}
},
...
)
)
事件名稱 |
事件定義 | 屬性名稱 | 值類型 |
play |
如果調用了播放 api,將發送事件 在 Seebar 上的位置,以秒為單位。 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
pause | 如果調用了播放 API,將發送事件 在 Seebar 上的位置。以秒為單位。 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
seek | 如果調用了播放 API,將發送事件 在 Seebar 上的位置。以秒為單位。 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
rewind | 如果調用了播放 API,將發送事件 在 Seebar 上的位置。以秒為單位。 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
forward | 如果調用了播放 API,將發送事件 在 Seebar 上的位置。以秒為單位。 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
playback_began_player_loading | 播放器開始加載影片的時間。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
playback_began_player_ startup_time |
播放器開始加載清單的時間 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
playback_began_video_ startup_time |
顯示第一幀的時間。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
playback_video_began | 影片緩衝結束的時間 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
playback_video_paused | 播放暫停的時間 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
playback_video_buffering_ began |
播放過程中緩衝狀態開始的時間。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
playback_video_buffering_ ended |
播放過程中緩衝狀態結束的時間。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
playback_video_ended | 播放結束的時間 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
playback_seeking_began | 播放過程中跳轉的開始時間。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
playback_seeking_ended | 播放過程中的跳轉結束時間。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
playback_error_occurred | 播放器的錯誤代碼。每個平台應該有不同的錯誤代碼。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
current_position | float | ||
errorcode | string | ||
playback_streaming_quality_ change_render |
之前 profile 的緩衝片段已全部播放完畢,開始播放切換後的 profile | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
bitrate (kbps) | int | ||
width | int | ||
height | int | ||
quality_setting_change | 使用者切換 profile | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
quality_name | string | ||
min_height | int | ||
max_height | int | ||
min_width | int | ||
max_width | int | ||
max_bitrate | int | ||
min_bitrate | int | ||
max_framerate | float | ||
min_framerate | float | ||
speed_setting_change | 使用者更改速度 0.5x, 1x, 2x, 4x... | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
playback_speed | float | ||
current_position | float | ||
playback_speed_change | 播放過程中速度發生變化: 0.5x、1x、2x、4x... |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
playback_speed | float | ||
current_position | float | ||
audio_track_setting_change | 使用者觸發音軌切換動作。 音軌語言,由 ISO 639-1、ISO 3166(可選)定義 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
lang | string | ||
playback_audio_track_change | 播放過程中音軌更改的時間。 音軌語言由 ISO 639-1、ISO 3166(可選)定義 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
lang | string | ||
subtitle_setting_change | 使用者觸發更改字幕的操作。 字幕語言由 ISO 639-1、ISO 3166(可選)定義 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
lang | string | ||
playback_subtitle_change | 播放過程中字幕更改的時間。 字幕語言由 ISO 639-1、ISO 3166(可選)定義 |
player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
lang | string | ||
audio_volume_setting_change | 使用者觸發音量調整。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
volume | float | ||
playback_audio_volume_ change |
播放過程中調整音量。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
volume | float | ||
audio_mute_setting_change | 使用者觸發靜音/非靜音開關。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
muted | bool | ||
playback_audio_mute_change | 播放過程中切換靜音/非靜音狀態。 | player_name | string |
playback_module_version | string | ||
system_time | date time | ||
user_id | string | ||
muted | bool |