![](https://secure.gravatar.com/avatar/a993c14015494e9568ca53d73d916b91.jpg?s=120&d=mm&r=g)
On Sun Aug 8, 2021 at 8:22 PM CEST, Pablo Rodriguez via ntg-context wrote:
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.
Is there a newer document than "JavaScript for Acrobat API Reference" (May 2015)? Anyways, I thought that the culprit is that you only specify the rendition (what to play) and not screen (where to play): function GoToFirstSlide(label) { this.pageNum = 0 ; var rendition = this.media.getRendition(label) ; +var screen = this.media.getAnnots({ nPage: 0})[0]; var player = app.media.openPlayer({ rendition: rendition, + annot: screen, }); } But as it turns out, while the screen query succesfully returns an object, the rendition query returns null. The PDF 1.7 standard specifies that the name (/N) of Rendition PDF object should be Unicode, but that doesn't seem to make it work either, as does deleting the name of the media clip (which was the same). (But I now get "Invalid arguments" error for the "app.media.openPlayer" call, which is kind of expected.) Can you confirm, that "rendition" is null on your side as well? console.println(rendition); console.println(screen); console.show(); Michal Vlasák