NetTalk Central

Author Topic: wav  (Read 2443 times)

willie53

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
wav
« on: April 06, 2012, 05:36:10 AM »
Does anyone have example they are williing to share of playing a wav file using the "OTHER BUTTON" on a browse?


Thanks

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: wav
« Reply #1 on: April 06, 2012, 05:56:44 AM »
Bear in mind Willie that browsers do not, by default, "play" wav files. You have to interact with a plugin to do that - typically the Quicktime plugin.

Cheers
Bruce

willie53

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
Re: wav
« Reply #2 on: April 20, 2012, 11:05:50 AM »
I've tried to do that, using some jquery plugins, but between playing the wav and copying the correct one to a folder under the webfolder, i can't get them to work correctly together..
When I use the client side other button, the plugin never works, but the copy does..
seems like some embed point or action is missing.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: wav
« Reply #3 on: April 27, 2012, 03:33:39 AM »
The web has much to say about audio on the web, and frankly overall it's hard to do what you want on all browsers.

Because you want it from a browse, ideally you don't want to "pre-load" all the Wav files, as that will take a lot of time. This cuts out some of the options.

I have got it to work though, using HTML5 on those browsers that support the HTML <audio> tag. You don't give much context for your situation, but if you have control (or at least some input) into which browser is used, this may be a solution for you.

I've tested and it works on the following;
Firefox 12, Chrome 18, Opera 11.6

In IE9 it works, but only if the media plugin has been installed.

Safari doesn't seem to support it yet at all.

I haven't tested on mobile devices yet.

These instructions will require build 6.28 or later.

Your wav files need to be in, or below the web folder. Like all static files they are limited to being served from the web folder (or beneath it). If you wish to serve the wav files from elsewhere, then example the File Download example.

The settings for the Other button in the browse are as follows;

Properties:
Type : Button
Text : 'Play'
Name 'play_btn'

OnClick:
onClick: [JavaScript] :'ntPlay(''' & clip(fil:wav) & ''');'

where fil:wav is the name of the wav file.

cheers
Bruce





willie53

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
Re: wav
« Reply #4 on: April 30, 2012, 07:55:25 AM »
I did get this to work as you stated in your email, but I'm going to need some more interactive, the user needs to pause, rewind etc.. also I am using IE 9.

How would you use the HTML5 audio tag?

I'm also looking into using some other Jquery plugins, hopefully I can get these to work without major headaches.

Many thanks for taking the time to reply to my post.