Sha256: 86b89a39793b8fe0590e3bf63a0a53adaa82caf9bc201f03ee7140bcd59a28fa
Contents?: true
Size: 1.6 KB
Versions: 20
Compression:
Stored size: 1.6 KB
Contents
<script type="text/ng-template" id="promethee/components/video/edit/write"> <div ng-controller="VideoController" ng-click="inspect(component, $event)" class=" promethee-edit__component promethee-edit__component--video"> <div class="promethee-edit__component-selected" ng-class="{'promethee-edit__component-selected--visible': promethee.inspected === component}"> <div class="promethee-edit__toolbar promethee-edit__toolbar--transparent"> <ng-include src="'promethee/write/toolbar'"></ng-include> </div> <div class="embed-responsive embed-responsive-16by9"> <iframe ng-if="embed" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen" ng-src="{{embed | urlSafe}}"></iframe> <div class="video-neutralizing-overlay"></div> </div> </div> </div> </script> <script> promethee.controller('VideoController', ['$scope', function($scope) { Object.defineProperty($scope, 'embed', { get: function() { var embed = null; var url = this.component.attributes.url + ''; if(url.includes('vimeo')) { var id = url.replace(/^(?:https?:)?\/\/(?:(?:www|player)\.)?vimeo\.com\/(?:video\/)?(\d+).*?$/, '$1'); embed = 'https://player.vimeo.com/video/' + id + '?color=ffffff&title=0&byline=0&portrait=0'; } else if(url.includes('youtube')) { var parts = url.split('watch?v='); var id = parts[parts.length - 1]; embed = 'http://www.youtube.com/embed/' + id; } return embed; } }) }]); </script>
Version data entries
20 entries across 20 versions & 1 rubygems