Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
42ffe17
Don't force save the picked/taken image to the gallery
NicolaVerbeeck Nov 17, 2021
08f723d
Merge pull request #2 from flutter/main
ikbendewilliam Jul 13, 2022
e7921c2
Merge branch 'master' into source
jorre127 Jul 13, 2022
d319e04
Merge pull request #3 from icapps/source
jorre127 Jul 13, 2022
b54f049
Merge branch 'flutter:main' into master
vanlooverenkoen Aug 16, 2022
4a34420
Merge branch 'flutter:main' into master
vanlooverenkoen Aug 17, 2022
826b995
#60048 Added ios pip support
vanlooverenkoen Aug 17, 2022
8e15600
Updated pubspec
vanlooverenkoen Aug 17, 2022
78be5cf
Removed development team & updated bundle identifier
vanlooverenkoen Aug 17, 2022
5d91352
Updated the pr feedback
vanlooverenkoen Aug 18, 2022
5f7281a
Dependency overrides
vanlooverenkoen Aug 18, 2022
c38e3d3
Added iOS UI tests for the PiP
vanlooverenkoen Aug 18, 2022
f0e4820
Fixed some dart tests
vanlooverenkoen Aug 18, 2022
567e146
FIxed incorrect import
vanlooverenkoen Aug 18, 2022
77287c1
Fixed a dart test where the to string was updated but not fixed in test
vanlooverenkoen Aug 18, 2022
5ca97ca
Fixed formatting
vanlooverenkoen Aug 18, 2022
6309b2f
Revert "Fixed formatting"
vanlooverenkoen Aug 18, 2022
db3eb7d
Fixed the ios formatting
vanlooverenkoen Aug 18, 2022
3a4d91e
Updated android gradle plugin
vanlooverenkoen Aug 18, 2022
f8a3ed6
Check if the PIPUIView is availabel after starting PiP
vanlooverenkoen Aug 19, 2022
3328e52
Fixed pr comments
vanlooverenkoen Aug 19, 2022
17a580e
Fixed pr comments
vanlooverenkoen Aug 19, 2022
3cbfd50
Added extra tests to check if starting is set.
vanlooverenkoen Aug 19, 2022
a9317da
Update the player layer behaviour.
vanlooverenkoen Aug 19, 2022
6572321
Added support to enable or disable automaticly start pip when the app…
vanlooverenkoen Aug 19, 2022
82912b4
Moved to a oneliner
vanlooverenkoen Aug 19, 2022
e4582ec
Merge branch 'main' into feature/ios-pip
vanlooverenkoen Aug 25, 2022
2e2c31d
Fixed the README comments
vanlooverenkoen Sep 9, 2022
63b5bd8
Updated readme
vanlooverenkoen Sep 9, 2022
5c0da92
Fixed pr comments
vanlooverenkoen Sep 9, 2022
071893d
Update the project file
vanlooverenkoen Sep 9, 2022
fd0e9cd
Moved the api to a rect
vanlooverenkoen Sep 9, 2022
2af7230
Removed unwanted enabledVideo value
vanlooverenkoen Sep 9, 2022
f2ee1a4
Updated the isPictureInPicture supported method
vanlooverenkoen Sep 9, 2022
1047384
Fixed pr comments in the switch case
vanlooverenkoen Sep 9, 2022
f9ec3f5
Removed unwanted info.plist items
vanlooverenkoen Sep 9, 2022
5927554
Fixed test
vanlooverenkoen Sep 9, 2022
620c179
Make sure the tests compile
vanlooverenkoen Sep 9, 2022
de5d58a
Updated the boolean arguments
vanlooverenkoen Sep 9, 2022
5fd2bcb
Updated the UI tests to check if pip is supported or not
vanlooverenkoen Sep 9, 2022
3cc7213
Fixed a typo
vanlooverenkoen Sep 9, 2022
ff67016
Fixed typo & made it clear what the switch does
vanlooverenkoen Sep 9, 2022
f34b8b4
Pr feedback
vanlooverenkoen Sep 9, 2022
0c2d632
Added extra documentation
vanlooverenkoen Sep 9, 2022
16b2c0f
Removed the web package
vanlooverenkoen Sep 9, 2022
bab27ed
Fixed pr feedback
vanlooverenkoen Sep 9, 2022
a829a14
Fixed formatting
vanlooverenkoen Sep 9, 2022
85c77e7
Fixed pr comments
vanlooverenkoen Sep 9, 2022
640db39
Merge branch 'flutter:main' into master
vanlooverenkoen Sep 9, 2022
ed675e3
Merge branch 'master' into feature/ios-pip
vanlooverenkoen Sep 9, 2022
7eddf97
Fixed the merge conflicts
vanlooverenkoen Sep 9, 2022
0bc160a
Update ImagePickerDelegate.java
vanlooverenkoen Sep 9, 2022
db8a9b2
Fixed the web pubspec
vanlooverenkoen Sep 9, 2022
699ea6f
Revert "Update ImagePickerDelegate.java"
vanlooverenkoen Sep 9, 2022
2a217d5
Revert "Fixed the web pubspec"
vanlooverenkoen Sep 9, 2022
e621157
Removed link to web
vanlooverenkoen Sep 9, 2022
31b6a9f
Update ImagePickerDelegate.java
vanlooverenkoen Sep 9, 2022
0ba1b21
Trigger build
vanlooverenkoen Sep 9, 2022
c45a2c2
Merge branch 'feature/ios-pip' of github.com:icapps/plugins into feat…
vanlooverenkoen Sep 9, 2022
f188b5f
Fixed formatting
vanlooverenkoen Sep 9, 2022
892aac0
Merge branch 'flutter:main' into master
vanlooverenkoen Sep 26, 2022
c841ad4
Merge branch 'master' into feature/ios-pip
vanlooverenkoen Sep 26, 2022
36333f6
Refactorred some of the api's and fixed pr comments.
vanlooverenkoen Sep 26, 2022
d07cf9c
Cleanup pip to picture in picture
vanlooverenkoen Sep 26, 2022
abe022b
Fixed tests
vanlooverenkoen Sep 26, 2022
66b5ff1
Merge branch 'flutter:main' into master
vanlooverenkoen Oct 5, 2022
467b85e
Fixed merge conflicts
vanlooverenkoen Oct 5, 2022
e9bdfd5
Fixed a comment about the api start/stop
vanlooverenkoen Oct 5, 2022
faed7b8
Fixed comment about the pipUI view test that should be hidden
vanlooverenkoen Oct 5, 2022
3fb924b
Fixed check if buttons are hidden.
vanlooverenkoen Oct 5, 2022
90f993a
Fixed pr comments
vanlooverenkoen Oct 5, 2022
a901313
Merge branch 'main' into feature/ios-pip
vanlooverenkoen Jan 4, 2023
83edcef
Fixed comments
vanlooverenkoen Jan 5, 2023
2b8b565
Updated the gif
vanlooverenkoen Jan 5, 2023
c6f81b7
Fixed pr comments
vanlooverenkoen Jan 18, 2023
6f66373
Fixed formatting
vanlooverenkoen Jan 18, 2023
cc639b2
Fixed compile issue
vanlooverenkoen Jan 18, 2023
23defa3
Merge branch 'main' into feature/ios-pip
vanlooverenkoen Jan 28, 2023
eaaaac2
Merge branch 'flutter:main' into master
vanlooverenkoen Feb 10, 2023
de162e8
Merge branch 'master' into feature/ios-pip
vanlooverenkoen Feb 10, 2023
326c187
Updated the video_player_platfom_interface
vanlooverenkoen Feb 10, 2023
96c788a
Test if this works? It doesn't work on my machine
vanlooverenkoen Feb 10, 2023
565012b
Fixed pr build
vanlooverenkoen Feb 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup pip to picture in picture
  • Loading branch information
vanlooverenkoen committed Sep 26, 2022
commit d07cf9cf66f1d268ba3e255747b3b63ab473482e
25 changes: 16 additions & 9 deletions packages/video_player/video_player/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,15 @@ class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
future: _controller.isPictureInPictureSupported(),
builder: (BuildContext context, AsyncSnapshot<bool> snapshot) =>
Text(snapshot.data ?? false
? 'PiP is supported'
: 'PiP is not supported'),
? 'Picture in picture is supported'
: 'Picture in picture is not supported'),
),
Row(
children: <Widget>[
const SizedBox(width: 16),
const Expanded(
child: Text('Start PiP automaticly when going to background'),
child: Text(
'Start picture in picture automatically when going to background'),
),
Switch(
value: _enableStartPictureInPictureAutomaticallyFromInline,
Expand All @@ -268,8 +270,12 @@ class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
_enableStartPictureInPictureAutomaticallyFromInline =
newValue;
});
_controller.setAutomaticallyStartPictureInPicture(
enableStartPictureInPictureAutomaticallyFromInline:
_enableStartPictureInPictureAutomaticallyFromInline);
},
),
const SizedBox(width: 16),
],
),
MaterialButton(
Expand All @@ -290,14 +296,15 @@ class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
),
);
},
child: const Text('Prepare'),
child: const Text('Set picture in picture overlay rect'),
),
MaterialButton(
color: Colors.blue,
onPressed: () =>
_controller.setPictureInPicture(!_controller.value.isPipActive),
child:
Text(_controller.value.isPipActive ? 'Stop PiP' : 'Start PiP'),
onPressed: () => _controller.setPictureInPicture(
!_controller.value.isPictureInPictureActive),
child: Text(_controller.value.isPictureInPictureActive
? 'Stop picture in picture'
: 'Start picture in picture'),
),
Container(
padding: const EdgeInsets.all(20),
Expand All @@ -309,7 +316,7 @@ class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
children: <Widget>[
VideoPlayer(_controller),
ClosedCaption(text: _controller.value.caption.text),
if (_controller.value.isPipActive) ...<Widget>[
if (_controller.value.isPictureInPictureActive) ...<Widget>[
Container(color: Colors.white),
Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down
25 changes: 13 additions & 12 deletions packages/video_player/video_player/lib/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class VideoPlayerValue {
this.isPlaying = false,
this.isLooping = false,
this.isBuffering = false,
this.isPipActive = false,
this.isPictureInPictureActive = false,
this.volume = 1.0,
this.playbackSpeed = 1.0,
this.rotationCorrection = 0,
Expand Down Expand Up @@ -107,7 +107,7 @@ class VideoPlayerValue {
final double playbackSpeed;

/// True if picture in picture is currently active.
final bool isPipActive;
final bool isPictureInPictureActive;

/// A description of the error if present.
///
Expand Down Expand Up @@ -157,7 +157,7 @@ class VideoPlayerValue {
bool? isPlaying,
bool? isLooping,
bool? isBuffering,
bool? isPipActive,
bool? isPictureInPictureActive,
double? volume,
double? playbackSpeed,
int? rotationCorrection,
Expand All @@ -174,7 +174,8 @@ class VideoPlayerValue {
isPlaying: isPlaying ?? this.isPlaying,
isLooping: isLooping ?? this.isLooping,
isBuffering: isBuffering ?? this.isBuffering,
isPipActive: isPipActive ?? this.isPipActive,
isPictureInPictureActive:
isPictureInPictureActive ?? this.isPictureInPictureActive,
volume: volume ?? this.volume,
playbackSpeed: playbackSpeed ?? this.playbackSpeed,
rotationCorrection: rotationCorrection ?? this.rotationCorrection,
Expand All @@ -197,7 +198,7 @@ class VideoPlayerValue {
'isPlaying: $isPlaying, '
'isLooping: $isLooping, '
'isBuffering: $isBuffering, '
'isPipActive: $isPipActive, '
'isPictureInPictureActive: $isPictureInPictureActive, '
'volume: $volume, '
'playbackSpeed: $playbackSpeed, '
'errorDescription: $errorDescription)';
Expand Down Expand Up @@ -407,11 +408,11 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
case VideoEventType.bufferingEnd:
value = value.copyWith(isBuffering: false);
break;
case VideoEventType.startingPiP:
value = value.copyWith(isPipActive: true);
case VideoEventType.startingPictureInPicture:
value = value.copyWith(isPictureInPictureActive: true);
break;
case VideoEventType.stoppedPiP:
value = value.copyWith(isPipActive: false);
case VideoEventType.stoppedPictureInPicture:
value = value.copyWith(isPictureInPictureActive: false);
break;
case VideoEventType.unknown:
break;
Expand Down Expand Up @@ -744,7 +745,7 @@ class _VideoAppLifeCycleObserver extends Object with WidgetsBindingObserver {
_VideoAppLifeCycleObserver(this._controller);

bool _wasPlayingBeforePause = false;
bool _showingPip = false;
bool _isPictureInPictureActive = false;
final VideoPlayerController _controller;

void initialize() {
Expand All @@ -756,8 +757,8 @@ class _VideoAppLifeCycleObserver extends Object with WidgetsBindingObserver {
switch (state) {
case AppLifecycleState.paused:
_wasPlayingBeforePause = _controller.value.isPlaying;
_showingPip = _controller.value.isPipActive;
if (!_showingPip) {
_isPictureInPictureActive = _controller.value.isPictureInPictureActive;
if (!_isPictureInPictureActive) {
_controller.pause();
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ void main() {
'isPlaying: true, '
'isLooping: true, '
'isBuffering: true, '
'isPipActive: false, '
'isPictureInPictureActive: false, '
'volume: 0.5, '
'playbackSpeed: 1.5, '
'errorDescription: null)');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ class MiniController extends ValueNotifier<VideoPlayerValue> {
case VideoEventType.bufferingEnd:
value = value.copyWith(isBuffering: false);
break;
case VideoEventType.startingPiP:
case VideoEventType.stoppedPiP:
case VideoEventType.startingPictureInPicture:
case VideoEventType.stoppedPictureInPicture:
case VideoEventType.unknown:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
),
MaterialButton(
color: Colors.blue,
onPressed: () =>
_controller.setPictureInPicture(!_controller.value.isPipActive),
child: Text(_controller.value.isPipActive
onPressed: () => _controller.setPictureInPicture(
!_controller.value.isPictureInPictureActive),
child: Text(_controller.value.isPictureInPictureActive
? 'Stop picture in picture'
: 'Start picture in picture'),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class VideoPlayerValue {
this.isInitialized = false,
this.isPlaying = false,
this.isBuffering = false,
this.isPipActive = false,
this.isPictureInPictureActive = false,
this.playbackSpeed = 1.0,
this.errorDescription,
});
Expand Down Expand Up @@ -72,7 +72,7 @@ class VideoPlayerValue {
final double playbackSpeed;

/// True if picture in picture is currently active.
final bool isPipActive;
final bool isPictureInPictureActive;

/// A description of the error if present.
///
Expand Down Expand Up @@ -116,7 +116,7 @@ class VideoPlayerValue {
bool? isInitialized,
bool? isPlaying,
bool? isBuffering,
bool? isPipActive,
bool? isPictureInPictureActive,
double? playbackSpeed,
String? errorDescription,
}) {
Expand All @@ -128,7 +128,8 @@ class VideoPlayerValue {
isInitialized: isInitialized ?? this.isInitialized,
isPlaying: isPlaying ?? this.isPlaying,
isBuffering: isBuffering ?? this.isBuffering,
isPipActive: isPipActive ?? this.isPipActive,
isPictureInPictureActive:
isPictureInPictureActive ?? this.isPictureInPictureActive,
playbackSpeed: playbackSpeed ?? this.playbackSpeed,
errorDescription: errorDescription ?? this.errorDescription,
);
Expand Down Expand Up @@ -249,11 +250,11 @@ class MiniController extends ValueNotifier<VideoPlayerValue> {
case VideoEventType.bufferingEnd:
value = value.copyWith(isBuffering: false);
break;
case VideoEventType.startingPiP:
value = value.copyWith(isPipActive: true);
case VideoEventType.startingPictureInPicture:
value = value.copyWith(isPictureInPictureActive: true);
break;
case VideoEventType.stoppedPiP:
value = value.copyWith(isPipActive: false);
case VideoEventType.stoppedPictureInPicture:
value = value.copyWith(isPictureInPictureActive: false);
break;
case VideoEventType.unknown:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ @interface FLTVideoPlayer
@property(nonatomic, readonly) BOOL isPlaying;
@property(nonatomic) BOOL isLooping;
@property(nonatomic, readonly) BOOL isInitialized;
@property(nonatomic) BOOL isPiPStarted;
@property(nonatomic) BOOL isPictureInPictureStarted;
- (instancetype)initWithURL:(NSURL *)url
frameUpdater:(FLTFrameUpdater *)frameUpdater
httpHeaders:(nonnull NSDictionary<NSString *, NSString *> *)headers;
Expand Down Expand Up @@ -295,19 +295,21 @@ - (void)setPictureInPictureOverlayRect:(CGRect)frame {
}
}

- (void)setPictureInPicture:(BOOL)isPiPStarted {
if (self.isPiPStarted == isPiPStarted) {
- (void)setPictureInPicture:(BOOL)shouldPictureInPictureStart {
if (self.isPictureInPictureStarted == shouldPictureInPictureStart) {
return;
}

self.isPiPStarted = isPiPStarted;
if (pictureInPictureController && self.isPiPStarted &&
self.isPictureInPictureStarted = shouldPictureInPictureStart;
if (pictureInPictureController && self.isPictureInPictureStarted &&
![pictureInPictureController isPictureInPictureActive]) {
if (_eventSink != nil) {
_eventSink(@{@"event" : @"startingPiP"});
// The event is already send here to make sure that Flutter UI can be updates as soon as
// possible
_eventSink(@{@"event" : @"startingPictureInPicture"});
}
[pictureInPictureController startPictureInPicture];
} else if (pictureInPictureController && !self.isPiPStarted &&
} else if (pictureInPictureController && !self.isPictureInPictureStarted &&
[pictureInPictureController isPictureInPictureActive]) {
[pictureInPictureController stopPictureInPicture];
}
Expand All @@ -317,17 +319,17 @@ - (void)setPictureInPicture:(BOOL)isPiPStarted {

- (void)pictureInPictureControllerDidStopPictureInPicture:
(AVPictureInPictureController *)pictureInPictureController {
self.isPiPStarted = NO;
self.isPictureInPictureStarted = NO;
if (_eventSink != nil) {
_eventSink(@{@"event" : @"stoppedPiP"});
_eventSink(@{@"event" : @"stoppedPictureInPicture"});
}
}

- (void)pictureInPictureControllerDidStartPictureInPicture:
(AVPictureInPictureController *)pictureInPictureController {
self.isPiPStarted = YES;
self.isPictureInPictureStarted = YES;
if (_eventSink != nil) {
_eventSink(@{@"event" : @"startingPiP"});
_eventSink(@{@"event" : @"startingPictureInPicture"});
}
[self updatePlayingState];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@class FLTMixWithOthersMessage;
@class FLTAutomaticallyStartPictureInPictureMessage;
@class FLTSetPictureInPictureOverlayRectMessage;
@class FLTPiPRect;
@class FLTPictureInPictureOverlayRect;
@class FLTSetPictureInPictureMessage;

@interface FLTTextureMessage : NSObject
Expand Down Expand Up @@ -97,12 +97,13 @@ NS_ASSUME_NONNULL_BEGIN
@interface FLTSetPictureInPictureOverlayRectMessage : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithTextureId:(NSNumber *)textureId rect:(nullable FLTPiPRect *)rect;
+ (instancetype)makeWithTextureId:(NSNumber *)textureId
rect:(nullable FLTPictureInPictureOverlayRect *)rect;
@property(nonatomic, strong) NSNumber *textureId;
@property(nonatomic, strong, nullable) FLTPiPRect *rect;
@property(nonatomic, strong, nullable) FLTPictureInPictureOverlayRect *rect;
@end

@interface FLTPiPRect : NSObject
@interface FLTPictureInPictureOverlayRect : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithTop:(NSNumber *)top
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ @interface FLTSetPictureInPictureOverlayRectMessage ()
+ (FLTSetPictureInPictureOverlayRectMessage *)fromMap:(NSDictionary *)dict;
- (NSDictionary *)toMap;
@end
@interface FLTPiPRect ()
+ (FLTPiPRect *)fromMap:(NSDictionary *)dict;
@interface FLTPictureInPictureOverlayRect ()
+ (FLTPictureInPictureOverlayRect *)fromMap:(NSDictionary *)dict;
- (NSDictionary *)toMap;
@end
@interface FLTSetPictureInPictureMessage ()
Expand Down Expand Up @@ -275,7 +275,8 @@ - (NSDictionary *)toMap {
@end

@implementation FLTSetPictureInPictureOverlayRectMessage
+ (instancetype)makeWithTextureId:(NSNumber *)textureId rect:(nullable FLTPiPRect *)rect {
+ (instancetype)makeWithTextureId:(NSNumber *)textureId
rect:(nullable FLTPictureInPictureOverlayRect *)rect {
FLTSetPictureInPictureOverlayRectMessage *pigeonResult =
[[FLTSetPictureInPictureOverlayRectMessage alloc] init];
pigeonResult.textureId = textureId;
Expand All @@ -287,7 +288,7 @@ + (FLTSetPictureInPictureOverlayRectMessage *)fromMap:(NSDictionary *)dict {
[[FLTSetPictureInPictureOverlayRectMessage alloc] init];
pigeonResult.textureId = GetNullableObject(dict, @"textureId");
NSAssert(pigeonResult.textureId != nil, @"");
pigeonResult.rect = [FLTPiPRect fromMap:GetNullableObject(dict, @"rect")];
pigeonResult.rect = [FLTPictureInPictureOverlayRect fromMap:GetNullableObject(dict, @"rect")];
return pigeonResult;
}
- (NSDictionary *)toMap {
Expand All @@ -297,20 +298,20 @@ - (NSDictionary *)toMap {
}
@end

@implementation FLTPiPRect
@implementation FLTPictureInPictureOverlayRect
+ (instancetype)makeWithTop:(NSNumber *)top
left:(NSNumber *)left
width:(NSNumber *)width
height:(NSNumber *)height {
FLTPiPRect *pigeonResult = [[FLTPiPRect alloc] init];
FLTPictureInPictureOverlayRect *pigeonResult = [[FLTPictureInPictureOverlayRect alloc] init];
pigeonResult.top = top;
pigeonResult.left = left;
pigeonResult.width = width;
pigeonResult.height = height;
return pigeonResult;
}
+ (FLTPiPRect *)fromMap:(NSDictionary *)dict {
FLTPiPRect *pigeonResult = [[FLTPiPRect alloc] init];
+ (FLTPictureInPictureOverlayRect *)fromMap:(NSDictionary *)dict {
FLTPictureInPictureOverlayRect *pigeonResult = [[FLTPictureInPictureOverlayRect alloc] init];
pigeonResult.top = GetNullableObject(dict, @"top");
NSAssert(pigeonResult.top != nil, @"");
pigeonResult.left = GetNullableObject(dict, @"left");
Expand Down Expand Up @@ -370,7 +371,7 @@ - (nullable id)readValueOfType:(UInt8)type {
return [FLTMixWithOthersMessage fromMap:[self readValue]];

case 132:
return [FLTPiPRect fromMap:[self readValue]];
return [FLTPictureInPictureOverlayRect fromMap:[self readValue]];

case 133:
return [FLTPlaybackSpeedMessage fromMap:[self readValue]];
Expand Down Expand Up @@ -412,7 +413,7 @@ - (void)writeValue:(id)value {
} else if ([value isKindOfClass:[FLTMixWithOthersMessage class]]) {
[self writeByte:131];
[self writeValue:[value toMap]];
} else if ([value isKindOfClass:[FLTPiPRect class]]) {
} else if ([value isKindOfClass:[FLTPictureInPictureOverlayRect class]]) {
[self writeByte:132];
[self writeValue:[value toMap]];
} else if ([value isKindOfClass:[FLTPlaybackSpeedMessage class]]) {
Expand Down
Loading