pinkfish / flutter_rtmppublisher

Publisher to rtmp using the camera plugin as a basis to do all the basic camera/record management.
BSD 3-Clause "New" or "Revised" License
95 stars 121 forks source link

Video streaming not working on iPhone #16

Open graperaisin1 opened 4 years ago

graperaisin1 commented 4 years ago

Running the sample on a physical iPhone 6S, and the video streaming does not work. I am trying to stream to an RTMPS URL online and the livestream simply does not appear. No errors appear in the console.

Android works just fine.

Can anyone advise?

graperaisin1 commented 4 years ago

Xcode error logs generated when starting a video stream on iPhone:

Event{type: Name(rawValue: "rtmpStatus"),bubbles: false,data: Optional(Optional(["data": Optional([]), "level": Optional("status"), "code": Optional("NetConnection.Connect.Success"), "description": Optional("Connection succeeded"), "objectEncoding": Optional(0.0)])),target: Optional(HaishinKit.RTMPConnection)}
Event{type: Name(rawValue: "rtmpStatus"),bubbles: false,data: Optional(Optional(["code": Optional("NetStream.Publish.Failed"), "clientid": Optional("ASAICiss"), "description": Optional("Error publishing stream: code=9, msg=ERR, BAD_AUTH, URL=Domain: live-api-s.facebook.com, url: /rtmp/<stream_id>, sendPublishError=true"), "level": Optional("error")])),target: Optional(HaishinKit.RTMPConnection)}
2020-25-06 13:01:24.978 [Warn] [com.haishinkit.HaishinKit] [RTMPConnection.swift:380] on(status:) > 
Event{type: Name(rawValue: "rtmpStatus"),bubbles: false,data: Optional(["description": Optional(""), "level": Optional("status"), "code": Optional("NetConnection.Connect.Closed")]),target: Optional(HaishinKit.RTMPConnection)}

Starting the same exact stream works fine on Android.

Piyushhhhh commented 3 years ago

Try to wrap your url in quote for ios example :- url = Platform.isIOS ? '"${url}"' : url;

pinkfish commented 3 years ago

Is this with the code directly out of the repro? Or from the pub repro? I made changes to update to null safety, but not checked it works correctly on iOS yet ;). Which is why it is not published.

On Wed, 19 May 2021 at 03:16, Piyush @.***> wrote:

Try to wrap your url in quote for ios example :- url = Platform.isIOS ? '"${url}"' : url;

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pinkfish/flutter_rtmppublisher/issues/16#issuecomment-843959428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATOMMJL3ZBRQXDIP3ICMZLTOOFYJANCNFSM4OHSCG7A .

Piyushhhhh commented 3 years ago

Also @pinkfish videostreaming is not working on ios same code works for android . Doesn’t throw any errors or warning get streaming stats just return videoframe and audio frame null

Piyushhhhh commented 3 years ago

Is this with the code directly out of the repro? Or from the pub repro? I made changes to update to null safety, but not checked it works correctly on iOS yet ;). Which is why it is not published.

This is not a null safety bug in ios(swift) sometimes you need to wrap your rtmp url in a additional quote or else it will return bad auth error

pinkfish commented 3 years ago

I did change the rtmp streaming endpoint name recently. I turned off the old one ;)

On Wed, 19 May 2021 at 11:36, Piyush @.***> wrote:

Is this with the code directly out of the repro? Or from the pub repro? I made changes to update to null safety, but not checked it works correctly on iOS yet ;). Which is why it is not published. … <#m7176071784634534910>

This is not a null safety bug in ios(swift) sometimes you need to wrap your rtmp url in a additional quote or else it will return bad auth error

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pinkfish/flutter_rtmppublisher/issues/16#issuecomment-844366544, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATOMMJ3C7MULL7UYUMDNP3TOQAKXANCNFSM4OHSCG7A .