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:
parent
a35b31f815
commit
653c157263
7 changed files with 122 additions and 4 deletions
19
client/app/modals/video/video.controller.js
Normal file
19
client/app/modals/video/video.controller.js
Normal 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;
|
17
client/app/modals/video/video.controller.spec.js
Normal file
17
client/app/modals/video/video.controller.spec.js
Normal 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);
|
||||
});
|
||||
});
|
12
client/app/modals/video/video.html
Normal file
12
client/app/modals/video/video.html
Normal 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()">×</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>
|
Loading…
Add table
Add a link
Reference in a new issue