使用webrtc和wowza发布实时流

问题描述 投票:0回答:2

我已经为webrtc预览了一份副本。在我的流媒体服务器上,我已经设置了streamlock并完成了vhost.xml文件中的配置。我无法从wowza提供的html文件中发布流。

我收到错误:Refused to set unsafe header “Connection”。我已经为端口443添加了hostport。

ssl webrtc wowza
2个回答
0
投票

使用流锁jks文件在自己的wowza中托管html文件

通过HTTPS托管示例HTML

在您自己的使用HTTPS保护的Web服务器上托管HTML示例。要安装,请将html文件夹的内容复制到Web服务器。通过执行以下操作,使用内置的HTTPProviderSimpleWebServer HTTP提供程序在Wowza Streaming Engine上托管HTML示例:

编辑[install-dir] /conf/VHost.xml并将以下HostPort条目添加到HostPortList(将[streamlock-filename]和[streamlock-password]替换为StreamLock文件名和密码):

<HostPort>
  <Name>Admin WebRTC</Name>
  <Type>Admin</Type>
  <ProcessorCount>${com.wowza.wms.TuningAuto}</ProcessorCount>
  <IpAddress>*</IpAddress>
  <Port>9443</Port>
  <HTTPIdent2Response></HTTPIdent2Response>
  <SSLConfig>
    <KeyStorePath>${com.wowza.wms.context.VHostConfigHome}/conf/[streamlock-filename].jks</KeyStorePath>
    <KeyStorePassword>[streamlock-password]</KeyStorePassword>
    <KeyStoreType>JKS</KeyStoreType>
    <DomainToKeyStoreMapPath></DomainToKeyStoreMapPath>
    <SSLProtocol>TLS</SSLProtocol>
    <Algorithm>SunX509</Algorithm>
    <CipherSuites></CipherSuites>
    <Protocols></Protocols>
  </SSLConfig>
  <SocketConfiguration>
    <ReuseAddress>true</ReuseAddress>
    <ReceiveBufferSize>16000</ReceiveBufferSize>
    <ReadBufferSize>16000</ReadBufferSize>
    <SendBufferSize>16000</SendBufferSize>
    <KeepAlive>true</KeepAlive>
    <AcceptorBackLog>100</AcceptorBackLog>
  </SocketConfiguration>
  <HTTPStreamerAdapterIDs></HTTPStreamerAdapterIDs>
  <HTTPProviders>
    <HTTPProvider>
      <BaseClass>com.wowza.wms.http.HTTPProviderSimpleWebServer</BaseClass>
      <RequestFilters>webrtc*</RequestFilters>
      <AuthenticationMethod>none</AuthenticationMethod>
    </HTTPProvider>
  </HTTPProviders>
</HostPort>

创建文件夹[install-dir] / htdocs / webrtc并将html文件夹的内容复制到此文件夹中。使用Wowza Streaming Engine托管示例文件时,请使用以下URL访问它们:https://[streamlock-domain-name]:9443/webrtc/[path-to-example-file]

例如,如果StreamLock域名为123456.streamlock.net,则发布HTML示例的URL将为:https://123456.streamloack.net:9443/webrtc/publish/index.html

此外,如果它在aws EC2服务器中打开安全组中的端口

TCP - 9443,443

UDP - 6970 - 65535


0
投票

“拒绝设置不安全的标题”连接“,不是问题。使用后面的包,这是注释掉的。

请注释掉以下内容以删除调试控制台中的“不安全标头连接”错误

//http.setRequestHeader("Content-Length", params.length);
//http.setRequestHeader("Connection", "close");

我建议使用WebRTC软件包附带的自述文件仔细检查您的配置。

© www.soinside.com 2019 - 2024. All rights reserved.