3 Replies Latest reply on Jun 18, 2015 9:15 AM by philmodjunk

    How do I use the "GetAVPlayerAttribute(attributeName)" function?

    mendocinotim

      Title

      How do I use the "GetAVPlayerAttribute(attributeName)" function?

      Post

       I have read through the description in FM 14's documentation, here..
      http://www.filemaker.com/help/14/fmp/en/html/func_ref1.32.187.html

      The problem:

      I have a container field that uses a file reference to point to an audio file.
      I am using GetContainerAttribute ( sourceField ; attributeName ) to determine the total duration.
      And I want to trigger a script when the track reaches the end.

      I tried using GetAVPlayerAttribute ( attributeName ) but it doesn't return any values.
      Can someone tell me how this is supposed to work?
      Is the 
      GetAVPlayerAttribute function the right way to accomplish this end?

      Any suggestions?

        • 1. Re: How do I use the "GetAVPlayerAttribute(attributeName)" function?
          philmodjunk

          Are you using FileMaker Pro or FileMaker Go? The help article states "This function is used in FileMaker GO..."

          Exactly how are you trying to use this function?

          If you have already gotten the playing time, you might just use InstallOnTimerScript to set up a script to run when a specified number of seconds have elapsed.

          To keep such a timer from running a 2nd, 3rd, etc time on the specified interval, have the script run by the timer include another InstallOnTimerScript step with no parameters specified. This will clear the timer and keep it from running the same script again.

          • 2. Re: How do I use the "GetAVPlayerAttribute(attributeName)" function?
            mendocinotim

            I am using Filemaker 14 advanced - but (for now) am testing in filemaker (not from Go) only - is the GetAVPlayerAttribute only for FilemakerGo? I assume so from your response. I worry that the InstallOnTimerScript method could fail when users press pause on the container player. Although I suppose I could write some kind of function to handle this.. 

            I was really hoping there's a simpler method to make it auto-sequence to the next track when the current track in done playing. Initially I thought I would be able to check the current player's remaining time on a track using GetAVPlayerAttribute ( "position" ) value and compare that against the GetContainerAttribute ( sourceField ; "duration" ) to trigger a script to go to the next track. But if that won't be possible, how would you ( i.e., anyone? ) accomplish this?

            • 3. Re: How do I use the "GetAVPlayerAttribute(attributeName)" function?
              philmodjunk

              Good point as I hadn't considered what happens if the user pauses the play back.

              I'm just quoting a help entry to you for a function that I haven't used. I don't think it works anywhere but in GO for the simple reason that in Pro, the media player used can be quite different from computer to computer where in GO, it's always the same app.

              I don't really see how you can do this effectively in FileMaker Pro if users can pause the playback. There might be a way to do that if the right plug in is available, but I wouldn't  bet on it.