Wal-Wal-2 Posted March 16, 2020 Share Posted March 16, 2020 I have php code that uses mp3 audio files stored in a database for the user to listen to. The page loads and the audio controls work and the files play on a desktop and laptop just fine. When trying to play a file on an android or IPhone, when you press the play (or any other control) nothing happens. It acts like the page is static. There is a home button on the webpage and it works so I know the page is interactive. Below is the code. I would appreciate any help. Thank you. <?php $sermons = $database->select("sermon","*");; foreach( $sermons as $sermon ) { $audio_file = 'http://xxxxxxx.com/sermons/'.$sermon['file_name']; $player = "<audio id='sermon_'$sermon[id] controls> <source src='$audio_file' type='audio/mpeg'> <source src='$audio_file' type='audio/mp3'> Your browser does not support the audio element. </audio>"; echo "<tr> <td>$sermon[sermon_date]</td> <td>$sermon[title]</td> <td>$sermon[speaker]</td> <td>$player</td> </tr>"; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.