Skip to content

Commit 91c5c3b

Browse files
author
zhaoyongqiang
committed
实现私有化AP功能
1 parent 5a4f221 commit 91c5c3b

6 files changed

Lines changed: 455 additions & 3 deletions

File tree

iOS/APIExample.xcodeproj/project.pbxproj

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@
127127
A7CA48C424553CF700507435 /* Popover.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A7CA48C224553CF600507435 /* Popover.storyboard */; };
128128
CBCDE23FB64E60D6A79F3723 /* Pods_Agora_ScreenShare_Extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09E72C5D1AABD812866E41A6 /* Pods_Agora_ScreenShare_Extension.framework */; };
129129
D4046B5D3DE984062E3F6D92 /* Pods_APIExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07A781F5D5D3783CEC7C8EFA /* Pods_APIExample.framework */; };
130+
E789AAF928694D8C00851463 /* LocalAccess.strings in Resources */ = {isa = PBXBuildFile; fileRef = E789AAF428694D8C00851463 /* LocalAccess.strings */; };
131+
E789AAFA28694D8C00851463 /* LocalAccess.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E789AAF628694D8C00851463 /* LocalAccess.storyboard */; };
132+
E789AAFB28694D8C00851463 /* LocalAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = E789AAF828694D8C00851463 /* LocalAccess.swift */; };
133+
E789AAFD2869556800851463 /* Util.swift in Sources */ = {isa = PBXBuildFile; fileRef = E789AAFC2869556800851463 /* Util.swift */; };
130134
F3184EFE27F8475600FA402D /* AgoraSampleBufferRender.m in Sources */ = {isa = PBXBuildFile; fileRef = F3184EFD27F8475600FA402D /* AgoraSampleBufferRender.m */; };
131135
F3184EFF27F85AD700FA402D /* AgoraPictureInPictureController.m in Sources */ = {isa = PBXBuildFile; fileRef = F3EA6CE827F6E5E700CAF620 /* AgoraPictureInPictureController.m */; };
132136
F3184F0027F8605700FA402D /* VideoViewSampleBufferDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F3184EFB27F8439D00FA402D /* VideoViewSampleBufferDisplayView.xib */; };
@@ -344,6 +348,10 @@
344348
A7847F932458089E00469187 /* AgoraExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AgoraExtension.swift; sourceTree = "<group>"; };
345349
A7BD765F247CC6920062A6B3 /* UITypeAlias.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITypeAlias.swift; sourceTree = "<group>"; };
346350
A7CA48C324553CF600507435 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Popover.storyboard; sourceTree = "<group>"; };
351+
E789AAF528694D8C00851463 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LocalAccess.strings"; sourceTree = "<group>"; };
352+
E789AAF728694D8C00851463 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LocalAccess.storyboard; sourceTree = "<group>"; };
353+
E789AAF828694D8C00851463 /* LocalAccess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalAccess.swift; sourceTree = "<group>"; };
354+
E789AAFC2869556800851463 /* Util.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Util.swift; sourceTree = "<group>"; };
347355
F3184EFB27F8439D00FA402D /* VideoViewSampleBufferDisplayView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VideoViewSampleBufferDisplayView.xib; sourceTree = "<group>"; };
348356
F3184EFC27F8475600FA402D /* AgoraSampleBufferRender.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AgoraSampleBufferRender.h; sourceTree = "<group>"; };
349357
F3184EFD27F8475600FA402D /* AgoraSampleBufferRender.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AgoraSampleBufferRender.m; sourceTree = "<group>"; };
@@ -852,6 +860,7 @@
852860
children = (
853861
67B8C7A5280511CB00195106 /* MediaUtils.h */,
854862
67B8C7A6280511CB00195106 /* MediaUtils.m */,
863+
E789AAFC2869556800851463 /* Util.swift */,
855864
);
856865
path = Utils;
857866
sourceTree = "<group>";
@@ -887,6 +896,7 @@
887896
A75A56D724A0603000D0089E /* Advanced */ = {
888897
isa = PBXGroup;
889898
children = (
899+
E789AAF328694D8C00851463 /* LocalAccess */,
890900
8BAF3C932758693A0073B30E /* VideoProcess */,
891901
5771635C264536750072DE96 /* CustomPcmAudioSource */,
892902
576EA57825ADC482000B3D79 /* VideoChat */,
@@ -895,7 +905,7 @@
895905
578AA65A259A056D00D7CAD9 /* CreateDataStream */,
896906
03FB5B2F25642E7C00F04ED0 /* LiveStreaming */,
897907
0364C1F52551AD6D00C6C0AE /* ARKit */,
898-
F38CCE3C27FD9D8E00232EC9 /* PictureInPicture */,
908+
F38CCE3C27FD9D8E00232EC9 /* PictureInPicture */,
899909
033A9F05252D61FB00BC26E1 /* RTMPStreaming */,
900910
033A9EE8252D5F5E00BC26E1 /* JoinMultiChannel */,
901911
033A9EED252D61E200BC26E1 /* CustomAudioRender */,
@@ -931,6 +941,16 @@
931941
name = "Supporting Files";
932942
sourceTree = "<group>";
933943
};
944+
E789AAF328694D8C00851463 /* LocalAccess */ = {
945+
isa = PBXGroup;
946+
children = (
947+
E789AAF428694D8C00851463 /* LocalAccess.strings */,
948+
E789AAF628694D8C00851463 /* LocalAccess.storyboard */,
949+
E789AAF828694D8C00851463 /* LocalAccess.swift */,
950+
);
951+
path = LocalAccess;
952+
sourceTree = "<group>";
953+
};
934954
F38CCE3C27FD9D8E00232EC9 /* PictureInPicture */ = {
935955
isa = PBXGroup;
936956
children = (
@@ -1081,13 +1101,15 @@
10811101
0364C2052551B46100C6C0AE /* AR.scnassets in Resources */,
10821102
033A9F30252D860100BC26E1 /* JoinChannelAudio.storyboard in Resources */,
10831103
F3184F0027F8605700FA402D /* VideoViewSampleBufferDisplayView.xib in Resources */,
1104+
E789AAF928694D8C00851463 /* LocalAccess.strings in Resources */,
10841105
0364C1FD2551AD6D00C6C0AE /* ARKit.storyboard in Resources */,
10851106
033A9F75252D8B4800BC26E1 /* ScreenShare.storyboard in Resources */,
10861107
8BAF3C992758693B0073B30E /* VideoProcess.strings in Resources */,
10871108
033A9F5C252D89FD00BC26E1 /* CustomVideoSourcePush.storyboard in Resources */,
10881109
03D13BD92448758B00B599B3 /* Assets.xcassets in Resources */,
10891110
033A9F6B252D8B3500BC26E1 /* MediaChannelRelay.storyboard in Resources */,
10901111
03D13BD72448758900B599B3 /* Main.storyboard in Resources */,
1112+
E789AAFA28694D8C00851463 /* LocalAccess.storyboard in Resources */,
10911113
);
10921114
runOnlyForDeploymentPostprocessing = 0;
10931115
};
@@ -1188,6 +1210,7 @@
11881210
67B8C79E2804081F00195106 /* RawVideoData.swift in Sources */,
11891211
033A9EFA252D61E200BC26E1 /* CustomAudioRender.swift in Sources */,
11901212
03D13BD42448758900B599B3 /* ViewController.swift in Sources */,
1213+
E789AAFB28694D8C00851463 /* LocalAccess.swift in Sources */,
11911214
03F8733224C8696600EDB1A3 /* EntryViewController.swift in Sources */,
11921215
0371D8AE250B4A2C00C0DD61 /* JoinChannelAudio.swift in Sources */,
11931216
033A9EFC252D61E200BC26E1 /* CustomVideoRender.swift in Sources */,
@@ -1243,6 +1266,7 @@
12431266
03BCEC762449EB5000ED7177 /* LogViewController.swift in Sources */,
12441267
0364C2022551B19800C6C0AE /* ARVideoSource.swift in Sources */,
12451268
0339D6D624E91CEB008739CD /* QuickSwitchChannel.swift in Sources */,
1269+
E789AAFD2869556800851463 /* Util.swift in Sources */,
12461270
A7847F942458089E00469187 /* AgoraExtension.swift in Sources */,
12471271
03BCEC50244938C500ED7177 /* BaseViewController.swift in Sources */,
12481272
);
@@ -1533,6 +1557,22 @@
15331557
name = Popover.storyboard;
15341558
sourceTree = "<group>";
15351559
};
1560+
E789AAF428694D8C00851463 /* LocalAccess.strings */ = {
1561+
isa = PBXVariantGroup;
1562+
children = (
1563+
E789AAF528694D8C00851463 /* zh-Hans */,
1564+
);
1565+
name = LocalAccess.strings;
1566+
sourceTree = "<group>";
1567+
};
1568+
E789AAF628694D8C00851463 /* LocalAccess.storyboard */ = {
1569+
isa = PBXVariantGroup;
1570+
children = (
1571+
E789AAF728694D8C00851463 /* Base */,
1572+
);
1573+
name = LocalAccess.storyboard;
1574+
sourceTree = "<group>";
1575+
};
15361576
F38CCE3F27FDC78B00232EC9 /* PictureInPicture.storyboard */ = {
15371577
isa = PBXVariantGroup;
15381578
children = (
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// Util.swift
3+
// APIExample
4+
//
5+
// Created by zhaoyongqiang on 2022/6/27.
6+
// Copyright © 2022 Agora Corp. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
enum Util {
12+
static func dicValueString(_ dic: [String: Any]) ->String?{
13+
let data = try? JSONSerialization.data(withJSONObject: dic, options: [])
14+
let str = String(data: data!,encoding:String.Encoding.utf8)
15+
return str
16+
}
17+
}
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3+
<device id="retina6_1" orientation="portrait" appearance="light"/>
4+
<dependencies>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
7+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
8+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
9+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10+
</dependencies>
11+
<scenes>
12+
<!--Local Access Entry-->
13+
<scene sceneID="x72-3b-GCg">
14+
<objects>
15+
<viewController storyboardIdentifier="EntryViewController" id="O0d-ef-mTa" customClass="LocalAccessEntry" customModule="APIExample" customModuleProvider="target" sceneMemberID="viewController">
16+
<view key="view" contentMode="scaleToFill" id="iRI-aA-06F">
17+
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
18+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19+
<subviews>
20+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UzG-zY-iSA">
21+
<rect key="frame" x="20" y="194" width="374" height="154"/>
22+
<subviews>
23+
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter Local Access Point" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bjh-b3-HXX">
24+
<rect key="frame" x="38" y="8" width="299" height="34"/>
25+
<constraints>
26+
<constraint firstAttribute="height" constant="34" id="sFa-ia-A6t"/>
27+
</constraints>
28+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
29+
<textInputTraits key="textInputTraits"/>
30+
<connections>
31+
<action selector="onLocalAccessTextFieldValueChange:" destination="O0d-ef-mTa" eventType="editingChanged" id="gzW-Sl-K4L"/>
32+
</connections>
33+
</textField>
34+
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter channel name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="GWc-L5-fZV" userLabel="channelName">
35+
<rect key="frame" x="38" y="73" width="299" height="34"/>
36+
<constraints>
37+
<constraint firstAttribute="height" constant="34" id="Tjy-cF-xZF"/>
38+
</constraints>
39+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
40+
<textInputTraits key="textInputTraits"/>
41+
</textField>
42+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kbN-ZR-nNn" userLabel="joinBtn">
43+
<rect key="frame" x="172" y="124" width="30" height="30"/>
44+
<state key="normal" title="Join"/>
45+
<connections>
46+
<action selector="doJoinPressedWithSender:" destination="O0d-ef-mTa" eventType="touchUpInside" id="pdy-Tj-ycl"/>
47+
</connections>
48+
</button>
49+
</subviews>
50+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
51+
<constraints>
52+
<constraint firstAttribute="trailing" secondItem="bjh-b3-HXX" secondAttribute="trailing" constant="37" id="3dT-Dh-Ohw"/>
53+
<constraint firstItem="kbN-ZR-nNn" firstAttribute="top" secondItem="GWc-L5-fZV" secondAttribute="bottom" constant="17" id="7pO-NZ-aG9"/>
54+
<constraint firstAttribute="height" constant="154" id="9QZ-Bn-3wY"/>
55+
<constraint firstItem="GWc-L5-fZV" firstAttribute="leading" secondItem="UzG-zY-iSA" secondAttribute="leading" constant="38" id="IbI-dr-qqt"/>
56+
<constraint firstItem="bjh-b3-HXX" firstAttribute="top" secondItem="UzG-zY-iSA" secondAttribute="top" constant="8" id="Jbx-fQ-gKj"/>
57+
<constraint firstItem="bjh-b3-HXX" firstAttribute="leading" secondItem="UzG-zY-iSA" secondAttribute="leading" constant="38" id="Wws-KA-RG7"/>
58+
<constraint firstItem="GWc-L5-fZV" firstAttribute="top" secondItem="bjh-b3-HXX" secondAttribute="bottom" constant="31" id="dc7-Zb-Ehs"/>
59+
<constraint firstAttribute="bottom" secondItem="kbN-ZR-nNn" secondAttribute="bottom" id="rEo-2v-HWg"/>
60+
<constraint firstAttribute="trailing" secondItem="GWc-L5-fZV" secondAttribute="trailing" constant="37" id="rwy-I7-RWx"/>
61+
<constraint firstItem="kbN-ZR-nNn" firstAttribute="centerX" secondItem="UzG-zY-iSA" secondAttribute="centerX" id="zXq-ch-a4z"/>
62+
</constraints>
63+
</view>
64+
</subviews>
65+
<viewLayoutGuide key="safeArea" id="wDs-Gr-g1S"/>
66+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
67+
<constraints>
68+
<constraint firstItem="wDs-Gr-g1S" firstAttribute="trailing" secondItem="UzG-zY-iSA" secondAttribute="trailing" constant="20" id="VFq-Qw-nMs"/>
69+
<constraint firstItem="UzG-zY-iSA" firstAttribute="top" secondItem="wDs-Gr-g1S" secondAttribute="top" constant="150" id="a9K-Xe-nKQ"/>
70+
<constraint firstItem="UzG-zY-iSA" firstAttribute="leading" secondItem="wDs-Gr-g1S" secondAttribute="leading" constant="20" id="s60-sQ-vbc"/>
71+
</constraints>
72+
</view>
73+
<connections>
74+
<outlet property="channelTextField" destination="GWc-L5-fZV" id="xDy-ai-JdS"/>
75+
<outlet property="joinButton" destination="kbN-ZR-nNn" id="kkw-5w-Nnv"/>
76+
</connections>
77+
</viewController>
78+
<placeholder placeholderIdentifier="IBFirstResponder" id="DXe-2A-qSu" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
79+
</objects>
80+
<point key="canvasLocation" x="-694.20289855072474" y="930.80357142857133"/>
81+
</scene>
82+
<!--Join Channel Video-->
83+
<scene sceneID="537-qh-Aaa">
84+
<objects>
85+
<viewController storyboardIdentifier="LocalAccess" title="Join Channel Video" id="p70-sh-D1h" customClass="LocalAccessMain" customModule="APIExample" customModuleProvider="target" sceneMemberID="viewController">
86+
<view key="view" contentMode="scaleToFill" id="OcG-X2-s5p">
87+
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
88+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
89+
<subviews>
90+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bLu-sF-1q0" customClass="AGEVideoContainer" customModule="AGEVideoLayout">
91+
<rect key="frame" x="0.0" y="44" width="414" height="233"/>
92+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
93+
<constraints>
94+
<constraint firstAttribute="width" secondItem="bLu-sF-1q0" secondAttribute="height" multiplier="16:9" id="Inp-ZV-hqi"/>
95+
</constraints>
96+
</view>
97+
</subviews>
98+
<viewLayoutGuide key="safeArea" id="f4j-hu-9mE"/>
99+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
100+
<constraints>
101+
<constraint firstItem="f4j-hu-9mE" firstAttribute="trailing" secondItem="bLu-sF-1q0" secondAttribute="trailing" id="FL8-6w-T28"/>
102+
<constraint firstItem="bLu-sF-1q0" firstAttribute="top" secondItem="f4j-hu-9mE" secondAttribute="top" id="qnE-dw-lXn"/>
103+
<constraint firstItem="bLu-sF-1q0" firstAttribute="leading" secondItem="f4j-hu-9mE" secondAttribute="leading" id="wEO-sQ-bsY"/>
104+
</constraints>
105+
</view>
106+
<connections>
107+
<outlet property="container" destination="bLu-sF-1q0" id="ljr-4v-SFl"/>
108+
</connections>
109+
</viewController>
110+
<placeholder placeholderIdentifier="IBFirstResponder" id="qQz-5Q-PTr" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
111+
</objects>
112+
<point key="canvasLocation" x="118.84057971014494" y="930.80357142857133"/>
113+
</scene>
114+
</scenes>
115+
<resources>
116+
<systemColor name="systemBackgroundColor">
117+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
118+
</systemColor>
119+
</resources>
120+
</document>

0 commit comments

Comments
 (0)