/** * Try to transition the state of the stream * * @param YouTubeEvent $event */ protected function transitionState(YouTubeEvent $event) { $liveService = $this->getYouTubeApiService(); $liveService->transitionState($event->getBroadcast(), $event->getChannel(), YouTubeEvent::STATE_REMOTE_TESTING); }
/** * Remove a planned live event on YouTube * * @param YouTubeEvent $event */ protected function removeLivestream(YouTubeEvent $event) { $channel = $event->getChannel(); $this->getAccessToken($channel->getRefreshToken()); try { $this->youTubeApiClient->liveBroadcasts->delete($event->getYouTubeId()); } catch (\Google_Service_Exception $exception) { $this->logger->error('YouTube remove live stream', array('broadcast_id' => $event->getBroadcast()->getBroadcastId(), 'broadcast_name' => $event->getBroadcast()->getName(), 'exception' => $exception->getMessage())); } }