Re: Problems with sound
- From: "vMike" <Michael.George@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 May 2005 16:53:02 GMT
"Chris Leffer" <chrisl@xxxxxxxx> wrote in message
news:e9boT$SYFHA.2756@xxxxxxxxxxxxxxxxxxxxxxx
> Hi.
>
> I have a page that plays a .wav file from time to time, when the page
> loads. Some of my customers say that the sound does not play and others
> say that the sound plays very well. All of my customers are using
> Internet Explorer 6.0+ .
> What is the best or correct way to play a sound file from an asp.net
> page? That's the code I am using:
>
> Protected WithEvents plhSound As PlaceHolder
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> Dim embWarning As New HtmlGenericControl("embed")
>
> With embAlerta.Attributes
> .Add("src", "warn.wav")
> .Add("autostart", "true")
> .Add("type", "audio/wav")
> .Add("width", "0")
> .Add("height", "0")
> .Add("volume", "0")
> End With
> plhSound.Controls.Add(embWarning)
>
> End Sub
>
>
> Regards,
> Chris Leffer
>
I use <bgsound id="sound1" runat="server"/> in my page and
Protected sound1 as htmlgenericcontrol
sound1.visible = false
or
sound1.visible = true
sound1.attributes("src") = "somesoundfile.wav"
depending on whether I want it to play or not.
Mike
.
- References:
- Problems with sound
- From: Chris Leffer
- Problems with sound
- Prev by Date: Re: "Back" button on IE, creates a new Page object?
- Next by Date: Re: Keep getting this error when trying to use Web Parts in VS2005 Beta 2. Why?
- Previous by thread: Problems with sound
- Next by thread: Re: Problems with sound
- Index(es):