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

Picture in Picture mode is destroying immediately in iOS #2379

Open
1 of 2 tasks
subhadiprudra opened this issue Oct 29, 2024 · 0 comments
Open
1 of 2 tasks

Picture in Picture mode is destroying immediately in iOS #2379

subhadiprudra opened this issue Oct 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@subhadiprudra
Copy link

subhadiprudra commented Oct 29, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I am playing one video from YouTube and minimising the app Picture in Picture mode is destroying immediately and background audio is getting paused.

Expected Behavior

When we minimise the app PIP mode should not destroy

Steps with code example to reproduce

ScreenRecording_10-29-2024.20-38-46_1.mov

[

](url)

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
// TRY THIS: Try changing the color here to a specific color (to
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
// change color while the other colors stay the same.
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: InAppWebView(
key: webViewKey,
initialUrlRequest: URLRequest(url: WebUri('https://youtube.com/')),
initialSettings: InAppWebViewSettings(
allowsPictureInPictureMediaPlayback: true,
allowBackgroundAudioPlaying: true),
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
),
// This trailing comma makes auto-formatting nicer for build methods.
);
}

Stacktrace/Logs

Getting the below error in Xcode as soon as I am minimising from the app.

-[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error Invalid call of -[AVPlayerViewController (0x1594c3000) _transitionFromFullScreenAnimated:interactive:completionHandler:]!

Flutter version

Flutter (Channel main, 3.27.0-1.0.pre.278, on macOS 15.0

Operating System, Device-specific and/or Tool

iOS 17+

Plugin version

v6.1.5

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@subhadiprudra subhadiprudra added the bug Something isn't working label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant