NetTalk Central

Author Topic: Make a smartphone beep  (Read 3116 times)

ViggoPoulsen

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Make a smartphone beep
« on: July 16, 2012, 03:46:08 AM »
Hi
When the customer has pressed a button on the smartphone, I would like the smartphone sound a beep, play a note or in another way let the user know that something is happening. It this possible ?

Best regards
Viggo Poulsen

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Make a smartphone beep
« Reply #1 on: July 16, 2012, 04:37:07 AM »
Hi Viggo,

HTML5 has a tag for audio see http://www.w3schools.com/html5/tag_audio.asp.

I can make my iPhones and Android phones beep (or play audio files) using it.

Regards
Bill

ViggoPoulsen

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Make a smartphone beep
« Reply #2 on: July 16, 2012, 06:12:42 AM »
Hi Bill

Thank you, it looks promising.

Best regards
Viggo Poulsen

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11197
    • View Profile

ViggoPoulsen

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Make a smartphone beep
« Reply #4 on: July 19, 2012, 01:13:10 AM »
Hi Bruce

In that thread you use this :
onClick: [JavaScript] :'ntPlay(''' & clip(fil:wav) & ''');'

I can not find any reference to ntplay (neither in nettalk or in google). Is it a nettalk or a jave command ?

Best regards
Viggo Poulsen

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Make a smartphone beep
« Reply #5 on: July 19, 2012, 01:56:22 AM »
ntPlay is in netweb.js (last 4 lines). Present in NT6.37 and NT6.33 not present in NT6.18. It uses the HTML5 audio function.

ViggoPoulsen

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Make a smartphone beep
« Reply #6 on: July 19, 2012, 03:35:04 AM »
Thank you.
A slight change in the syntax made it work for me:
'ntPlay(<39>beep.wav<39>);'

Best regards
Viggo Poulsen