ServiceStreaming.php 770 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Easemob\Agora;
  3. /**
  4. * @ignore
  5. */
  6. class ServiceStreaming extends Service
  7. {
  8. const SERVICE_TYPE = 3;
  9. const PRIVILEGE_PUBLISH_MIX_STREAM = 1;
  10. const PRIVILEGE_PUBLISH_RAW_STREAM = 2;
  11. public $channelName;
  12. public $uid;
  13. public function __construct($channelName = "", $uid = "")
  14. {
  15. parent::__construct(self::SERVICE_TYPE);
  16. $this->channelName = $channelName;
  17. $this->uid = $uid;
  18. }
  19. public function pack()
  20. {
  21. return parent::pack() . Util::packString($this->channelName) . Util::packString($this->uid);
  22. }
  23. public function unpack(&$data)
  24. {
  25. parent::unpack($data);
  26. $this->channelName = Util::unpackString($data);
  27. $this->uid = Util::unpackString($data);
  28. }
  29. }