UIVideoImage 
继承自:
描述 
视频图像组件。用于在UI中播放视频内容,支持MP4等视频格式
属性 
| string  FileName | 
|---|
| 视频文件路径设置 | 
| int  Loop | 
|---|
| 循环播放次数设置。设置为大于1的值时会循环播放指定次数,否则不循环播放。默认值为99 | 
| bool  Play | 
|---|
| 视频播放控制。设置为true开始播放,false停止播放,默认值为false | 
代码示例 
lua
-- 创建视频图像组件
local root = SandboxNode.new('UIRoot', game.Workspace)
local videoPlayer = SandboxNode.new('UIVideoImage', root)
videoPlayer.Name = "VideoPlayer"
videoPlayer.Size = Vector2.new(1280, 720)
videoPlayer.Position = Vector2.new(640, 360)
videoPlayer.LayoutHRelation = Enum.LayoutHRelation.Middle
videoPlayer.LayoutVRelation = Enum.LayoutVRelation.Middle
videoPlayer.LayoutSizeRelation = Enum.LayoutSizeRelation.Both
-- 设置视频文件路径
videoPlayer.FileName = "sandboxId://video/login.mp4" -- 此路径仅为示例,使用时需要写本地资源路径
-- 设置循环播放次数
videoPlayer.Loop = 1
-- 开始播放视频
videoPlayer.Play = true