ButterflyNetwork / daily-ios-demo

A 1 to 1 video chat app using the Daily Client SDK for iOS

Home Page:https://www.daily.co/client-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notes about demos for Butterfly:

There are two branches in this repo:

butterfly/two-sources

This branch demonstrates transmitting two video sources from one host to another. To demonstrate:

  1. devices A & B run the demo
  2. A & B join the same room (both should be broadcasting camera video by default)
  3. A enables "custom video" (🎬) Input and Publishing

Expected: after a moment or two, B will see both video feeds side by side

butterfly/data-pipe

This branch demonstrates transmitting "commands" over a "data pipe"

  1. devices A & B run the demo
  2. A & B join the same room
  3. A taps "hello" (👋) button

Expected: B's console should display receipt of the command NOTE: Can enable round-trip benchmarking by setting CallViewController's isBenchmarking = true.

A video chat app using the Daily Client SDK for iOS

This demo is meant to showcase a basic video chat app that uses Daily's native iOS SDK mobile library.

Prerequisites

How the demo works

In the demo app, a user must enter a URL for a Daily Room, then press Join. The app will find the meeting room and join the call. The app initializes a Call Client, which keeps track of important information about the meeting, like other participants (including their audio and video tracks) and the things they do on the call (e.g. muting their mic or leaving), and provides methods for interacting with the meeting. The app leverages this object to update its state accordingly, and to carry out user actions like muting or changing track-publishing statuses. When the user leaves the meeting room, the Call Client remains, but their call has ended. The Call Client is destroyed when the application exits.

When testing or running this demo, you'll likely use a room you've manually created for calls. A production application will likely need to use the Daily REST API to create rooms on the fly for your users, which necessitates the use of a sensitive Daily API key. You likely don't want to embed this key in a production app. We recommend running a web server and keeping sensitive things like API keys there instead.

Please note this project is designed to work with rooms that have privacy set to public. If you are hardcoding a room URL, please bear in mind that token creation, pre-authorization and knock-for-access have not been implemented here or in the Daily Client SDK for iOS, meaning you may not be able to join non-public meeting rooms using this demo for now.

Running locally

  1. Clone this repository locally, i.e.: git clone git@github.com:daily-demos/daily-ios-demo.git
  2. Open the DailyDemo.xcodeproj in Xcode.
  3. Tell Xcode to update its Package Dependencies by clicking File -> Packages -> Update to Latest Package Versions.
  4. Build the project for either a simulator (which will not have webcam access) or a device.
  5. Run the project on a simulator or on your device.
  6. Connect to the room URL you are testing, and to see it work, connect again either in another simulator, on another device, or directly using a web browser. Careful of mic feedback! You might want to mute one or both side's audio if they're near each other.

Contributing and feedback

Let us know how experimenting with this demo goes! Feel free to open an Issue, or reach us any time at help@daily.co.

About

A 1 to 1 video chat app using the Daily Client SDK for iOS

https://www.daily.co/client-sdk

License:BSD 2-Clause "Simplified" License


Languages

Language:Swift 99.9%Language:C 0.1%