2015-02-10 51 views
0

我有另一個視頻問題。拉伸模式不適合我。視頻拉伸不起作用

<videogular class="videogular" vg-width="controller.config.width" vg-height="controller.config.height" vg-theme="controller.config.theme" vg-responsive="true" vg-video-stretch="controller.config.stretch.value" vg-stretch="controller.config.stretch.value" vg-player-ready="controller.onPlayerReady($API)" vg-update-state="controller.onUpdateState($state)" vg-update-time="controller.onUpdateTime($currentTime, $duration)">  
    <vg-media vg-src="controller.config.sources" vg-native-controls="false" > 
     <video preload='metadata'></video> 
    </vg-media>   

    <vg-buffering class="vg-buffering"><div class="bufferingContainer"><div ng-class="spinnerClass" class="loadingSpinner"></div></div></vg-buffering> 
</videogular> 

和Javascript。

var setupVideo = function(){ 

    $scope.stretchModes = [ 
    {label: "None", value: "none"}, 
    {label: "Fit", value: "fit"}, 
    {label: "Fill", value: "fill"} 
    ]; 

    controller.config = { 
     sources: [ 
     {src: $sce.trustAsResourceUrl("video/" + _fileName + ".mp4"), type: "video/mp4"}, 
     {src: $sce.trustAsResourceUrl("video/" + _fileName + ".webm"), type: "video/webm"}, 
     {src: $sce.trustAsResourceUrl("video/" + _fileName + ".ogg"), type: "video/ogg"} 
     ], 
     width: 1366, 
     height: 768,  
     responsive: true, 
     autoPlay: false, 
     stretch: $scope.stretchModes[2], 
     theme: "css/plugins/videogular.min.css", 
     transclude: true 

    }; 

} 

我只是需要很好地將它適合容器與「適合」或「拉伸」。

回答

0

我是Videogular的創造者。

您正在使用Videogular 1.0.0,並且不再有vg-width,vg-height和vg-stretch屬性。

對於寬度和高度,視頻效果始終爲100%,因此只需向容器中添加所需的尺寸即可。

你這裏有更多的信息: http://www.videogular.com/examples/simplest-videogular-player/

+0

感謝您的時間了。 – Pieter 2015-02-13 08:26:53