Skip to content

SwiftUI video player

Compare
Choose a tag to compare
@swiftuiux swiftuiux released this 10 Aug 11:23
· 139 commits to main since this release

New Video Playback Commands

1. Brightness Adjustment

  • Command: brightness(Float)
  • Description: Adjusts the brightness of the video playback. The brightness parameter accepts a Float value that ranges from -1.0 (darkest) to 1.0 (brightest). Input values outside this range are automatically adjusted to the closest valid value.

2. Contrast Adjustment

  • Command: contrast(Float)
  • Description: Adjusts the contrast of the video playback. The contrast parameter can range from 0.0 (no contrast) to 4.0 (high contrast). Values beyond this range will be clamped to ensure proper contrast levels.

3. Filter Application

  • Command: filter(CIFilter, clear: Bool)
  • Description: Applies a specified Core Image filter to the video. The clear parameter allows users to either clear all existing filters (if true) before applying the new filter or to add the new filter to the current stack (if false).

4. Remove All Filters

  • Command: removeAllFilters
  • Description: Removes all filters currently applied to the video, returning the playback to its original state.

5. Audio Track Selection

  • Command: audioTrack(String)
  • Description: Selects a specific audio track for the video playback based on its language code. For example, passing "en" will switch the audio track to English.