[Tex/LaTex] How to insert a file audio with play and stop in pdf LaTex

audiomedia9pdftex

I wrote this code:

\documentclass{book}
\usepackage{media9,graphicx}
\usepackage{microtype}

\begin{document}
    \frontmatter
    \tableofcontents
    \mainmatter


    \chapter{Allegati}


        Lezione 1: \includemedia[
        addresource=Phil Collins - You'll Be In My Heart with Lyrics.mp3,
        transparent,
        flashvars={
            source= Phil Collins - You'll Be In My Heart with Lyrics.mp3
            &autoPlay=true
        },
        ]{\includegraphics[height=3ex]{sound-937654_960_720.png}}{APlayer.swf}

\end{document}

but i can't stop it during the playing. How can i stop the file audio during its playing?

Best Answer

You are using package media9 and its APlayer.swf app. It offers a number of ways to play/pause/stop playback (see Pg. 20 of the documentation):

Pause:

  • press mouse button over the widget and move the mouse out while keeping the button pressed
  • press the Space bar on the keyboard

Stop: (=pause+rewind)

  • press the Home / Pos1 key on the keyboard

Play:

  • click on the widget
  • press the Space bar on the keyboard

Seek:

  • arrow keys , (player needs focus; click widget if necessary)

The same for the video player VPlayer.swf.

Related Question