video-controls

Pause, resume, and switch camera facing during CometChat calls.

31|9|Updated Mar 10, 2023
One-click install
npx skills add https://github.com/cometchat/calls-sdk-ios --skill video-controls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: video-controls
Source: https://github.com/cometchat/calls-sdk-ios/tree/main/skills/video-controls
Command: npx skills add https://github.com/cometchat/calls-sdk-ios --skill video-controls

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Calls apps often need responsive camera controls during an active video session, such as pausing/resuming the camera and switching between front and rear lenses without disrupting the call flow.

Core Features & Use Cases

  • Pause/Resume Camera: Programmatically turn local video off and back on during an ongoing call.
  • Switch Camera Facing: Toggle between front and rear cameras to support different user scenarios.
  • Event-Driven UI Updates: Listen to media events so custom buttons accurately reflect the current camera state.
  • Pre-Session Configuration: Set initial video state and whether built-in UI toggles for video and camera switching should be shown.

Use case: You are building a custom call screen where the user taps a button to mute their video by turning the camera off, then later re-enables video and switches cameras, with the UI reflecting each state change automatically.

Quick Start

Use the video-controls skill to pause and resume the local camera during an active call, switch between front and back cameras, and keep your UI in sync using media event callbacks.

Frequently Asked Questions about video-controls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pause and resume the local camera during an active WebRTC call session on iOS?

To pause and resume the local camera during an active iOS call session, use the CallSession media APIs to call pauseVideo and resumeVideo. This toggles local video off and back on without disrupting the ongoing call flow.

How do I switch between front and rear cameras while in a CometChat call?

Switch between front and rear cameras by invoking the switchCamera method from the CallSession media APIs during an active call. This toggles camera facing to support different user scenarios instantly without dropping the session.

How do I update custom UI buttons to reflect the current camera state during an iOS video call?

Update custom UI buttons to reflect the current camera state during an iOS video call by implementing MediaEventsListener callbacks. These event-driven callbacks ensure your interface accurately reflects real-time media state changes.

Can I configure the initial video state and hide built-in camera toggle buttons before a call starts?

Configure the initial video state and hide built-in camera toggle buttons before a call starts by using SessionSettingsBuilder. This pre-session configuration determines whether built-in UI toggles for video and camera switching are visible.

Do I need specific SDK integration components to implement custom video controls for iOS calling flows?

Implementing custom video controls for iOS calling flows requires SDK integration utilizing CallSession media APIs and MediaEventsListener callbacks. These components provide the interfaces to toggle camera state and manage real-time UI updates.