GetDuration#
- ExportWebVideoPlayer.GetDuration()#
動画の長さを取得します。
IsAvailable()がfalseまたはGetStatus()がBeforeLoadの場合は0を返します。 また、GetIsLiveVideo()がtrueの場合にも0を返します。- Returns:
動画の長さ
- Return type:
number
Example#
-- Webビデオプレイヤーの再生中の動画の長さを取得する
local webVideoPlayer = vci.vc.room.webVideoPlayer
if webVideoPlayer.IsAvailable() then
-- 再生中の動画の長さを取得する
if webVideoPlayer.GetStatus() == ExportWebVideoPlayerStatus.Playing then
print(webVideoPlayer.GetDuration())
end
end