エンジンクラス
VideoFrame
*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。
概要
プロパティ
Video:ContentId |
イベント
DidLoop(video: string):RBXScriptSignal |
Ended(video: string):RBXScriptSignal |
Loaded(video: string):RBXScriptSignal |
Paused(video: string):RBXScriptSignal |
Played(video: string):RBXScriptSignal |
コードサンプル
ビデオの作成と再生
local screenPart = Instance.new("Part")
screenPart.Parent = workspace
local surfaceGui = Instance.new("SurfaceGui")
surfaceGui.Parent = screenPart
local videoFrame = Instance.new("VideoFrame")
videoFrame.Parent = surfaceGui
videoFrame.Looped = true
videoFrame.Video = "rbxassetid://" -- ここにアセットIDを追加
while not videoFrame.IsLoaded do
task.wait()
end
videoFrame:Play()APIリファレンス
プロパティ
Video
VideoFrame.Video:ContentId
コードサンプル
ビデオの作成と再生
local screenPart = Instance.new("Part")
screenPart.Parent = workspace
local surfaceGui = Instance.new("SurfaceGui")
surfaceGui.Parent = screenPart
local videoFrame = Instance.new("VideoFrame")
videoFrame.Parent = surfaceGui
videoFrame.Looped = true
videoFrame.Video = "rbxassetid://" -- ここにアセットIDを追加
while not videoFrame.IsLoaded do
task.wait()
end
videoFrame:Play()方法
Pause
VideoFrame:Pause():()
戻り値
()
Play
VideoFrame:Play():()
戻り値
()
コードサンプル
ビデオの作成と再生
local screenPart = Instance.new("Part")
screenPart.Parent = workspace
local surfaceGui = Instance.new("SurfaceGui")
surfaceGui.Parent = screenPart
local videoFrame = Instance.new("VideoFrame")
videoFrame.Parent = surfaceGui
videoFrame.Looped = true
videoFrame.Video = "rbxassetid://" -- ここにアセットIDを追加
while not videoFrame.IsLoaded do
task.wait()
end
videoFrame:Play()イベント