Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWaudio file selection when running
#1
Using Delphi 11.2 and Intraweb 15.2.66 and the iwaudio component. Starting from the audio demo in the version 14 demo files, I can get a browser screen that correctly plays a file that I enter during development. That is, in the component editor I enter "alert.ogg" in the AudioFile>Filename field, that file is in the wwwroot directory, and pressing the play button on the component or clicking a button with the action of "IWaudio1.play;" - the file plays and all is well.
What I want to do is have a couple other buttons that change the file name (e.g. "IWaudio1.AudioFile.Filename := 'laugh.ogg';") and now when the play button is clicked, that file will play.
It appears that the file name doesn't change and it always plays the design time file. How do get the file to change so I can play a selected file? Thank you.

Edit - found the problem: the code to change the file name should be in OnClcik and not OnAsyncClick.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)