summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ketcindy/ketmedia.sty
blob: aa6eecac873b63f486fe010c738215f9e7af3c03 (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
\newcommand{\inputsound}[3][90]{
% 20180305 changed
% 20180317 changed
\def\soundbuttona{\color{blue}\small\fbox{\strut$\oplus\triangleright$}}
\def\soundbuttonb{\color{blue}\small\fbox{\strut$\ll$}}
{\unitlength=1pt
\ketcalcwidth[0]{\soundbuttona}
\setcounter{ketpicctrb}{\theketpicctra}
\ketcalcwidth[0]{\soundbuttonb}
\addtocounter{ketpicctrb}{\theketpicctra}
\addtocounter{ketpicctrb}{20}
 
\noindent
\hspace*{#1mm}\hspace{20pt}%
\mediabutton[
mediacommand=#3:playPause,
overface={\soundbuttona}%,
%downface={\color{red}\strut Pause/Pause}%
]{\soundbuttona}%
\mediabutton[
mediacommand=#3:rewind,
overface={\soundbuttonb}
%downface={\color{red}\strut Pause/Pause}%
]{\soundbuttonb}%
\hspace{-\theketpicctrb pt}%
\includemedia[
    label=#3,
    addresource=#2#3.mp3,
    activate=pageopen,
    flashvars={
      source=#2#3.mp3
     &autoPlay=true
    }
%    transparent,
%    passcontext
]{\color{blue}\small\fbox{\Ctab{15pt}{\strut}}}{APlayer.swf}
}}

\newcommand{\inputsoundclick}[3][90]{
% 20180317 added
\def\soundbuttona{\color{blue}\small\fbox{\strut$\oplus\triangleright$}}
\def\soundbuttonb{\color{blue}\small\fbox{\strut$\ll$}}
{\unitlength=1pt
\ketcalcwidth[0]{\soundbuttona}
\setcounter{ketpicctrb}{\theketpicctra}
\ketcalcwidth[0]{\soundbuttonb}
\addtocounter{ketpicctrb}{\theketpicctra}
\addtocounter{ketpicctrb}{20}
 
\noindent
\hspace*{#1mm}\hspace{20pt}%
\mediabutton[
mediacommand=#3:playPause,
overface={\soundbuttona}%,
%downface={\color{red}\strut Pause/Pause}%
]{\soundbuttona}%
\mediabutton[
mediacommand=#3:rewind,
overface={\soundbuttonb}
%downface={\color{red}\strut Pause/Pause}%
]{\soundbuttonb}%
\hspace{-\theketpicctrb pt}%
\includemedia[
    label=#3,
    addresource=#2#3.mp3,
    activate=onclick,
    flashvars={
      source=#2#3.mp3
     &autoPlay=true
    }
%    transparent,
%    passcontext
]{\color{blue}\small\fbox{\Ctab{15pt}{\strut}}}{APlayer.swf}
}}

\newcommand{\inputmovie}[5][90]{
% 20180306 changed
% width,height,dir,name
\def\soundbuttona{\small\fbox{\strut$\oplus\triangleright$}}
\def\soundbuttonb{\small\fbox{\strut$\ll$}}

\hspace*{#1 mm}\mediabutton[
  mediacommand=#5:playPause,
  overface={\color{blue}\soundbuttona},
  downface={\color{red}\soundbuttona}
]{\fbox{\soundbuttona}}
\mediabutton[
  mediacommand=#5:rewind,
  overface={\color{blue}\soundbuttonb},
  downface={\color{red}\soundbuttonb}
]{\fbox{\soundbuttonb}}

\includemedia[
  label=#5,
  width=#2\linewidth,totalheight=#3\linewidth,
  activate=pageopen,
  addresource=#4#5.mp4,
  flashvars={
        source=#4#5.mp4
%        &showloading=never
%        &autoRewind=true
        &autoplay=true
%        &loop=1
%        &buffer=0.2
  }
]{}{VPlayer.swf}

}