嘿伙计们我第一次试图设置我的视频。当我尝试将自动播放设置为true时,它会抛出错误:
ReferenceError: VG_UTILS is not defined
at videogular.js:506
at angular.js:16210
at completeOutstandingRequest (angular.js:4902)
at angular.js:5282
我的控制器:
angular.module('app')
.controller('SectionVideoCtrl', ['$rootScope', '$scope', '$element', '$sce', function ($rootScope, $scope, $element, $sce) {
var _API = null;
$scope.stretchModes = [
{label: "None", value: "none"},
{label: "Fit", value: "fit"},
{label: "Fill", value: "fill"}
];
this.config = {
sources: [
{src: $sce.trustAsResourceUrl("video/" + "footy" + ".mp4"), type: "video/mp4"},
{src: $sce.trustAsResourceUrl("video/" + "footy" + ".webm"), type: "video/webm"},
{src: $sce.trustAsResourceUrl("video/" + "footy" + ".ogg"), type: "video/ogg"}
],
width: 640,
height: 360,
responsive: true,
autoPlay: true,
stretch: $scope.stretchModes[2],
theme: "css/plugins/videogular.min.css"
};
}]);
加载到模块中的所有内容:
angular
.module('app', [
'ngRoute',
"ngSanitize",
"com.2fdevs.videogular",
"com.2fdevs.videogular.plugins.controls",
"com.2fdevs.videogular.plugins.overlayplay",
"com.2fdevs.videogular.plugins.buffering",
"com.2fdevs.videogular.plugins.poster"
])
和HTML:
<videogular vg-player-ready="controller.onPlayerReady($API)" vg-width="controller.config.width" vg-theme="controller.config.theme.url" vg-auto-play="controller.config.autoPlay">
<vg-media vg-src="controller.config.sources" vg-native-controls="false">
<video preload='metadata'></video>
</vg-media>
</videogular>
有什么我忽略的吗?真的不知道我做错了什么。
答案 0 :(得分:2)
我是Videogular的创造者。
这是Videogular 1.0.0中的已知错误,我们希望在几周内将其修复为下一个版本。
如果您想要关注该问题,请点击此处的链接: