August 20, 201213 yr 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?
August 20, 201213 yr 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.
August 21, 201213 yr 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