Skip to content

Commit f7c03b1

Browse files
committed
fix bug about present wmplayer
1 parent 781b82e commit f7c03b1

File tree

5 files changed

+81
-4
lines changed

5 files changed

+81
-4
lines changed

PlayerDemo.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@
532532
TargetAttributes = {
533533
C4EC7F3B1DF4FCD2006E9820 = {
534534
CreatedOnToolsVersion = 7.2;
535-
DevelopmentTeam = FT79ZHXPA8;
535+
DevelopmentTeam = XJVZHH6395;
536536
};
537537
};
538538
};
@@ -794,7 +794,7 @@
794794
baseConfigurationReference = AD4E1C1A77CA0A18F1DFB6AE /* Pods-PlayerDemo.debug.xcconfig */;
795795
buildSettings = {
796796
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
797-
DEVELOPMENT_TEAM = FT79ZHXPA8;
797+
DEVELOPMENT_TEAM = XJVZHH6395;
798798
INFOPLIST_FILE = PlayerDemo/Info.plist;
799799
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
800800
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -809,7 +809,7 @@
809809
baseConfigurationReference = A41F0B6E980617F314AD7227 /* Pods-PlayerDemo.release.xcconfig */;
810810
buildSettings = {
811811
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
812-
DEVELOPMENT_TEAM = FT79ZHXPA8;
812+
DEVELOPMENT_TEAM = XJVZHH6395;
813813
INFOPLIST_FILE = PlayerDemo/Info.plist;
814814
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
815815
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Binary file not shown.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "0"
4+
version = "2.0">
5+
<Breakpoints>
6+
<BreakpointProxy
7+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
8+
<BreakpointContent
9+
shouldBeEnabled = "Yes"
10+
ignoreCount = "0"
11+
continueAfterRunningActions = "No"
12+
filePath = "PlayerDemo/ViewControllers/DetailViewController.m"
13+
timestampString = "515062750.595062"
14+
startingColumnNumber = "9223372036854775807"
15+
endingColumnNumber = "9223372036854775807"
16+
startingLineNumber = "62"
17+
endingLineNumber = "62"
18+
landmarkName = "-wmplayer:clickedCloseButton:"
19+
landmarkType = "7">
20+
</BreakpointContent>
21+
</BreakpointProxy>
22+
<BreakpointProxy
23+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
24+
<BreakpointContent
25+
shouldBeEnabled = "Yes"
26+
ignoreCount = "0"
27+
continueAfterRunningActions = "No"
28+
filePath = "PlayerDemo/ViewControllers/DetailViewController.m"
29+
timestampString = "515062762.711705"
30+
startingColumnNumber = "9223372036854775807"
31+
endingColumnNumber = "9223372036854775807"
32+
startingLineNumber = "59"
33+
endingLineNumber = "59"
34+
landmarkName = "-wmplayer:clickedCloseButton:"
35+
landmarkType = "7">
36+
</BreakpointContent>
37+
</BreakpointProxy>
38+
<BreakpointProxy
39+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
40+
<BreakpointContent
41+
shouldBeEnabled = "Yes"
42+
ignoreCount = "0"
43+
continueAfterRunningActions = "No"
44+
filePath = "PlayerDemo/ViewControllers/DetailViewController.m"
45+
timestampString = "515062767.618777"
46+
startingColumnNumber = "9223372036854775807"
47+
endingColumnNumber = "9223372036854775807"
48+
startingLineNumber = "46"
49+
endingLineNumber = "46"
50+
landmarkName = "-preferredInterfaceOrientationForPresentation"
51+
landmarkType = "7">
52+
</BreakpointContent>
53+
</BreakpointProxy>
54+
<BreakpointProxy
55+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
56+
<BreakpointContent
57+
shouldBeEnabled = "Yes"
58+
ignoreCount = "0"
59+
continueAfterRunningActions = "No"
60+
filePath = "PlayerDemo/ViewControllers/DetailViewController.m"
61+
timestampString = "515062991.199352"
62+
startingColumnNumber = "9223372036854775807"
63+
endingColumnNumber = "9223372036854775807"
64+
startingLineNumber = "75"
65+
endingLineNumber = "75"
66+
landmarkName = "-wmplayer:clickedCloseButton:"
67+
landmarkType = "7">
68+
</BreakpointContent>
69+
</BreakpointProxy>
70+
</Breakpoints>
71+
</Bucket>

PlayerDemo/ViewControllers/DetailViewController.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ -(void)wmplayer:(WMPlayer *)wmplayer clickedCloseButton:(UIButton *)closeBtn{
6363
//刷新
6464
[UIViewController attemptRotationToDeviceOrientation];
6565

66-
66+
[wmPlayer mas_remakeConstraints:^(MASConstraintMaker *make) {
67+
make.top.equalTo(self.view).with.offset(0);
68+
make.left.equalTo(self.view).with.offset(0);
69+
make.right.equalTo(self.view).with.offset(0);
70+
make.height.equalTo(@(playerFrame.size.height));
71+
}];
6772
wmPlayer.isFullscreen = NO;
6873
self.enablePanGesture = YES;
6974
}else{

PlayerDemo/WMPlayer/WMPlayer.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ -(void)creatWMPlayerAndReadyToPlay{
655655
self.currentItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:self.URLString]];
656656

657657
self.player = [AVPlayer playerWithPlayerItem:_currentItem];
658+
self.player.automaticallyWaitsToMinimizeStalling = NO;
658659
self.player.usesExternalPlaybackWhileExternalScreenIsActive=YES;
659660
//AVPlayerLayer
660661
self.playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];

0 commit comments

Comments
 (0)