Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(iOS): Support system media control #220

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Conversation

XMLHexagram
Copy link
Collaborator

@XMLHexagram XMLHexagram commented Jan 2, 2025

Summary by Sourcery

Add support for system media controls on iOS.

New Features:

  • Enable system media controls on iOS.

Tests:

  • Update tests to reflect changes.

@XMLHexagram XMLHexagram marked this pull request as ready for review January 2, 2025 08:57
Copy link

sourcery-ai bot commented Jan 2, 2025

Reviewer's Guide by Sourcery

This pull request introduces support for system media controls on iOS. It updates the dependencies and platform-specific code to integrate with the iOS system UI for media playback control.

Sequence diagram for iOS media control interaction

sequenceDiagram
    participant User as User
    participant System as iOS System Controls
    participant App as Rune Player
    participant Audio as Audio Session

    Note over App: Initialize
    App->>Audio: initAudioSession()
    Audio-->>App: Session Active

    User->>System: Interact with media controls
    System->>App: Send control event
    App->>App: Handle media control
    App-->>System: Update playback state
Loading

File-Level Changes

Change Details Files
Updated dependencies to support iOS media controls
  • Updated the souvlaki dependency to use a specific git branch for iOS compatibility
playback/Cargo.toml
Enabled iOS media control integration
  • Modified platform-specific code to enable system media controls on iOS
  • Removed conditional compilation blocks that excluded iOS from media control features
  • Updated error handling in iOS AppDelegate
  • Added platform configuration for iOS
playback/src/lib.rs
playback/src/controller.rs
ios/Runner/AppDelegate.swift
playback/src/dummy_souvlaki.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@XMLHexagram XMLHexagram requested a review from Losses January 2, 2025 08:57
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @XMLHexagram - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider using an official versioned release of souvlaki instead of a git dependency to ensure build reproducibility and security
  • The PR description mentions test updates but no test changes are visible in the diff. Please include the relevant test coverage changes
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dosubot dosubot bot added the R - enhancement New feature or request label Jan 2, 2025
@Losses Losses merged commit 88a2139 into master Jan 2, 2025
1 of 2 checks passed
@Losses Losses deleted the feat_ios_media_control branch January 2, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R - enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants