简体   繁体   English

naudio 音频 stream 到 html / 网页

[英]naudio audio stream to html / webpage

I'm looking for a way to stream microphone input to a HTML/Javascript page.我正在寻找一种将 stream 麦克风输入到 HTML/Javascript 页面的方法。

I've downloaded the naudio project, using the Network Chat demo, able to construct a sender and receiver and live stream audio over HTTP.我已经下载了naudio项目,使用网络聊天演示,能够构建发送器和接收器以及通过 HTTP 构建的实时 stream 音频。

Great伟大的

I'd now like to play this stream in a html audio tag, or, via a client side JS library我现在想在 html 音频标签中播放这个 stream,或者通过客户端 JS 库

eg,例如,

<audio controls>
      <source src="http://127.0.0.1:7080" type="audio/mpeg">
</audio>

Can this approach work via naudio?这种方法可以通过 naudio 工作吗? The above doesn't work.以上不起作用。 I'm not sure if I am missing something small, or, if this approach will not work at all.我不确定我是否遗漏了一些小东西,或者这种方法是否根本不起作用。

Can anyone advise?任何人都可以建议吗?

This wont work with the network chat.这不适用于网络聊天。 The audio stream requests chunks and downloads them.音频 stream 请求块并下载它们。 Was just being lazy只是懒惰

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM