Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
DESKTOP-98AVA47\Administrator 2021-07-16 14:46:31 +08:00
commit 6aeea9a736
1 changed files with 26 additions and 19 deletions

View File

@ -96,26 +96,33 @@ end
function PackageManager.SetVideo(obj, bg) function PackageManager.SetVideo(obj, bg)
obj:SetActive(false) obj:SetActive(false)
if this.config then if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_PLAY_LOGIN_VIDEO) then
if this.config.VideoName then if this.StreamConfig and this.StreamConfig.LoginPanelVideoBG and this.StreamConfig.LoginPanelVideoBG ~= "" then
if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_PLAY_LOGIN_VIDEO) then Log("加载Stream视频"..tostring(this.StreamConfig.LoginPanelVideoBG))
Log("加载视频:"..tostring(this.config.VideoName)) if UIManager.IsOpen(UIName.LoginPanel) then
resMgr:PreLoadAssetAsync(this.config.VideoName, function(isOk) local video = obj:GetComponent("VideoPlayer")
if isOk then video.url = "file://" .. UnityEngine.Application.streamingAssetsPath .."/Res/"..tostring(this.StreamConfig.LoginPanelVideoBG)..".mp4"
if UIManager.IsOpen(UIName.LoginPanel) then video:Play()
local video = obj:GetComponent("VideoPlayer") bg:DOFade(0, 2)
-- video.url = ServerConfigManager.GetVersionInfo("resUrl") .. AppConst.PlatformPath .."/"..tostring(this.config.VideoName) ..".mp4" obj:SetActive(true)
-- video.clip = resMgr:LoadAsset(this.config.VideoName)
video.url = "file://" .. AppConst.PersistentDataPath .."/"..tostring(this.config.VideoName)
video:Play()
bg:DOFade(0, 2)
obj:SetActive(true)
end
else
Log("视频加载失败:"..this.config.VideoName)
end
end)
end end
elseif this.config and this.config.VideoName and this.config.VideoName ~= "" then
Log("加载视频:"..tostring(this.config.VideoName))
resMgr:PreLoadAssetAsync(this.config.VideoName, function(isOk)
if isOk then
if UIManager.IsOpen(UIName.LoginPanel) then
local video = obj:GetComponent("VideoPlayer")
-- video.url = ServerConfigManager.GetVersionInfo("resUrl") .. AppConst.PlatformPath .."/"..tostring(this.config.VideoName) ..".mp4"
-- video.clip = resMgr:LoadAsset(this.config.VideoName)
video.url = "file://" .. AppConst.PersistentDataPath .."/"..tostring(this.config.VideoName)
video:Play()
bg:DOFade(0, 2)
obj:SetActive(true)
end
else
Log("视频加载失败:"..this.config.VideoName)
end
end)
else else
Log("包名:"..tostring(this.config.PackageName).."登录视频为空!") Log("包名:"..tostring(this.config.PackageName).."登录视频为空!")
end end