Forum Stats

  • 3,768,628 Users
  • 2,252,822 Discussions


Playing Audio - Forms 12c new features



  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,892 Employee

    Here is how you get to the Forms configuration (assuming a single instance).

    '1. Go to http://server:7001/em (or whichever port you chose for Fusion Middleware Control) and login.

    '2. On the top left side, click on the hamburger button to expand the side panel. The tool tip will say "Target Navigation"

    '3. Expand the "Forms" node by clicking on the arrow to the left of "Forms".

    '4. Click on "forms1"

    '5. Then click on Web Configuration

    This is all explained in the Forms Deployment Guide (referred to as Working with Oracle Forms in v12.2.1.4)

  • buggleboy007
    buggleboy007 Member Posts: 285 Bronze Badge

    Thanks a lot once again Michael. I did follow the above steps and was able to view the UI of FMC. I did see the audio.jar entry in the archive text box.

  • buggleboy007
    buggleboy007 Member Posts: 285 Bronze Badge

    @Michael Ferrante-Oracle : A quick question regarding Audio:

    A) Let's say that my application consists of 300 Forms. Of those 300 Forms, I wish to have Audio play back capability in about 75 Forms. This means I will have to record 75 Audio files of .MP3 format.

    B) Then ensure that in those Forms I have to add the code: PLAY_AUDIO(<<NAME OF THE MP3 FILE>>);

    I guess my question is, can the names of those Audio Files be made dynamic or may be retrieved from a table rather than hard coding each audio file? Based on what I have noticed in the white paper + our conversation in this thread it appears to me that the name of the audio file(PLAY_AUDIO('1.MP3');) has to be mentioned in the Form(s) that needs the audio. It cannot be done dynamically.

    Is my understanding correct?

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,892 Employee

    Your understanding is incorrect.

    Nearly any value in Forms code can be created dynamically.

    In your case though, I do have a question. 75 audio files? Really? Although I'm very happy that you are finding this new feature useful, I am wondering what you might be doing with it...

    So to your question. Yes, you can store the audio file names in a table. To get them you might do something like this (exact code may need to be adapted - this is just an example):

      v_audioName varchar2(100);
      Select filename Into v_audioName From someTable Where <some condition>;
      If v_audioName Is Not Null Then
        Play_Audio (v_audioName);
        Message ('Audio file not found.');
      End if;

    There are other ways to do it, but again, this was just an example. You can also access the audio files from a URL.

  • buggleboy007
    buggleboy007 Member Posts: 285 Bronze Badge

    75 was just an example/hypothetical question. More than one for sure but do not know yet how many we require. I believe this is to make complex Forms (like Purchase Order, Material Allocation) have an audio playback so that the user knows the need/nature of the Form.

    Your example code was something on my mind too. It's good to know that it can be done dynamically.

    So concluding there are three ways to make it work:

    a) using the file name in PLAY_AUDIO built in

    b) passing a URL link in PLAY_AUDIO built in

    c) and then your example above

    Any other way that you think I have missed?

  • buggleboy007
    buggleboy007 Member Posts: 285 Bronze Badge


    My DBA at work put the 'audio.jar' file in FORMS/JAVA folder and applied the necessary changes. Yet when I launch the required Form which has PLAY_AUDIO('po.mp3') code, I still do not hear any audio playback.

    Is there a reason why? (i can get it to work on my home computer, Windows based using the same JAR file but not on office environment Linux based ).

    Here's how the office environment is set up:

    a) I log in to the office network remotely (via VPN due to work from home policy).

    b) Open the required Form and then add the necessary code and compile it successfully on Linux environment.

    c) Then open the executable but cannot hear any audio playback when I press 'Start' on the Form.

    Following screenshots should give you an idea if they are set up correctly or incorrectly.

    Please do let me know your thoughts on the above.


  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,892 Employee

    As I mentioned several times, the Java Console output will answer many of your troubleshooting questions. At minimum, the Console will give you a good hint as to why it's failing.

    If you are running with Java Web Start, it's failing because archive entries must be entered in "extensions.jnlp" and not the ARCHIVE parameter. Editing this file breaks the rules. To edit it, stop WLS_FORMS and open the file in a text editor. In the file you will see an example entry (commented out) for "jacob.jar". Create a new entry below that example using the same syntax (but without the comments). Replace jacob.jar with your jar name.

    Once the file has been updated, restart the managed server.

    If you are not using Web Start and are seeing this problem, I recommend reviewing the Java Console. It may be necessary to increase the logging level to Level 2. To do this, start the form then open the Java Console (or change the settings to make it open automatically). Once open, use the mouse and click in the Console text area to move focus to it. Then press the number "2" on the keyboard (above the letter Q). Do not use the number pad, as this will not work. If you did it correctly, you should see something like this:

    Now push the button or whatever it is you have to play the audio. Then note the output in the console.

  • buggleboy007
    buggleboy007 Member Posts: 285 Bronze Badge

    We are using Java Web Start. So based on what you have mentioned I will have to ask the DBA now to make changes in extensions.jnlp(ensuring that the audio.jar file is mentioned in extensions.jnlp and not in archive parameter).

    Unfortunately the Java Console does not give any error or hint (at the very least) for me to troubleshoot it independently.

    Anyways I will try what you have mentioned and then see the outcome.

  • buggleboy007
    buggleboy007 Member Posts: 285 Bronze Badge

    Finally Michael, based on what you mentioned(as we use JWS), my DBA implemented those steps and I was able to get the AUDIO to work. I was able to hear the contents of the audio file on our office environment.

    Thanks a lot for your assistance and guiding me all the way.

    I will let you and others know separately the new features of Forms 12c that we have implemented.

    Merci beaucoup!