当前位置: 首页>>代码示例>>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;未经允许,请勿转载。