1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-03-09 23:38:54 +00:00

Add support for video demos

This commit is contained in:
Mumshad Mannambeth 2017-07-13 11:47:20 -04:00
parent a35b31f815
commit 653c157263
7 changed files with 122 additions and 4 deletions

View file

@ -0,0 +1,19 @@
'use strict';
const angular = require('angular');
/*@ngInject*/
export function videoController($scope, $uibModalInstance,$sce, video) {
this.video_id = video.video_id;
$scope.video_url = $sce.trustAsResourceUrl("https://www.youtube.com/embed/" + this.video_id);
console.log("Video URL = " + this.video_url);
$scope.cancel = function () {
$uibModalInstance.close();
};
}
export default angular.module('webAppApp.video', [])
.controller('VideoController', videoController)
.name;

View file

@ -0,0 +1,17 @@
'use strict';
describe('Controller: VideoCtrl', function() {
// load the controller's module
beforeEach(module('webAppApp.video'));
var VideoCtrl;
// Initialize the controller and a mock scope
beforeEach(inject(function($controller) {
VideoCtrl = $controller('VideoCtrl', {});
}));
it('should ...', function() {
expect(1).to.equal(1);
});
});

View file

@ -0,0 +1,12 @@
<!-- Modal content-->
<div class="modal-content" style="min-width: 800px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" ng-click="cancel()">&times;</button>
<h4 class="modal-title">Demo</h4>
</div>
<div class="modal-body" style="text-align: center">
<iframe src="{{video_url}}" width="720px" height="500px" allowfullscreen>
</iframe>
</div>
</div>