src/BaiduBce/Services/Vod/VodClient.php
public function getMediaSource($mediaId, $expiredInSeconds, $options = array())
    {
        list($config) = $this->parseOptions($options, 'config');

        if (empty($mediaId)) {
            throw new BceClientException("The parameter mediaId should NOT be null or empty string");
        }
        if (empty($expiredInSeconds)) {
            $expiredInSeconds = -1;
        }

        $params = array(
            'sourcedownload' => null,
            'expiredInSeconds' => $expiredInSeconds,
        );
        return $this->sendRequest(
            HttpMethod::GET,
            array(
                'config' => $config,
                'params' => $params,
            ),
            "/media/$mediaId"
        );
    }
public function getMediaSource($mediaId, $expiredInSeconds, $options = array())
    {
        list($config) = $this->parseOptions($options, 'config');

        if (empty($mediaId)) {
            throw new BceClientException("The parameter mediaId should NOT be null or empty string");
        }
        if (empty($expiredInSeconds)) {
            $expiredInSeconds = -1;
        }

        $params = array(
            'sourcedownload' => null,
            'expiredInSeconds' => $expiredInSeconds,
        );
        return $this->sendRequest(
            HttpMethod::GET,
            array(
                'config' => $config,
                'params' => $params,
            ),
            "/media/$mediaId"
        );
    }
public function getMediaSource ( $ mediaId , $ expiredInSeconds , $ options = array ( ) ) { list ( $ config ) = $ this -> parseOptions ( $ options , 'config' ) ; if ( empty ( $ mediaId ) ) { throw new BceClientException ( "The parameter mediaId should NOT be null or empty string" ) ; } if ( empty ( $ expiredInSeconds ) ) { $ expiredInSeconds = - 1 ; } $ params = array ( 'sourcedownload' => null , 'expiredInSeconds' => $ expiredInSeconds , ) ; return $ this -> sendRequest ( HttpMethod :: GET , array ( 'config' => $ config , 'params' => $ params , ) , "/media/$mediaId" ) ; }
get the source download info of a vod media

@param $mediaId string, mediaId of the media
@param $expiredInSeconds integer, expire time of the url
@param array $options Supported options:
{
config: the optional bce configuration, which will overwrite the
default vod client configuration that was passed in constructor.
}
@return mixed the vod media's playable source file and cover page
@throws BceClientException
get the source download info of a vod media