Skip to content

BibleAudio is muted by the iOS silent switch until a MediaPlayer has played #134

Description

@davidbelk

Before You Submit

Issue Type

Functional bug

Issue Description

Rock:BibleAudio produces no sound while the iPhone's silent switch (or Action button silent mode) is on. The control behaves as if it is playing: the icon bound to BibleAudio.IsPlaying flips from volume-up to pause, but nothing is heard. Turning silent mode off makes the same control play normally.

Rock:MediaPlayer on the same device plays video with sound in silent mode. After any Rock:MediaPlayer has played in the current app session, Rock:BibleAudio becomes audible in silent mode too, and stays audible until the app is fully closed (swiped away in the app switcher).

This reproduces in the Rock Core app pointed at our server, as well as in our own app (Venture Church (MS), iOS App Store version 11.0.0).

It looks like BibleAudio does not set the iOS audio session category to AVAudioSessionCategoryPlayback before it starts, and only works when MediaPlayer has already set it.

Expected: tapping play on Rock:BibleAudio plays the reading regardless of the silent switch, matching Rock:MediaPlayer and standard iOS behaviour for user-started playback.

Impact: many members keep their phones on silent, so for them our daily Bible reading plan audio looks broken from a fresh launch. Before we found the cause it read as "audio only works after watching the devotional video."

Related: #71 (Bible Audio Control Issues, closed with no resolution noted) reported iOS Bible audio stopping when the app is backgrounded. Background playback and ignoring the silent switch are both governed by the same Playback audio session category, so the two may share one fix.

Reproduction Steps

  1. On iOS, fully close the app (swipe it away in the app switcher).
  2. Turn silent mode on.
  3. Open the app and navigate to a page with the XAML below.
  4. Tap the play icon. Actual: the icon changes to pause, but there is no audio.
  5. Without closing the app, open any page with a Rock:MediaPlayer video and play it for a few seconds.
  6. Return to the Bible audio page and tap play. Actual: audio now plays with sound, and keeps working for the rest of the session.
  7. Fully close the app and repeat steps 3 and 4: silent again.

With silent mode off, step 4 plays every time.

Frequency

Always reproducible

Screenshots or Videos

When I tried to screen record with audio, it began playing the scripture so I was unable to get a screen recording of the behavior.

Reproduction XAML

<!-- Content block. On our page the reference comes from Lava (e.g. "2 Thessalonians 3" or "Amos 1-5"); a literal reference is used here. There is one Rock:BibleAudio on the page and no other media controls. -->
<StackLayout Padding="24" Spacing="16">
    <Rock:BibleAudio Reference="2 Thessalonians 3"
                     HorizontalOptions="Center"
                     VerticalOptions="Center">
        <Rock:Icon StyleClass="text-primary"
                   IconFamily="FontAwesome"
                   Padding="16, 12, 16, 12"
                   FontSize="18"
                   IconClass="{Binding BibleAudio.IsPlaying, Converter={Rock:BooleanValueConverter True=pause, False=volume-up}}"
                   HorizontalOptions="CenterAndExpand"
                   Command="{Binding BibleAudio.PlayOrPauseAudio}" />
    </Rock:BibleAudio>
    <Rock:BibleReader Reference="2 Thessalonians 3"
                      ShowReference="false" />
</StackLayout>

Platform(s) Affected

iOS only

Rock Mobile Shell Version

19.2.0 and 19.4.0 on the core shell

Git Hash

2879cc3

Rock Core Version

v19.4.4

Device(s) and OS Version(s)

iPhone 16 Pro iOS 27.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions