Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to play audio and video files using PHP API

Featured Replies

  • Newbies

I am a new hand in PHP API. I want to play sound files on the web from container fields (say Sound_A) of filemake database. I only know the use of

echo $fm->getContainerData($_GET['path'])

which displays an image on the web. Does it work on audio or video files as well?

I haven't done it, but I don't see why it wouldn't. If you try it, post back here and let us know how it worked.

  • Author
  • Newbies

Thanks. I followed the tutorial for displaying image using FM PHP as below:

In Display.php, there is on script as below:

<?php if ($record->getField('Raw_Text::RT_Media')) {?> <IMG src="containerBridge.php?path=<?php echo urlencode($record->getField('Image_field')); ?>" width="600" height="400"> <?php } ?>

It calls containerBridge.php with the key script as below:

<?php echo $fm->getContainerData($_GET['path']);?>

It works! If Image_field has value, it will be displayed.

I wonder if I can use the same way to play an audio file as below:

<embed name=EmbedName src="containerBridge.php?path=<?php echo urlencode($record->getField(Audio_field)); ?>" width="600" height="400" showpositioncontrols=”1″ showstatusbar=”1″ controls=”ControlPanel” autostart="1" loop=”1″ playCount=”100″></embed>

If not, how can I get the path of a media file?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.