Esempio n. 1
0
 public function buildServeFlavors()
 {
     $flavors = array();
     $baseUrl = $this->liveStreamConfig->getUrl();
     $flavors[] = $this->getFlavorAssetInfo('', $baseUrl);
     // passing the url as urlPrefix so that only the path will be tokenized
     return $flavors;
 }
Esempio n. 2
0
 public function doServe(kLiveStreamConfiguration $liveStreamConfig)
 {
     $flavors = array();
     $baseUrl = $liveStreamConfig->getUrl();
     $this->finalizeUrls($baseUrl, $flavors);
     $flavors[] = $this->getFlavorAssetInfo('', $baseUrl);
     // passing the url as urlPrefix so that only the path will be tokenized
     $renderer = $this->getRenderer($flavors);
     return $renderer;
 }
 public function doServe(kLiveStreamConfiguration $liveStreamConfig)
 {
     $flavors = $this->buildRtmpLiveStreamFlavorsArray();
     $baseUrl = $liveStreamConfig->getUrl();
     $this->finalizeUrls($baseUrl, $flavors);
     $renderer = $this->getRenderer($flavors);
     $renderer->baseUrl = $baseUrl;
     $renderer->streamType = kF4MManifestRenderer::PLAY_STREAM_TYPE_LIVE;
     return $renderer;
 }
 public function doServe(kLiveStreamConfiguration $liveStreamConfig)
 {
     $baseUrl = $liveStreamConfig->getUrl();
     $backupUrl = $liveStreamConfig->getBackupUrl();
     $entry = entryPeer::retrieveByPK($this->params->getEntryId());
     /* @var $entry LiveEntry */
     if ($entry && $entry->getSyncDCs()) {
         $baseUrl = str_replace('_all.smil', '_publish.smil', $baseUrl);
         if ($backupUrl) {
             $backupUrl = str_replace('_all.smil', '_publish.smil', $backupUrl);
         }
     }
     if ($this->params->getUsePlayServer()) {
         $liveStreamConfig->setUrl($this->getPlayServerUrl($baseUrl));
         $liveStreamConfig->setBackupUrl(null);
     }
     if (!$liveStreamConfig->getBackupUrl() && !$this->getForceProxy() || $this->params->getUsePlayServer() || $liveStreamConfig->getIsExternalStream()) {
         return parent::doServe($liveStreamConfig);
     }
     $flavors = array();
     $this->buildM3u8Flavors($baseUrl, $flavors);
     if ($backupUrl) {
         $this->buildM3u8Flavors($backupUrl, $flavors);
     }
     foreach ($flavors as $index => $flavor) {
         $flavors[$index]['index'] = $index;
     }
     usort($flavors, array($this, 'compareFlavors'));
     foreach ($flavors as $index => $flavor) {
         unset($flavors[$index]['index']);
     }
     $this->DEFAULT_RENDERER_CLASS = 'kM3U8ManifestRenderer';
     $renderer = $this->getRenderer($flavors);
     return $renderer;
 }