Method 'callAS' undefined

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

jozef
User
Posts: 4
Joined: Tue Jul 11, 2023 8:13 pm

Method 'callAS' undefined

Post by jozef »

Hello,

I am trying to add multiple buttons into a PDF. These buttons are intended to control the playback of rich media. I have managed to add an audio file, and I can activate (start playback) and deactivate (stop playback) this rich media using a button. However, I am encountering difficulties when trying to achieve more complex functions, such as pausing or moving the playback location to a specific time offset.

According to the JavaScript Acrobat API Reference manual, these functionalities should be achievable. There is a method, 'callAS', which is supposedly designed for this purpose. However, it does not seem to be working for me. Is this method not supported? If that's the case, are there any alternative methods to accomplish these two tasks - pausing and moving the playback time?

This starts playback:

Code: Select all

this.getAnnotsRichMedia(0)[0].activated=true;
This stops playback:

Code: Select all

this.getAnnotsRichMedia(0)[0].activated=false;
None of these work:

Code: Select all

this.getAnnotsRichMedia(0)[0].callAS("multimedia_play");
this.getAnnotsRichMedia(0)[0].callAS("multimedia_pause");
this.getAnnotsRichMedia(0)[0].callAS("multimedia_seek", time);
(Using PDF-XChange Pro 10.0.1.371)

Thank you
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Method 'callAS' undefined

Post by Tracker Supp-Stefan »

Hello jozef,

We support a huge percentage of the JS API in general, however there are some parts there we are not yet at 100%. I suspect these RichMedia controls are one such place. I will ask our devs who work on the JS support to take a look and advise.

Kind regards,
Stefan
jozef
User
Posts: 4
Joined: Tue Jul 11, 2023 8:13 pm

Re: Method 'callAS' undefined

Post by jozef »

Thank you, Stefan. Looking forward to the devs' response.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Method 'callAS' undefined

Post by Tracker Supp-Stefan »

Hello jozef,

I've passed it along and am still awaiting a reply! As soon as I have any news - I will post again here!

Kind regards,
Stefan
jozef
User
Posts: 4
Joined: Tue Jul 11, 2023 8:13 pm

Re: Method 'callAS' undefined

Post by jozef »

Sorry, is there any update? Thank you.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Method 'callAS' undefined

Post by Tracker Supp-Stefan »

Hello jozef,

I've just asked our devs once again for an update! Hope to have some further info for you a bit later today!

Kind regards,
Stefan
jozef
User
Posts: 4
Joined: Tue Jul 11, 2023 8:13 pm

Re: Method 'callAS' undefined

Post by jozef »

Any news?
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: Method 'callAS' undefined

Post by Ivan - Tracker Software »

Implemented in 10.1.1

P.S. Please note this method was designed to be used with Adobe's build media player based on Flash. As Flash is in the history already, Adobe Acrobat no longer supports the callAS, it just does nothing.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.