Skip to content

Commit 957906a

Browse files
committed
fix scan qr code crash
1 parent daea4c7 commit 957906a

3 files changed

Lines changed: 41 additions & 39 deletions

File tree

ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,23 @@
2828
<string>402</string>
2929
<key>LSRequiresIPhoneOS</key>
3030
<true/>
31+
<key>NSCameraUsageDescription</key>
32+
<string>扫描播放视频</string>
3133
<key>UIFileSharingEnabled</key>
3234
<true/>
3335
<key>UILaunchStoryboardName</key>
3436
<string>LaunchScreen</string>
35-
<key>UIRequiredDeviceCapabilities</key>
36-
<array>
37-
<string>armv7</string>
38-
</array>
3937
<key>UISupportedInterfaceOrientations</key>
4038
<array>
4139
<string>UIInterfaceOrientationLandscapeLeft</string>
4240
<string>UIInterfaceOrientationLandscapeRight</string>
4341
</array>
4442
<key>UISupportedInterfaceOrientations~ipad</key>
4543
<array>
46-
<string>UIInterfaceOrientationPortrait</string>
47-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
4844
<string>UIInterfaceOrientationLandscapeLeft</string>
4945
<string>UIInterfaceOrientationLandscapeRight</string>
46+
<string>UIInterfaceOrientationPortrait</string>
47+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
5048
</array>
5149
</dict>
5250
</plist>

ios/IJKMediaDemo/IJKMediaDemo/IJKMoviePlayerViewController.xib

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
34
<dependencies>
45
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
68
</dependencies>
79
<objects>
810
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="IJKVideoViewController">
@@ -15,58 +17,58 @@
1517
<view contentMode="scaleToFill" id="1">
1618
<rect key="frame" x="0.0" y="0.0" width="480" height="320"/>
1719
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18-
<color key="backgroundColor" red="0.43529411764705883" green="0.44313725490196076" blue="0.47450980392156861" alpha="1" colorSpace="calibratedRGB"/>
20+
<color key="backgroundColor" red="0.43529411764705883" green="0.44313725490196076" blue="0.47450980392156861" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
1921
<nil key="simulatedStatusBarMetrics"/>
20-
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
2122
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
23+
<point key="canvasLocation" x="139" y="21"/>
2224
</view>
2325
<view contentMode="scaleToFill" id="6" customClass="IJKMediaControl">
2426
<rect key="frame" x="0.0" y="0.0" width="480" height="320"/>
2527
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2628
<subviews>
27-
<view contentMode="scaleToFill" id="54" userLabel="Overlay" customClass="UIControl">
29+
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="54" userLabel="Overlay" customClass="UIControl">
2830
<rect key="frame" x="0.0" y="0.0" width="480" height="320"/>
2931
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
3032
<subviews>
31-
<view contentMode="scaleToFill" id="38" userLabel="Panel: Bottom">
33+
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="38" userLabel="Panel: Bottom">
3234
<rect key="frame" x="40" y="200" width="400" height="100"/>
3335
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
3436
<subviews>
35-
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="player_bottom_control_bg.png" id="39" userLabel="View: Background">
37+
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" image="player_bottom_control_bg.png" translatesAutoresizingMaskIntoConstraints="NO" id="39" userLabel="View: Background">
3638
<rect key="frame" x="0.0" y="0.0" width="400" height="100"/>
3739
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
3840
</imageView>
39-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="40" userLabel="Button: Play">
41+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="40" userLabel="Button: Play">
4042
<rect key="frame" x="170" y="2" width="60" height="50"/>
4143
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
4244
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
4345
<state key="normal" image="btn_player_play.png">
44-
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
45-
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
46+
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
47+
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4648
</state>
4749
<state key="highlighted">
48-
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
50+
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4951
</state>
5052
<connections>
5153
<action selector="onClickPlay:" destination="-1" eventType="touchUpInside" id="45"/>
5254
</connections>
5355
</button>
54-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="41" userLabel="Button: Pause">
56+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="41" userLabel="Button: Pause">
5557
<rect key="frame" x="170" y="2" width="60" height="50"/>
5658
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
5759
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
5860
<state key="normal" image="btn_player_pause.png">
59-
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
60-
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
61+
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
62+
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
6163
</state>
6264
<state key="highlighted">
63-
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
65+
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
6466
</state>
6567
<connections>
6668
<action selector="onClickPause:" destination="-1" eventType="touchUpInside" id="46"/>
6769
</connections>
6870
</button>
69-
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="100" id="42" userLabel="Slider: Video Progress">
71+
<slider opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="42" userLabel="Slider: Video Progress">
7072
<rect key="frame" x="68" y="55" width="264" height="29"/>
7173
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
7274
<connections>
@@ -77,26 +79,26 @@
7779
<action selector="didSliderValueChanged" destination="-1" eventType="valueChanged" id="d2y-5f-s9f"/>
7880
</connections>
7981
</slider>
80-
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="10:00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="43" userLabel="Label: Current Time">
82+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" fixedFrame="YES" text="10:00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="43" userLabel="Label: Current Time">
8183
<rect key="frame" x="20" y="61" width="50" height="21"/>
8284
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
8385
<fontDescription key="fontDescription" type="system" pointSize="17"/>
84-
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
86+
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8587
<nil key="highlightedColor"/>
8688
</label>
87-
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="20:00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="44" userLabel="Label: Total Duration">
89+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" fixedFrame="YES" text="20:00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="44" userLabel="Label: Total Duration">
8890
<rect key="frame" x="330" y="61" width="50" height="21"/>
8991
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
9092
<fontDescription key="fontDescription" type="system" pointSize="17"/>
91-
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
93+
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
9294
<nil key="highlightedColor"/>
9395
</label>
9496
</subviews>
95-
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
97+
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
9698
</view>
97-
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="4ZI-0o-F2w">
99+
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4ZI-0o-F2w">
98100
<rect key="frame" x="0.0" y="0.0" width="480" height="44"/>
99-
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
101+
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
100102
<items>
101103
<barButtonItem systemItem="done" id="1XF-Pk-v6Z">
102104
<connections>
@@ -112,15 +114,14 @@
112114
</items>
113115
</toolbar>
114116
</subviews>
115-
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
117+
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
116118
<connections>
117119
<action selector="onClickOverlay:" destination="-1" eventType="touchDown" id="58"/>
118120
</connections>
119121
</view>
120122
</subviews>
121-
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
123+
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
122124
<nil key="simulatedStatusBarMetrics"/>
123-
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
124125
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
125126
<connections>
126127
<action selector="onClickMediaControl:" destination="-1" eventType="touchDown" id="59"/>
@@ -133,7 +134,7 @@
133134
<outlet property="topPanel" destination="4ZI-0o-F2w" id="igp-Gq-Qk0"/>
134135
<outlet property="totalDurationLabel" destination="44" id="63"/>
135136
</connections>
136-
<point key="canvasLocation" x="386" y="448"/>
137+
<point key="canvasLocation" x="589.3129770992366" y="315.49295774647891"/>
137138
</view>
138139
<navigationItem title="Title" id="wNK-Og-f4q"/>
139140
</objects>
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7531" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
34
<dependencies>
45
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
68
</dependencies>
79
<objects>
810
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="IJKQRCodeScanViewController">
@@ -13,9 +15,10 @@
1315
</placeholder>
1416
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
1517
<view contentMode="scaleToFill" id="iN0-l3-epB">
16-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
1719
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18-
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
20+
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
21+
<point key="canvasLocation" x="-49" y="-17"/>
1922
</view>
2023
</objects>
2124
</document>

0 commit comments

Comments
 (0)