listentogether_play_command.js 543 B

123456789101112131415161718192021
  1. // 一起听 发送播放状态
  2. const createOption = require('../util/option.js')
  3. module.exports = (query, request) => {
  4. const data = {
  5. roomId: query.roomId,
  6. commandInfo: JSON.stringify({
  7. commandType: query.commandType,
  8. progress: query.progress || 0,
  9. playStatus: query.playStatus,
  10. formerSongId: query.formerSongId,
  11. targetSongId: query.targetSongId,
  12. clientSeq: query.clientSeq,
  13. }),
  14. }
  15. return request(
  16. `/api/listen/together/play/command/report`,
  17. data,
  18. createOption(query),
  19. )
  20. }