I have an application that runs a wave file using the sound player class. However, when I publish the application in IIS, the file will not play. To use SoundPlayer class I have added a reference windows.dll, can it interfere?
Public Zero PlaySound () {try {while {1 == 1} {list & lt; String & gt; Different music = GetMusicFile.Distinct (). ToList (); For (Int i = 0; I & lt; Different Music.Count; i ++) {player.SoundLocation = Specific Music [i]; Player.Play (); Thread Sleep (GetMusicDuration [i] * 1000); Player.Stop (); } Player.Dispose (); }} Hold (exception e) {//log.LogTxt (e.ToString ()); }} Can anyone help me? Thx!
There is no way to use C # in ASP.NET to play sound on client side (Except for the syllabus of the course) you need to use client-side technology like JavaScript.
For example:
& lt; Audio control height = "100" width = "100" & gt; & Lt; Source src = "mare.mp33" type = "audio / mpeg" & gt; & Lt; Source src = "horse.gag" type = "audio / og" & gt; & Lt; Embed height = "50" width = "100" src = "horse.m.p.p." & Gt; & Lt; / Audio & gt;
No comments:
Post a Comment