Breakroom is now Sinewave Campus. Book a meeting

SVideos

客户端网络
在此类中GetInventoryVideos
  1. 函数
  2. GetInventoryVideos
  3. OpenUploadFileBrowser
  4. OnUploadEnd
  5. OnUploadStart
成员 4
函数GetInventoryVideos–
函数OpenUploadFileBrowserOpens a window that let's you select a file you wish to upload. (white-label)
函数OnUploadEndBinds the function c to be called when an upload operation ends.
函数OnUploadStartBinds the function c to be called when an upload operation begins.

函数​

GetInventoryVideos​

Table GetInventoryVideos()

返回值

Table

示例

Lua
tableInventoryVideos = Space.Videos.GetInventoryVideos()

OpenUploadFileBrowser​

void OpenUploadFileBrowser()

Opens a window that let's you select a file you wish to upload. (white-label)

返回值

void

示例

Lua
Space.Videos.OpenUploadFileBrowser()
Lua
--this script will open a video upload window when clicked
thisObject = Space.Host.ExecutingObject

function OnClickFunction()
Space.Videos.OpenUploadFileBrowser()
end


thisObject.AddClickable()
thisObject.Clickable.Tooltip = "Click me to upload video"
thisObject.Clickable.OnClick(OnClickFunction)

OnUploadEnd​

void OnUploadEnd(Closure c)

Binds the function c to be called when an upload operation ends.

参数

名称类型默认值
cClosure–

返回值

void

示例

Lua
function OnUploadEndFunction()
--
end
Space.Videos.OnUploadEnd(OnUploadEndFunction)
Lua
--this script will show a text on screen that says "Uploading..." when a video upload is initiated
--and will hide it when the upload has ended
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("textObject") --add a UIText object to References in Scripting Runtime
textObject.UIText.Text = "Uploading..."

function OnUploadStartFunction()
textObject.Active = true
end

function OnUploadEndFunction()
textObject.Active = false
end

Space.Videos.OnUploadStart(OnUploadStartFunction)
Space.Videos.OnUploadEnd(OnUploadEndFunction)

OnUploadStart​

void OnUploadStart(Closure c)

Binds the function c to be called when an upload operation begins.

参数

名称类型默认值
cClosure–

返回值

void

示例

Lua
function OnUploadStartFunction()
--
end
Space.Videos.OnUploadStart(OnUploadStartFunction)
Lua
--this script will show a text on screen that says "Uploading..." when a video upload is initiated
--and will hide it when the upload has ended
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("textObject") --add a UIText object to References in Scripting Runtime
textObject.UIText.Text = "Uploading..."

function OnUploadStartFunction()
textObject.Active = true
end

function OnUploadEndFunction()
textObject.Active = false
end

Space.Videos.OnUploadStart(OnUploadStartFunction)
Space.Videos.OnUploadEnd(OnUploadEndFunction)