summaryrefslogtreecommitdiff
path: root/texmf-dist/source/latex/yt4pdf/examples/yt4pdf-2.tex
blob: 558b39288ea1b23c2d41949e96cec91d1de626b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
\documentclass{article}
\usepackage{amsmath}
%
% the driver line is not necessary if you
% have aebpro.cfg configured to your driver.
%
\usepackage[%
    web={designv,pro,tight,usesf,usetemplates},
    eforms,graphicxsp={showembeds},aebxmp
]{aeb_pro}
\usepackage{yt4pdf}
\usepackage{picins}

% \textBgColor{lightgray}

\DeclareDocInfo
{
    title=The \texorpdfstring{\textsf{yt4pdf} Package\\[3pt]}{yt4pdf Package: }Demo 2 of You Tube API,
    author=D. P. Story,
    university=Acro\negthinspace\TeX.Net,
    email=dpstory@acrotex.net,
    subject={Live streamed video from YouTube.com},
    keywords={You Tube, AeB, rmannot},
    talksite=\url{http://www.acrotex.net},
    talkdate={\today}
}
\talkdateLabel{Published:}

\def\AcroTeX{Acro\!\TeX}

\makePoster{pdfyt_poster}{pdfyt_poster}
\makePoster{yt_poster}{graphics/yt_icon_sm}

\parindent=0pt\parskip6pt
\rheader{}

\DeclarePageLayout{footskip=15.5pt}

%\previewtrue

\declarePlayList{\playList}{%
    \ytIdTitle{Kung-Fu Fighting {(Bruce Lee version)}}{GZ9e3Dy7obA}
    \ytIdTitle{Kung-Fu Fighting {(Original, must view on YouTube)}}{jhUkGIsKvn0}
    \ytIdTitle{RAF Sculthorpe {(Watch for my Mom!)}}{K7H8QghVs9k}
    \ytIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
}

%
% Note: popupmenu package version 1.0 (2010/09/18) or later required here.
%
\begin{popupmenu}{YTMenu}
    \puIdTitle{Select a You Tube Video}{} % A title has no yt Id
    \begin{submenu}{title=Music Videos}
        \puIdTitle{Kung-Fu Fighting (Bruce Lee version)}{GZ9e3Dy7obA}
        \puIdTitle{Kung-Fu Fighting (Original, view on You Tube)}{jhUkGIsKvn0}
        \puIdTitle{Ink Spots - If I didn't care}{rvwfLe6sLis}
        \puIdTitle{Ink Spots - My Prayer}{h7KJCns5v3g}
    \end{submenu}
    \begin{submenu}{title=Adobe Related Videos}
        \puIdTitle{Open at Adobe}{eNzrn8-JFSE}
        \puIdTitle{Lori's Corner Episode \#1}{5y9-EVmreU4}
        \puIdTitle{Intro to PDF Portfolios}{T9Yzo_hlwP0}
    \end{submenu}
    \begin{submenu}{title=Action Videos}
        \puIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
        \puIdTitle{AimBot}{NYGlWjIKoY4}
        \puIdTitle{Flower Warfare}{031Dshcnso4}
        \puIdTitle{Modern Warfare: Frozen Crossing Pt. 1}{rzQMGMuD1sU}
        \puIdTitle{Modern Warfare: Frozen Crossing Pt. 2}{a08ViuvORRM}
    \end{submenu}
\end{popupmenu}

% After defining all menus used with YouTube videos, we declare them using \ytPopupMenuData
% The argument is a token list: \ytPopupMenuData{\myEducationMenu\myFunMenu...}
\ytPopupMenuData{\YTMenu}

\begin{document}

\maketitle

\input{config_intacc.def}


\begin{center}\bfseries\Large\color{blue}YT4PDF\end{center}

\DeclareYTName{ytInWindow}
\ytBtnPresets{\BC{.5 0 0}\W{1}\S{S}\textFont{HeBo}}%
{\setlength{\dimen0}{(\linewidth)/6-1bp}\xdef\ytWidth{\the\dimen0}} %-.5bp
\cfooter{\makebox[\linewidth][c]{\kern1bp\ytPlayToggle{\ytWidth}{11bp}\kern1bp\ytStopLoading[\textSize{0}]{\ytWidth}{11bp}\kern1bp
\ytMuteToggle{\ytWidth}{11bp}\kern1bp\ytRewind{\ytWidth}{11bp}\kern1bp
\ytSelect[\textSize{0}]{eNzrn8-JFSE}{\ytWidth}{11bp}\kern1bp\ytOpenWeb[\textSize{0}]{\ytWidth}{11bp}}}

\newcommand{\myPBPresets}{\CA{YT Menu}\textColor{0 0 1}\W1\BC{}\textSize{0}
    \S{S}\AA{\AAMouseEnter{\JS{ytPopupMenu("\ytCurrRMAName",YTMenu)}}}}

\setWindowDimPos{position={halign=center,valign=center,hoffset=0,voffset=0},
    width={default=571},height={default=330}}%

\setlength{\pichskip}{3pt}
\parpic(.25in,.25in){%
\parbox{.25in}{\offinterlineskip\resizebox{.25in}{!}
{\ytRmAnnot[windowed,poster=yt_poster,deactivated=pageclose]{ytInWindow}{72bp}{72bp}}}}
\pushButton[\presets{\myPBPresets}]{myYTMenu}{20bp}{5bp}
On this page, the You Tube annotation is icon size and the video is played
in a floating window.

Move the window by dragging its title bar. Resize it by dragging the
lower-right corner. Close the window by clicking on the upper-right
corner.

The \textsf{YT Menu} uses the \textsf{popupmenu} package. Alternatively,
we could just use the combo box that has been used already, but, I thought
we might try something different.

\newpage

\ytRmAnnot[posternote=AcroTeX PDF Tube,deactivated=pageclose]{YouTube1}{571bp/2}{330bp/2}\\
\ytPlayList{GZ9e3Dy7obA}{\playList}\ytComboListPresets{\textSize{9}}%
\ytComboList{(571bp/2)-1bp-33bp}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}

\newpage
\cfooter{}
\begin{minipage}{571bp/2}
\ytRmAnnot[posternote=AcroTeX PDF Tube,deactivated=pageclose]{YouTube2}{571bp/2}{330bp/2}\\
\ytPlayList{GZ9e3Dy7obA}{\playList}\ytComboListPresets{\textSize{9}}%
\ytComboList{(571bp/2)-1bp-33bp}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}
\end{minipage}\hfill
\begin{minipage}{\linewidth-290bp-10bp}\centering
\ytPlayToggle{1in}{11bp}\\[3bp]
\ytStopLoading[\textSize{0}]{1in}{11bp}\\[3bp]
\ytMuteToggle{1in}{11bp}\\[3bp]
\ytRewind{1in}{11bp}\\[3bp]
\ytSelect[\textSize{0}]{eNzrn8-JFSE}{1in}{11bp}\\[6bp]
\ytOpenWeb[\textSize{0}]{1in}{11bp}
\end{minipage}

\newpage

\begin{center}
\begin{minipage}{571bp/2}
\ytRmAnnot[poster=pdfyt_poster,deactivated=pageclose]{YouTube3}{571bp/2}{330bp/2}\\
\ytPlayList{GZ9e3Dy7obA}{\playList}\ytComboListPresets{\textSize{9}}%
\ytComboList{(571bp/2)-1bp-33bp}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}\\[1bp]
{\setlength{\dimen0}{(\linewidth+1bp)/6-1bp}\xdef\ytWidth{\the\dimen0}}%
\ytPlayToggle{\ytWidth}{11bp}\kern1bp\ytStopLoading[\textSize{0}]{\ytWidth}{11bp}\kern1bp
\ytMuteToggle{\ytWidth}{11bp}\kern1bp\ytRewind{\ytWidth}{11bp}\kern1bp
\ytSelect[\textSize{0}]{eNzrn8-JFSE}{\ytWidth}{11bp}\kern1bp
\ytOpenWeb[\textSize{0}\CA{View on Web}]{\ytWidth}{11bp}
\end{minipage}
\end{center}

\end{document}