Giter Site home page Giter Site logo

Comments (16)

cedricfung avatar cedricfung commented on May 30, 2024

Why PushKit for WEBRTC_AUDIO_CANCEL?

from ios-app.

wuyuehyang avatar wuyuehyang commented on May 30, 2024

Why PushKit for WEBRTC_AUDIO_CANCEL?

Stop receiver from ringing after the caller choose to cancel

from ios-app.

cedricfung avatar cedricfung commented on May 30, 2024

After the receiver received OFFER PushKit, they should have connected to WebSocket. So any further notifications should use the WebSocket connection. If in rare condition, the WebSocket connection is lost during ringing, we should always have a timeout to dismiss the ringing interface.

from ios-app.

cedricfung avatar cedricfung commented on May 30, 2024

Ideally all our operations are done after WebSocket connected, so I don't think SDP is needed in the notification payload.

from ios-app.

jadeydi avatar jadeydi commented on May 30, 2024

Does MessageCategoryKrakenInvite need pushkit?

from ios-app.

crossle avatar crossle commented on May 30, 2024

Does MessageCategoryKrakenInvite need pushkit?

YES.

from ios-app.

wuyuehyang avatar wuyuehyang commented on May 30, 2024

According to console log:
Apps receving VoIP pushes must post an incoming call (via CallKit or IncomingCallNotifications) in the same run loop as pushRegistry:didReceiveIncomingPushWithPayload:forType:[withCompletionHandler:] without delay.

Exchanging WebRTC descriptions through WebSocket connection seems to be incapable of satisfying PushKit restrictions in iOS 13. To report a new incoming call and implement functionality in system calling interface (e.g. decline by callee), the offer message's id, caller's user_id and caller's fullname, at least these 3 values must be provided in the push payload. Furthermore, it would be easier for front-end developing if full BlazeMessageData along with caller's User structure could be provided in the payload.

from ios-app.

cedricfung avatar cedricfung commented on May 30, 2024

When user accepts or declines the call, should the app need to connect the WebSocket and send blaze message?

from ios-app.

wuyuehyang avatar wuyuehyang commented on May 30, 2024

When user accepts or declines the call, should the app need to connect the WebSocket and send blaze message?

Yes, it can be performed with VoIP background mode.

from ios-app.

cedricfung avatar cedricfung commented on May 30, 2024

I think I get it, whenever connect the WebSocket, the app need to wait all the pending messages until the OFFER message to get the SDP info, until then the app can't send any messages to answer the call.

If the SDP info included in the PushKit payload, then the app would be able to send ANSWER or DECLINE message as soon as WebSocket connected, no need to wait all pending messages to get the SDP.

from ios-app.

wuyuehyang avatar wuyuehyang commented on May 30, 2024

The main point of new VoIP restriction is reporting incoming call to CallKit when PushKit notification is received, with no delay. That requires some key information(two ids and a name) to be provided in the payload.
As long as the restriction is satisfied, app won't be complaining about it, the underlying data exchange can be performed by any means. A full BlazeMessageData is only for easier implementation.

from ios-app.

cedricfung avatar cedricfung commented on May 30, 2024

Maybe it won't help a lot for speeding up the WebRTC connection just with the SDP in payload. Because after callee ANSWER with the SDP, it still needs to wait all pending messages to receive further ICE messages to establish the connection. Then it's better to not including those messages in PushKit payload.

That said, we should include the full caller view in PushKit payload, and I think the message id is already included?

Otherwise, if it was possible to speed up the PeerConnection establishment, without waiting pending messages, we could include SDP in Pushkit payload.

@crossle

from ios-app.

crossle avatar crossle commented on May 30, 2024

If you didn’t put caller information in your notification’s payload, call the reportCall(with:updated:) method of your app's provider object to update the calling interface. You can call that method at any time to update calls. For example, call it after your app fetches updated caller information from your VoIP server.

https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit

from ios-app.

cedricfung avatar cedricfung commented on May 30, 2024

It's OK to include caller's information to present the CallKit UI instantly for better user experience.

The question is whether to include SDP, would it help with faster PeerConnection.

from ios-app.

wuyuehyang avatar wuyuehyang commented on May 30, 2024

If you didn’t put caller information in your notification’s payload, call the reportCall(with:updated:) method of your app's provider object to update the calling interface. You can call that method at any time to update calls. For example, call it after your app fetches updated caller information from your VoIP server.

It's OK to update username after, but the call's UUID and caller's user_id is required for unique constraint of a call.

from ios-app.

over140 avatar over140 commented on May 30, 2024

#503

from ios-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.