Jump to content

Play sound once per session or not at all when users turn it off


Lios

Recommended Posts

Hello all,

 

I hope you can help me.

 

I am looking for a piece of code to do the following: When a user enters my site, a welcome sound should be played (currently in mp3, but can be any format). This should only be heard once per session (so not when users go through the menu or back to the homepage). Furthermore, users needs to be able to turn it off for that session,so they can stop it before the music ends, and they should be able to turn it off forever, so that it won't play when they revisit the site ever again.

 

I bet it's possible with sessions and cookies, but i'm too much of a noob programmer to do so. Can anyone help me out?

Link to comment
Share on other sites

Don't we wish everyone was that easy?  In the real world, IPs change all the time.  It is unreliable and I wouldn't use it to do anything.

 

I agree with chantown. IP seems to be the best way to go because since we got our Cable Modem from Rogers our IP has changed only one.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.