本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
自定义直播外观
加载画面
当客户打开网络浏览器查看直播时,网络客户端开始建立与 Amazon Stre GameLift ams 直播会话的连接。直播会话加载时,您可以在客户的屏幕上显示自定义背景和徽标。
GameLiftStreamsSampleGamePublisherService/public/LoadingScreen/loadingscreen.js文件中的 Amazon GameLift Streams Web SDK 示例客户端演示了如何在前端 Web 客户端中实现动画徽标。默认加载屏幕由 2 张图像组成:背景和前景。前景图像位于中间,具有脉冲动画。动画仅在直播会话连接时播放。
启用加载屏幕
-
在 Amazon GameLift Streams Web SDK 示例客户端中,导航到该
GameLiftStreamsSampleGamePublisherService/public/LoadingScreen/文件夹。 -
使用默认名称添加背景和前景图像,
Background.png以及。LoadingLogo.png如果要重命名它们或使用不同的图像格式,则必须更新中的代码GameLiftStreamsSampleGamePublisherService/public/loadingscreen.js。 -
(可选)在中
GameLiftStreamsSampleGamePublisherService/public/loadingscreen.js,更新 JavaScript 代码以实现不同的动画。