twilio / twilio-video-app-ios

A collaboration application built with the Twilio Video iOS SDK
Apache License 2.0
248 stars 54 forks source link

Modernize room screen UI with code from live streaming app #189

Closed timrozum closed 2 years ago

timrozum commented 2 years ago

Changes:

  1. Started using SwiftUI and Combine to modernize UI design and simplify code.
  2. Removed the old lobby and room screens and replaced with new screens based on the live streaming app.
  3. Now there is both video grid and focus layouts. Right now the grid just displays the local participant and the most active 5 remote participants. The app will automatically switch to focus layout when there is a presentation track.
  4. All of the video room connect options should be completely unchanged.
  5. There are fewer abstractions now which makes the code easier to understand. The downside is the code is less testable which we are ok with.

These features got removed and I will create tickets to add them back next sprint:

  1. Display recording indicator when the room is being recorded.
  2. Display network quality level for each participant.
  3. Display video track switch off state in UI.
  4. Switch camera button.
  5. Stats screen.
  6. Use deep link to set room name.
  7. Show media capture preview screen before connecting to room.

I will also create a new ticket to remove more old code. I don't think I got it all in this PR.

These ^ should all be relatively simple so I think I can handle them in next sprint.

Also note:

  1. Test coverage was disabled because it was causing issues with SwiftUI previews. I think this is really a CocoaPods issue. I think there are other fixes but I think we should just switch to SPM soon. I confirmed Firebase is now available as a package so no dependencies are holding this up.
  2. Pin participant is a feature the app used to have that I don't think will come back soon. We would have to rethink how it would make sense in new video layouts.
  3. I think soon we will add the ability for the user to manually switch between grid and focus layouts. And if focus layout is selected and there is no presentation track it would just display large video for the dominant speaker.

For video SDK integration see LocalParticipantManager, RemoteParticipantManager, and RoomManager.

https://user-images.githubusercontent.com/1930363/156422272-0e1a5acc-e8a7-42f6-9183-2f0a564fa761.mov