Dear list,

I have the following sample:

  \setupinteraction
      [state=start]

  \startJSpreamble varia used now
  this.pageNum = 0 ; // start at 0

  function GoToFirstSlide(label) {
  this.pageNum = 0 ;
  var rendition = this.media.getRendition(label) ;
  var player = app.media.openPlayer({
      rendition: rendition,
    });
  }

  function GoToLastSlide(label) {
    this.pageNum = this.numPages ;
  }

  function GoToNextSlide(label) {
      ++this.pageNum ;
  }

  function GoToPreviousSlide(label) {
      --this.pageNum ;
  }

  function SwitchFS() {
    if (app.fs.isFullScreen == true)
      app.fs.isFullScreen = false ;
    else
      app.fs.isFullScreen = true ;
  }
  \stopJSpreamble


  \setuppapersize[A9, landscape]

  \definefontfamily
      [mainface]
      [rm]
      [Latin Modern Sans]

  \definefontfamily
      [mainface]
      [ss]
      [Hans]

  \setupbodyfont
      [mainface, 25pt]

  \setupalign[middle]

  \setupfooter
      [style={\ss}]

  \def\SlideNavigationButtons{%
      \goto{A}[JS(GoToFirstSlide{mainsound})]%
      \goto{K}[JS(GoToPreviousSlide{mainsound})]%
      \goto{L}[JS(GoToNextSlide{mainsound})]%
      \goto{B}[JS(GoToLastSlide{mainsound})]
      \goto{{\ssb Q}}[JS(SwitchFS{})]%
      }

  \setupfootertexts[\SlideNavigationButtons]

  \starttext

    \definerenderingwindow[soundplace]
      [width=0pt, height=0pt]

    \useexternalrendering[mainsound][audio/mp3][sound.mp3][embed=yes]

    \placerenderingwindow[soundplace][mainsound]
  \dorecurse{25}{\null\page}
  \stoptext

I don’t know why I get the following message:

    TypeError: a.doc is undefined

It seems to be caused by "app.media.openPlayer", but the code is copied
from the documentation Adobe released early this year.

Does anyone know what is wrong here or what am I missing?

Many thanks for your help in advance,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to