1/** 2 * @license videogular v1.4.4 http://videogular.com 3 * Two Fucking Developers http://twofuckingdevelopers.com 4 * License: MIT 5 */ 6/** 7 * @ngdoc directive 8 * @name com.2fdevs.videogular.plugins.poster.directive:vgPoster 9 * @restrict E 10 * @description 11 * Shows an image when player hasn't been played or has been completed a video. 12 * <pre> 13 * <videogular vg-theme="config.theme.url" vg-autoplay="config.autoPlay"> 14 * <vg-media vg-src="sources"></vg-media> 15 * 16 * <vg-poster vg-url='config.plugins.poster.url'></vg-poster> 17 * </videogular> 18 * </pre> 19 * 20 * @param {string} vgUrl String with a scope name variable. URL to an image supported by the img tag. 21 * **This parameter is required.** 22 * 23 * 24 */ 25"use strict"; 26angular.module("com.2fdevs.videogular.plugins.poster", []) 27 .run( 28 ["$templateCache", function ($templateCache) { 29 $templateCache.put("vg-templates/vg-poster", 30 '<img ng-src="{{vgUrl}}" ng-class="API.currentState" role="presentation" alt="">'); 31 32 // '<div class="fullBG" ng-style="{\'background-image\': \'url({{vgUrl}})\'}" role="presentation" ng-class="API.currentState"></div>'); 33 }] 34) 35 .directive("vgPoster", 36 [function () { 37 return { 38 restrict: "E", 39 require: "^videogular", 40 scope: { 41 vgUrl: "=?" 42 }, 43 templateUrl: function (elem, attrs) { 44 return attrs.vgTemplate || 'vg-templates/vg-poster'; 45 }, 46 link: function (scope, elem, attr, API) { 47 scope.API = API; 48 49 if (API.isConfig) { 50 scope.$watch("API.config", 51 function () { 52 if (scope.API.config) { 53 // console.log('fire watcher'); 54 scope.vgUrl = scope.API.config.plugins.poster.url; 55 } 56 } 57 ); 58 } 59 } 60 } 61 }] 62);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.