2015-02-09 123 views
2

嘿傢伙我試圖設置我的視頻第一次。當我嘗試設置自動播放設置爲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> 

有沒有somet興我忽略了?真的不知道我做錯了什麼。

回答

2

我是Videogular的創造者。

這是Videogular 1.0.0中的一個已知錯誤,我們希望在幾周內解決它的下一個版本。

這裏是要遵循它鏈接到問題的情況下:

https://github.com/2fdevs/videogular/issues/161

+0

謝謝你這麼多。我會密切關注它。 – Pieter 2015-02-10 03:20:42