我已经为 webrtc 拍摄了一份预览版。在我的流媒体服务器上,我设置了流锁并完成了 vhost.xml 文件中的配置。我无法从 wowza 提供的 html 文件发布流。
我收到错误:Refused to set unsafe header “Connection”
。我已经为端口 443 添加了主机端口。
最佳答案
通过使用流锁 jks 文件在 wowza 中托管 html 文件
通过 HTTPS 托管示例 HTML
在您自己的使用 HTTPS 保护的网络服务器上托管 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
关于ssl - 使用 webrtc 和 wowza 发布直播流,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39016704/