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) 33 .directive("vgPoster", 34 [function () { 35 return { 36 restrict: "E", 37 require: "^videogular", 38 scope: { 39 vgUrl: "=?" 40 }, 41 templateUrl: function (elem, attrs) { 42 return attrs.vgTemplate || 'vg-templates/vg-poster'; 43 }, 44 link: function (scope, elem, attr, API) { 45 scope.API = API; 46 47 if (API.isConfig) { 48 scope.$watch("API.config", 49 function () { 50 if (scope.API.config) { 51 scope.vgUrl = scope.API.config.plugins.poster.url; 52 } 53 } 54 ); 55 } 56 } 57 } 58 }] 59);
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.