您尚未登录

登录

推荐您使用PC浏览器访问

确定
  • 开发者中心
  • >
  • 云游戏
  • >
  • 快速入门
  • >
  • 排队管理
  • >
  • Android

排队管理

1 触发条件:

接入商所购买云服务实例和并发数达到上限;

2 处理机制:

2.1 接收到需要排队提示

onSceneChanged ==> {“sceneId”:”needWait”}

// 收到排队消息
"status":7
"data":{
  "message":"当前排队 1 人,是否继续?",
  "queues":[
    {"index":1,"priorities":[0,1],"rank":0,"time":"300","timeStr":"5分钟"},
    {"index":0,"priorities":[2],"rank":1,"time":"0","timeStr":"00:00"}]
}
字段 类型
state = 7 提醒用户需要排队
queues 多队列排队信息

2.2 开启排队

开启排队调用 videoView.entryQueue()

2.3 排队状态更新

接收到 status = STATUS_OPERATION_INTERVAL_TIME 状态排队状态信息

status:13
{"message":"当前排队1人,当前正在排队3秒人,请稍候…",
 "queues":[
   {"index":1,"priorities":[0,1],"rank":0,"time":"3","timeStr":"3秒"},
   {"index":0,"priorities":[2],"rank":1,"time":"0","timeStr":"00:00"}]
}

2.4 禁止排队

在海马云游戏管理平台进行配置禁止排队,则返回排队信息如下:

status:10 
Data:{"message":"当前游戏太过火爆,请您稍后再试",
  "queues":[
    {"index":1,"priorities":[0,1],"rank":0,"time":"300","timeStr":"5分钟"},
    {"index":0,"prioritie":[2],"rank":1,"time":"0","timeStr":"00:00"}]
}

2.5 取消排队

调用 videoView.exitQueue() 并直接退出游戏;

×

本篇文章对你是否有帮助?

更多建议

请输入您的建议