\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{prisamultimedia} \pdfinfo{ /Title (top-player.pdf) /Creator (Cheatography) /Author (prisamultimedia) /Subject (TOP-Player Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{7D7B4B} \definecolor{LightBackground}{HTML}{F6F6F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{TOP-Player Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{prisamultimedia} via \textcolor{DarkBackground}{\uline{cheatography.com/46799/cs/13542/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}prisamultimedia \\ \uline{cheatography.com/prisamultimedia} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 14th November, 2017.\\ Updated 20th November, 2017.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{2.72 cm} x{5.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-cog\}\}Variables globales}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{mm\_timevideo\_ad} & {\bf{Int}} - Número de segundos que indican al AdModule la lóngitud máxima para que un enlatado pida publicidad de audio. En caso de superarlo se hará petición de publi de vídeo. \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} mm\_autoplay & {\bf{Bool}} - Indica si se realiza gestión de precontrol en dispositivos móviles para poder realizar autoplay. \tn % Row Count 12 (+ 5) % Row 2 \SetRowColor{LightBackground} mm\_dist & {\bf{Str}} - Si existe en página, añadimos el parámetro dist a la url de un audio o vídeo.Se puede distinguir si el contenido se ha reproducido o descargado. El valor del parámetro dist vendrá en el mm\_dist de la páginal. valores : Podium: dist =PRISA\_PLAY Playser: \seqsplit{dist=PRISA\_ES\_CADENASER\_WEB\_PLAY} (para la reproducción) \seqsplit{dist=PRISA\_ES\_CADENASER\_WEB\_DOWNLOAD} (para las descargas) \tn % Row Count 27 (+ 15) % Row 3 \SetRowColor{white} mm\_lang & {\bf{Str}} - Indica el idioma de la página \tn % Row Count 29 (+ 2) % Row 4 \SetRowColor{LightBackground} mm\_tfp & {\bf{Bool}} - cuando está activo cargamos la fapi con /ftp para obtener las señales con publi quemada \tn % Row Count 33 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.72 cm} x{5.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-cog\}\}Variables globales (cont)}} \tn % Row 5 \SetRowColor{LightBackground} mm\_publi & {\bf{Bool}} - Se carga la librería de publicidad prisaAd.lib/.min desde LOCALHOST ,incluso podemos especificar URL \tn % Row Count 5 (+ 5) % Row 6 \SetRowColor{white} mm\_base & {\bf{Bool}} - Indica si se carga TOP desde la máquina donde se aloja el HTML o incluso podemos especificar desde dónde lo queremos coger \tn % Row Count 11 (+ 6) % Row 7 \SetRowColor{LightBackground} tplib & {\bf{Bool}} - Indica si se cargará la librería maximizada, tanto de TOP como de publicidad y estadísticas \tn % Row Count 16 (+ 5) % Row 8 \SetRowColor{white} \seqsplit{mm\_suites\_pre} & {\bf{Bool}} - Indica si se debe pasar la SUITE de pruebas al StatModule \tn % Row Count 19 (+ 3) % Row 9 \SetRowColor{LightBackground} \seqsplit{mm\_top\_compilation} & {\bf{Str}} - Indica la fecha de la compilación de TOP \tn % Row Count 21 (+ 2) % Row 10 \SetRowColor{white} \seqsplit{mm\_simple\_compilation} & {\bf{Str}} - Indica la fecha de la compilación de SIMPLE \tn % Row Count 24 (+ 3) % Row 11 \SetRowColor{LightBackground} mm\_AdServer & {\bf{Str}} - Sirve para forzar otras campañas de publicdad en tiempo de ejecución \tn % Row Count 28 (+ 4) % Row 12 \SetRowColor{white} mm\_debug & {\bf{Str}} - Debug de consola. \tn % Row Count 30 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.736 cm} x{0.836 cm} x{4.028 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-cog\}\} psd.media.TopEmbed}} \tn % Row 0 \SetRowColor{LightBackground} dev & {\bf{Bool}} & Entorno: Integración / Producción \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} id\_cuenta & {\bf{Int}} & Nombre de la cuenta del player. Ej: Playser, elpais, etc. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} media\_type & {\bf{Str}} & Ej: video o audio \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} id\_player & {\bf{Int}} & Identificador del player asociado a la cuenta \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} id\_media & {\bf{Str}} & Indica el identificador de la señal a reproducir \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} id\_container & {\bf{Str}} & DOM Container Ej:\textless{}div id="\{id\}"\textgreater{} \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} \{\{fa-play-circle\}\}topPlayer & {\bf{obj}} & Objeto adicional \{media,ad,stat\} \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} managerOpt & {\bf{obj}} & Embed dentro del Manager. Si es null ( 'managerOpt' : null), entonces este embed no entrará dentro del manager. \tn % Row Count 23 (+ 6) % Row 8 \SetRowColor{LightBackground} \{\{fa-th-list\}\}playList & {\bf{obj}} & Si viene a true ("playList" : true), entonces generará una playList en base a los tags del id\_media, por defecto la playList será vacía y con todas las configuraciones por defecto. \tn % Row Count 32 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.736 cm} x{0.836 cm} x{4.028 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-cog\}\} psd.media.TopEmbed (cont)}} \tn % Row 9 \SetRowColor{LightBackground} plugins & {\bf{obj}} & Plugins adicionales al player \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{Parametros base para instanciar un TopEmbed} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.9 cm} x{0.988 cm} x{4.712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-play-circle\}\} topPlayer \{ media \}}} \tn % Row 0 \SetRowColor{LightBackground} autoplay & {\bf{Bool}} & Indica si queremos reproducir o no automáticamente el video/audio \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} premuted & {\bf{Bool}} & Indicamos si queremos activar o no el sonido del video/audio \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \seqsplit{controllerData} & {\bf{obj}} & Indicamos el tipo de banners sincronizados de Triton que va a soportar ese player. Parámetros: \tn % Row Count 10 (+ 4) % Row 3 \SetRowColor{white} alto & {\bf{Int}} & (Elpais,As) Alto que nos pasan para sacar la proporción de 16:9 para el video a partir del ancho \tn % Row Count 15 (+ 5) % Row 4 \SetRowColor{LightBackground} ancho & {\bf{Int}} & (Elpais,As) Ancho que nos pasan para sacar la proporción de 16:9 para el video a partir del ancho \tn % Row Count 20 (+ 5) % Row 5 \SetRowColor{white} \seqsplit{portal\_creacion} & {\bf{Str}} & (Elpais) Portal de creación. Usado para saber qué ad unit usar Ej: tecnología a nivel publicitario \tn % Row Count 25 (+ 5) % Row 6 \SetRowColor{LightBackground} \seqsplit{seccion\_creacion} & {\bf{Str}} & (Elpais) Sección de creación. Usado para saber qué ad unit usar Ej: actualidad a nivel publicitario \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.9 cm} x{0.988 cm} x{4.712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-play-circle\}\} topPlayer \{ media \} (cont)}} \tn % Row 7 \SetRowColor{LightBackground} \seqsplit{un\_creacion} & {\bf{Str}} & (Elpais) Unidad de negocio de creación. Usado para saber qué ad unit usar a nivel publicitario Ej: ep \tn % Row Count 5 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{Objeto de configuraciones que se pasan como parámetros a TopPlayer.js} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.748 cm} p{0.76 cm} x{5.092 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-play-circle\}\} topPlayer \{ ad \}}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{container} & Str & Contenedor en el DOM de la capa donde se pintará la publicidad \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Enabled & Bool & Indicamos si queremos activar o desactivar la publicidad \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \seqsplit{tags\_noticias} & Str & (Elpais, As) Aquí nos pasan los tags de la noticia para que filtremos a nivel publicitario. Sólo lo usan actualmente en la integración con El pais y AS \tn % Row Count 12 (+ 6) % Row 3 \SetRowColor{white} dai & Bool & Activamos la publicidad midRoll en caso de que haya insertado TAGs en la señal \tn % Row Count 16 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{Objeto configurador de la publicidad} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.444 cm} p{0.76 cm} x{5.396 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-play-circle\}\} topPlayer \{ stat \}}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{mediaTimer} & \{\} & Configuración del keepalive para logtrust, que lo que hace es lanzar el pixel de logtrust cada x segundo \tn % Row Count 4 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{Objeto configurador de parámetros adicionales del player} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-th-list\}\} PlayList}} \tn % Row 0 \SetRowColor{LightBackground} dev & {\bf{Bool}} - Indica si los datos de la FAPI (player y señal) se pedirán del entorno de integración o de producción. Default value: false \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} URL\_list (*) & {\bf{Str}} - Indica la URL de la que se cogerán los datos de la playlist \tn % Row Count 9 (+ 3) % Row 2 \SetRowColor{LightBackground} repeat & {\bf{int}} - Indica si se repetirá la playlist al llegar al final. Valores: 0 -\textgreater{} no hay repeat 1 -\textgreater{} repetir el actual 2 -\textgreater{} repetir toda la playlist Default value: 2 \tn % Row Count 16 (+ 7) % Row 3 \SetRowColor{white} \seqsplit{id\_container\_playlist} & {\bf{Str}} - Contenedor en el DOM de la capa donde se pintará la playlist \tn % Row Count 19 (+ 3) % Row 4 \SetRowColor{LightBackground} autonext & {\bf{Bool}} - Indica si al terminar de reproducir un item pasaremos automáticamente al siguiente. Esto no implica que se reproduzca automáticamente el siguiente item, ya que eso depende del valor autoplay de este mismo array de configuración. Default value: true \tn % Row Count 30 (+ 11) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-th-list\}\} PlayList (cont)}} \tn % Row 5 \SetRowColor{LightBackground} \seqsplit{styleitemsContainer} & {\bf{Str}} - Indica si al terminar de reproducir un item pasaremos automáticamente al siguiente. Esto no implica que se reproduzca automáticamente el siguiente item, ya que eso depende del valor autoplay de este mismo array de configuración. Default value: true \tn % Row Count 11 (+ 11) % Row 6 \SetRowColor{white} reload\_secs & {\bf{int}} - Número de segundos a esperar hasta volver a cargar los elementos de una lista dinámica. Si se deja a 0 no se recargará la lista. Default value: 0 \tn % Row Count 18 (+ 7) % Row 7 \SetRowColor{LightBackground} playerPercent & {\bf{Float}} - Porcentaje que ocupará el player dentro de la vista en bloque (player y playlist en el mismo div). El resto del ancho restante se usará para pintar la playlist. Este valor irá entre 0 y 1. \tn % Row Count 27 (+ 9) % Row 8 \SetRowColor{white} playListSkin & {\bf{Str}} - Contiene el tipo de skin de playlist (.min|.lib) que vamos a querer pintar. Ejemplos: generica.min.js | genérica.lib.js → es el skin por defecto en caso de no especificar ningún tipo de skin en la configuración oneplayer.min.js |oneplayer.lib.js → skin para oneplayer vacia.min.js |vacia.lib.js → usamos este skin cuando queremos que el player se comporte como una playlist pero no queremos visualizar ningún panel lateral con los siguientes videos/audios de la lista \tn % Row Count 48 (+ 21) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\{\{fa-th-list\}\} PlayList (cont)}} \tn % Row 9 \SetRowColor{LightBackground} nextpanel\{\{fa-th-large\}\} & {\bf{obj}} - Este objeto lo vamos a usar para activar en el player el panel relacionados. Los parámetro que tiene este objeto son los siguientes: active: {[}bolean{]} activamos o desactivamos el panel time: {[}Number{]} tiempo para que salte al siguiente video/audio de manera automática skin: {[}String{]} tipo de skin que van a usar. Por ahora solo tenemos el skin "default", pero cada unidad de negocio podría querer un skin distintos para su panel next Ejemplo: "nextpanel": \{"active": true, "time": 5, "skin": "default"\} \tn % Row Count 22 (+ 22) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Configuración base de una playlist} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}