Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Play-During doesn't play sound 1

Status
Not open for further replies.

mtdew

Technical User
Dec 9, 2007
77
US
I have a simple program that allows kids to follow-the-dots. At the end the photo appears and I would like a train whistle to sound. I have the following code which works great for the image to appear:

.circle {
background: url('start.png');
play-during: url('train.wav') auto;
width: 24px;
height: 24px;
text-align: center;

display:compact;
position:absolute;
cursor: none;
color: transparent;
z-index: 100;
}

But play-during does not cause the sound effect. I have tried mp3 and wav files. I have also tried cue-after. Any suggestions?
 
Play-during exists as a CSS property only in an 'aural' media type. Meaning, if you are experiencing website through a user agent that narrates the contents of the website (such as a device for blind), then the play-during is used. In all other user agents (media types), it's ignored.

I think you'll have to resort to JS for this.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Because "play-during" is NOT supported in visual browsers as it is an "Aural" media device property.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top