videogular 拉伸不起作用
videogular stretch not working
我还有一个关于 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
};
}
我只需要用 "fit" 或 "stretch" 将它很好地放入容器即可。
我是 Videogular 的创建者。
您正在使用 Videogular 1.0.0,并且不再有 vg-width、vg-height 和 vg-stretch 属性。
Videogular 的宽度和高度始终为 100%,因此只需将您想要的尺寸添加到您的容器中即可。
您在这里有更多信息:
http://www.videogular.com/examples/simplest-videogular-player/
我还有一个关于 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
};
}
我只需要用 "fit" 或 "stretch" 将它很好地放入容器即可。
我是 Videogular 的创建者。
您正在使用 Videogular 1.0.0,并且不再有 vg-width、vg-height 和 vg-stretch 属性。
Videogular 的宽度和高度始终为 100%,因此只需将您想要的尺寸添加到您的容器中即可。
您在这里有更多信息: http://www.videogular.com/examples/simplest-videogular-player/