|
@@ -95,7 +95,7 @@ class CommonHelper
|
|
|
/*
|
|
|
* 显示视频
|
|
|
*/
|
|
|
- public static function displayVideo($items,$videoCover,$videoSrc,$boxSize=150)
|
|
|
+ public static function displayVideo($items,$videoCover,$videoSrc,$boxSize=150,$ossSource=1)
|
|
|
{
|
|
|
$html = '';
|
|
|
if (is_array($items)) {
|
|
@@ -103,7 +103,11 @@ class CommonHelper
|
|
|
$item = (array) $item;
|
|
|
$cover = $item[$videoCover];
|
|
|
$src = $item[$videoSrc];
|
|
|
- $videoUrl = CommonHelper::ossUrl($src);
|
|
|
+ if ($ossSource == 1) {
|
|
|
+ $videoUrl = CommonHelper::ossUrl($src);
|
|
|
+ } else {
|
|
|
+ $videoUrl = CommonHelper::albumUrl($src);
|
|
|
+ }
|
|
|
$thumbnailUrl = CommonHelper::ossUrl($cover) ."?x-oss-process=image/resize,m_pad,h_{$boxSize},w_{$boxSize},color_ffffff";;
|
|
|
$html .= '<div class="video-container"><a href="#" class="playVideo" videoUrl="'.$videoUrl.'")"><img src="'.$thumbnailUrl.'" alt="Video Thumbnail"><div class="play-button"></div></a></div>';
|
|
|
}
|