1

Topic: IIS the Sound is played only the server. How to transfer to the client?

Hello, skilled developers of web applications. I ask the help in a solution of a problem.
Itself always wrote on VB6 and a little VB.NET WinForms. And here, it was necessary ASP.NET+VB.NET in the form of a website.
The task, on web page to launch playing of several short mp3 files in a cycle, and on another to synthesize the text in a sound (Text-To-Speech).
I tried to transfer old VB6 the code on web rails here in such type:
For playing mp3:

Private sub PlayFile (FilePath As String)
On Error Resume Next
PlayFile = mciExecute ("play" AND FilePath)
Pause (CInt (4000))
End sub

For text scoring:

Sub SayWithTTS (ByRef sText As String, iVoiceNumber As Int16)
Dim objGetVoice As Object = Activator. CreateInstance (Type. GetTypeFromProgID ("SPEECH.SpVoice"))
objGetVoice. Voice = objGetVoice. GetVoices. Item (iVoiceNumber)
objGetVoice. Speak (sText)
End Sub

In a Visual Studio at debugging it at me played all and spoke, as it is necessary to me. Created the installer, installed "MySite" on IIS on the same computer inside Defaul Web Site.
I come on the same computer on http://localhost/MySite/MyPage.aspx - too all plays and TTS sounds the text.
Problem in that when I to the same page
http://192.168.1.105/MySite/MyPage.aspx
In the house network I am connected from other computer (Linux) or a pad () all sounds are played and are audible only on the computer where there is a web server. And on clients silence. Tables, inscriptions I see. Button "Play" I push and I listen to a sound on the computer with the server. And in a pad silence :-(
How to me to direct a sound to a pad (or other client) which came on page and launched the above-stated code?
Thanks.

2

Re: IIS the Sound is played only the server. How to transfer to the client?

Malyav wrote:

on web page to launch playing

well you after all on the server launched, why should play the client?
Rake up textbooks on html5/javascript/css/http and smoke as all this canoe works. After that the understanding comes where to search for answers to the questions.

3

Re: IIS the Sound is played only the server. How to transfer to the client?

Malyav;
https://developer.mozilla.org/en-US/doc … ment/audio

4

Re: IIS the Sound is played only the server. How to transfer to the client?

Thanks for , it helped me.  the question, in Page_Load learned to create the table with a separate player <audio> for each file in a separate line (put a file with a screenshot).
It is possible to hear to each foreign word separately pushing a player in the field "Player". But I should launch serial playing of all these words after button click to "Play" in the bottom of the table.
Whether probably it to make without usage of scripts in file PlayFile.aspx and with usage only CodeFile = "PlayFile.aspx.vb"?
Here in this processing procedure of event

Protected Sub cmdPlay_Click (sender As Object, e As EventArgs) Handles cmdPlay. Click
' to lose all files one after another in a cycle
End Sub

In what side to dig?

5

Re: IIS the Sound is played only the server. How to transfer to the client?

big-duke wrote:

.... But I should launch serial playing of all these words after button click to "Play" in the bottom of the table.
Whether probably it to make without usage of scripts in file PlayFile.aspx and with usage only CodeFile = "PlayFile.aspx.vb"?
Here in this processing procedure of event

Protected Sub cmdPlay_Click (sender As Object, e As EventArgs) Handles cmdPlay. Click
' to lose all files one after another in a cycle
End Sub

In what side to dig?

You continue to think, as developer  of applications. Yet do not understand that pray not to those Gods, quits nothing.
Users of your future hand-made article will use BROWSERS! IE, FF, Chrome, Safari... Heard about the such? And so browsers heard nothing about VB.net, C# etc. Start to pray to other icons Get other textbooks.

6

Re: IIS the Sound is played only the server. How to transfer to the client?

It is all WebForms it is guilty
To begin learning at once with MVC - and these problems does not arise