1 of 1 people found this helpful
Thank you for your post.
An Interactive container field uses the OS WebKit (like a Web Viewer) to play audio/video. Under Mac OS X, the WebKit is modeled after Safari (Windows is Internet Explorer). The progress bar does not display in Safari as you can see in the following demo:
Thanks TSGal for your hint.
What I find strange is that Safari’s WebKit is offering a control for the progress-bar but FMP15 is not using it for its containers. When I open your horse-sound-example with a script-trigger from FMP15 Safari opens its own browser-window and plays the sound. And in the Safari Window I get that progress control which allows me to pick any point as start for the sound.
tell application "Finder"
open document file "horse.mp3" of folder "Tests FileMaker" of disk "Drive1“ using application file "safari.app" of folder "Applications" of startup disk
Anyway - your response helped me to find a 90% work-around:
If you use a web viewer instead a container you get the missing progress bar.
And the URL for Webaddress can be derived using this function
GetContainerAttribute ( Containerfield-Name ; "externalfiles" ):
/Volumes/Drive1/Tests FileMaker/ horse.mp3
10% of the solution yet to be found:
whenever switching to a layout with such a web viewer your horse is welcoming me. Adding records for a cow, donkey, lion …“ would allow me to produce the sound of a zoo. In other words - switching records does not stop any sound. If a sound has been played once reentering that record would not start it again. I suspect, that this could be blocked by using the new mute-feature in Safari which allows to stop the sound by clicking on the respective tab. Or I try to mute via an apple scipt … if possible.
... or you can give me a hint how to prevent an auto-run of the web viewer
so - I finally could also resolve that 10%-problem.
As long as no URL (the file-path) is available, the WebViewer remains invisible. Once a valid path is entered in the respective field, you cannot change it to another path-information (I first tried to replace it with a path to a dummy.mp3 with 1 second of white noise in order to trap the auto-play).
However you can simply use the „clear“-command for that field. After the clear you have to deactivate this filed to make the WebViewer invisible again. For that purpose I defined a field „dummyParking“ which does not show in the layout.
To sum it up. Visible are the buttons „Play“ and „Done“ each linked to a script.
For Play = set field to the local path using GetContainerAttribute("externalfiles“)
… the WebViewer becomes visible with all controls needed.
For Done = clear field with the local path … then go to field "dummyParking" … the WebViewer is hidden again