一周前,我注册了Wowza流云,并创建了实时流RTMP。一切都作为默认设置(使用goCoderSDK,使用cloud.wowza)。并且确实有效。
但是,如果我以相同的方式从另一台主机创建实时流,它将无法正常工作。
这是代码,
并且代码太长,所以很短
var goCoder: WowzaGoCoder!
var goCoderConfig:WowzaConfig!
override func viewDidLoad() {
super.viewDidLoad()
let goCoderLicensingError = WowzaGoCoder.registerLicenseKey("GOSK-xxxx-xxxx-xxxx-xxxx-xxxx")
if (goCoderLicensingError != nil) {
print(goCoderLicensingError?.localizedDescription)
} else {
self.goCoder = WowzaGoCoder.sharedInstance()
}
if (self.goCoder != nil) {
self.goCoder?.cameraView = self.view
self.goCoder?.cameraPreview?.start()
}
self.goCoderConfig = self.goCoder.config
// url
self.goCoderConfig.hostAddress = "t-rtmp.mstone.online"
self.goCoderConfig.portNumber = 1935
// key
self.goCoderConfig.applicationName = "live"
self.goCoderConfig.streamName = "YF7yqiLRhUgyEg6htMKb"
// self.goCoderConfig.username = "client47800"
// self.goCoderConfig.password = "0fcc329c"
goCoder.config = self.goCoderConfig
@IBAction func playliveButtonAction(_ sender: Any) {
self.goCoder.startStreaming(self)
}
并且,这里有错误,请帮助我
Wowza GoCoder仅与Wowza流引擎或Wowza流云一起使用。它使用专有协议“ wowz”与服务器通信。