视频延伸不起作用

时间:2015-02-10 09:19:18

标签: angularjs stretch videogular

我还有另一个视频问题。拉伸模式对我不起作用。

<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

    };  

}

我只需要很好地装入容器中,使用&#34; fit&#34;或&#34;伸展&#34;。

1 个答案:

答案 0 :(得分:0)

我是Videogular的创造者。

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

Videogular的宽度和高度始终为100%,因此只需在容器中添加所需的尺寸即可。

您有更多信息: http://www.videogular.com/examples/simplest-videogular-player/