×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    21

    how to play audio files in WRT

    I was searching for a possibility to do text to speech in wrt. but it has been confirmed that there is no such feature in wrt. So what I want to do is play a small audio file. Either .wav or mp3. I want this audio file to be played when a function is called. Is this possible in wrt. please let me know. i searched through the wiki articles, there was no reference for playing audio in wrt.

  2. #2
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Akron Ohio USA
    Posts
    229

    Re: how to play audio files in WRT

    the most reliable way to do this is to use openURL to launch the music player to play the sound.

    Otherwise you might try embedding a flash player that plays the sound but you might run into memory limitations depending upon how large the sound is and how many flash players you embed.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    9

    Re: how to play audio files in WRT

    OpenURL method
    openURL to launch the music player to play the sound

    What if I don't want to launch the music player to play the sound?

    I want to attach a UI Button, press the button to play the sound. Play many short sound on the same screen without quitting the app to launch music player.

    How do you play audio on WRT?

  4. #4
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Bangalore
    Posts
    52

    Re: how to play audio files in WRT

    Hi

    I am trying to play audio files in wrt... If anybody could please tell me what url I should pass to the method, if I have put my audio files in winscw\c\data\sounds\digital

    Cheers
    Jayanth

  5. #5
    Nokia Developer Expert
    Join Date
    Jan 2010
    Posts
    3

    Question Re: how to play audio files in WRT

    I also would like to know how to play short sound files in a WRT widged. And I do not mean playing MP3 songs or anything, i mean like alarm and notification sounds in my application.

    So how could I play sound files from JavaScript code? And in what format should the sound files be?

    Thanks in advance!

    -J

  6. #6
    Nokia Developer Expert
    Join Date
    Jan 2010
    Posts
    3

    Lightbulb Re: how to play audio files in WRT

    I actually found a way to play .wav files:

    function playSound(filename) {
    embed = document.createElement("embed");
    embed.setAttribute("src", filename);
    embed.setAttribute("hidden", true);
    embed.setAttribute("autostart", true);
    document.body.appendChild(embed);
    }

    I found the above solution here: http://bytes.com/topic/javascript/in...cript-function

    Its just that I think maybe this is not the most efficient way to play (possibly often recurring) sounds because here the .wav file is loaded to memory again and again just before they are played. So how could I read some .wav files to memory when my page initializes, and then play the sounds from there without loading the files again?

Similar Threads

  1. Do not play audio properly using MobiFLV open source code.
    By SymbianTH in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2009-08-19, 15:10
  2. To play raw audio data file
    By pawans in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-12-11, 11:38
  3. How to read the stored audio files from memory card?
    By katy2 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-03-29, 08:01
  4. play audio files
    By khalandar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-03-07, 05:58
  5. Load and play audio file
    By itenel in forum Symbian C++
    Replies: 4
    Last Post: 2004-05-17, 07:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •