當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Playlist::playlistTimeToSeconds方法代碼示例

本文整理匯總了PHP中Playlist::playlistTimeToSeconds方法的典型用法代碼示例。如果您正苦於以下問題:PHP Playlist::playlistTimeToSeconds方法的具體用法?PHP Playlist::playlistTimeToSeconds怎麽用?PHP Playlist::playlistTimeToSeconds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Playlist的用法示例。


在下文中一共展示了Playlist::playlistTimeToSeconds方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: findPlaylistsAction

 public function findPlaylistsAction()
 {
     $post = $this->getRequest()->getPost();
     $show = new ShowInstance($this->sched_sess->showInstanceId);
     $playlists = $show->searchPlaylistsForShow($post);
     foreach ($playlists['aaData'] as &$data) {
         // calling two functions to format time to 1 decimal place
         $sec = Playlist::playlistTimeToSeconds($data[4]);
         $data[4] = Playlist::secondsToPlaylistTime($sec);
     }
     //for datatables
     die(json_encode($playlists));
 }
開發者ID:romansavrulin,項目名稱:Airtime,代碼行數:13,代碼來源:ScheduleController.php

示例2: OutputToM3u

 public static function OutputToM3u(&$pl, $ple, $ind = '')
 {
     $acOrPl = NULL;
     foreach ($ple['children'] as $ac) {
         switch ($ac['elementname']) {
             case "audioClip":
                 $r = PlaylistAudioClipExport::OutputToM3u($pl, $ac);
                 if (PEAR::isError($r)) {
                     return $r;
                 }
                 if (!is_null($r)) {
                     $acOrPl = $r;
                 }
                 break;
             case "playlist":
                 $gunid = $ac['attrs']['id'];
                 $pl2 = StoredFile::RecallByGunid($gunid);
                 if (is_null($pl2) || PEAR::isError($pl2)) {
                     return $pl2;
                 }
                 $r = $pl2->outputToM3u(FALSE);
                 if (PEAR::isError($r)) {
                     return $r;
                 }
                 if (!is_null($r)) {
                     $acOrPl = $r;
                 }
                 break;
         }
     }
     if (is_null($acOrPl)) {
         return '';
     }
     $playlength = ceil(Playlist::playlistTimeToSeconds($acOrPl['playlength']));
     $title = $acOrPl['title'];
     $uri = isset($acOrPl['uri']) ? $acOrPl['uri'] : '???';
     $res = "#EXTINF: {$playlength}, {$title}\n";
     $res .= "{$uri}\n";
     return $res;
 }
開發者ID:romansavrulin,項目名稱:Airtime,代碼行數:40,代碼來源:Playlist.php

示例3: contentsAction

 public function contentsAction()
 {
     $post = $this->getRequest()->getPost();
     $datatables = StoredFile::searchFilesForPlaylistBuilder($post);
     //format clip lengh to 1 decimal
     foreach ($datatables["aaData"] as &$data) {
         $sec = Playlist::playlistTimeToSeconds($data[5]);
         $data[5] = Playlist::secondsToPlaylistTime($sec);
     }
     die(json_encode($datatables));
 }
開發者ID:romansavrulin,項目名稱:Airtime,代碼行數:11,代碼來源:LibraryController.php


注:本文中的Playlist::playlistTimeToSeconds方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。