示例#1
0
 public function startNext($device)
 {
     Logger::debug(__METHOD__, self::$logfile);
     $playlist = new Playlist($device);
     $result = $playlist->next();
     $this->respond($result);
 }
示例#2
0
文件: Device.php 项目: fundef/pupnp
 public function receivedEvent($transportState)
 {
     Logger::debug('Reveived transportState event: ' . $transportState, 'event');
     if ($this->ignoreStops && $transportState == 'PLAYING') {
         Logger::debug('Finished ignoring STOPPED state', 'event');
         $this->ignoreStops = false;
         $this->saveToCache();
     }
     if ($this->ignoreStops && $transportState == 'STOPPED') {
         Logger::debug('Ignoring STOPPED state', 'event');
         return;
     }
     switch ($transportState) {
         case 'STOPPED':
             Logger::debug('Try to play next', 'event');
             $playlist = new Playlist($this->getId());
             $next = $playlist->next();
             break;
     }
 }