Week 10: Video Chat + Reels App

Goals this week

1. Quick revision of concepts

2. Video chat App

3.  using UIKit vs SDK
4.  Next Steps -> 

How Video chat works?

1. peer to peer

2. no server involved (except for connection signaling)

3. using WebRTC APIs

4. Exchange SDPs

5. Exchange Network info

WebRTC = Web Real-Time Communication

Sockets -> Web Sockets

Socket vs Server

5001

website.com:3001/messag1

Client1

website.com:3001/messag2

Client2

Why no Server in WebRTC for Video chat?

Socket -> TCP -> Knock knock joke -> data is always sent and received -> slow acknowledgment

WebRTC -> UDP -> no guarantee all data will be receiving -> fast

Are you available?

Yes I am

Give me packages

Packages Download

WebRTC 

3 ways :

 

1. Scratch -> WebRTC (Websocket) UDP

2. SDK (Software Dev Kit) Android 14 & iOS

3. UIKit to build

TCP -> Normal -> It guarantees everything will be downloaded

UDP ->Streaming -> maybe will not be downloading. Faster & less lags

SDK vs UIKit

Feature Agora Video SDK Agora UIKit
Type Software development kit (SDK) Pre-built user interface (UI) kit
Focus Full control over real-time engagement features Quick and easy integration of engagement features
Features Video calling, live streaming, screen sharing, recording, chat, messaging, and more All video SDK features + pre-built UI elements
Customization Highly customizable Can customize UI within existing framework
Complexity More complex to integrate, requires development expertise Easier to integrate, minimal coding required
Control over UI Developers build the entire UI from scratch Developers customize components within UIKit framework
Development time Longer development time Faster development time
Suitable for Building custom engagement apps, complex functionality Adding engagement features to existing apps, simple functionality
Pricing Free with limited features, paid plans for additional features Free with limited features, paid plans for additional features and support

func joinBtn(){

SDK.createWebRtcConnection()

SDK.join()

}

1. Fragment

2. Create UI

3. Create Button for Join

1 Line 

UiKit

SDK

Reels Clone

1. Recyler View -> Revision

2. Retrofit 

3. PagerSnapHelper -> RecyclerView

4. VideoView

RV2 -> Videos

RV1 -> Stories

VideoView

ImageView

1. VideosAdapter 

2. UI for VIdeos to be shown

3. Download videos using Retrofit

4. MainActivity -> call retrofit to download data

-> recyclerView.setData

 

https://raw.githubusercontent.com/sumit2607/API/master/VideoDummyApi/dummy_data.json

MVVM-> 

Dagger - Hilt -> Dependency Injection

Retrofit

Made with Slides.com