Feel free to download the sample files here.
This video describes how I set this up. It’s shorter, about 35 minutes. As is usual, I make some mistakes along the way.ARVE Error: src mismatch
src in: ?dnt=1
src gen: https://player.vimeo.com/video/290504512?dnt=1Actual comparison
src gen: https://player.vimeo.com/video/290504512
Setting up the FileMaker audio player
There’s another way to work with libraries: our Web Viewer Bridge set up. That’s a free tool you can use. We’ll study it in an upcoming blog and video (more likely a few of those).
The FileMaker Audio player can play an actual audio file that is stored in a container field. The library plays it in the web viewer. The web viewer, however, needs the audio file in base64 encoded form, so we have to base64 encode the file in another field or on the fly.
In the video I use the old FileMaker function Base64Encode. This works, but it places a return character after so many characters. And those characters mess up the audio file. I should have used the new one: Base64EncodeRFC which accepts a parameter in the form of a number telling the function to not insert any return characters.
Once the audio is encoded, it is placed in the Data field and used in the JS_Function field in a function there.
This library does one thing: it plays audio showing that audio’s wave form in a web viewer. It does have a few possibilities. Here are some of the options you can update:
- The color of the wave form
- The color of the progress wave form
- The color of the current-time indicator
- The height of the wave form
- The playback speed
There’s a lot you can do with this.
Additionally, you can add buttons that do more, that control the wave form. In my final example, I added a button to change the playback speed and a slider to adjust the volume. These two are in addition to the standard play/pause.
Try out the FileMaker Audio Player
Give this one a try. Even if you’ve no immediate use for it, it’s worth the time to practice your integration skills.