unserver-unify
Version:
31 lines • 882 B
JavaScript
'use strict';
angular.module('bamboo').component('simpleVideoGular', {
bindings: {
videosrc: '<',
autohide: '<',
autohidetime: '<',
subtitlesrc: '<'
},
// Load the template
templateUrl: 'app/directive/video/videogular.component.html',
controller: ['$sce',function($sce) {
// A list of menus
var self = this;
console.info(self);
// register the panel in init
self.$onInit = function() {
self.initVideoSource();
console.log(self.media);
};
//type "video/mp4" "video/webm"
self.initVideoSource = function() {
self.media = [{
sources: [{
//src: $sce.trustAsResourceUrl("http://static.videogular.com/assets/videos/videogular.webm"),
src: $sce.trustAsResourceUrl(encodeURI(self.videosrc)),
type: "video/mp4"
}]
}];
}
}]
});