Skip to content

Commit 6bccb94

Browse files
committed
update code to latest
1 parent ab3b101 commit 6bccb94

File tree

92 files changed

+2472
-1088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2472
-1088
lines changed

Example/VPInterfaceControllerDemo.xcodeproj/xcshareddata/xcschemes/VPInterfaceControllerDemo.xcscheme

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,15 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<MacroExpansion>
31-
<BuildableReference
32-
BuildableIdentifier = "primary"
33-
BlueprintIdentifier = "069D54341F04DC6D001E5324"
34-
BuildableName = "VPInterfaceControllerDemo.app"
35-
BlueprintName = "VPInterfaceControllerDemo"
36-
ReferencedContainer = "container:VPInterfaceControllerDemo.xcodeproj">
37-
</BuildableReference>
38-
</MacroExpansion>
3930
<Testables>
4031
</Testables>
4132
</TestAction>

Example/VPInterfaceControllerDemo/AppDelegate.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3939
// [VPIConfigSDK setAppKey:@"7a741182-c30e-4edf-9eaa-ae8974093214" appSecret:@"8940b66d7052437b"];
4040
// [VPIConfigSDK setAppKey:@"73d5a8f8-3682-4080-ad7c-996c4e19fc1e" appSecret:@"c276b70aba84491a"];
4141

42-
[VPIConfigSDK setAppKey:@"66c9bafa-abd0-4aa9-8066-3deaf9dc7f71" appSecret:@"bcfee675bca844bd"];
42+
[VPIConfigSDK setAppKey:@"ca39f6b6-4626-4036-8518-59387636da60" appSecret:@"8e9db127a2644fba"];
4343

4444
// [[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:VPUPDebugStateDevelop];
45-
[[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:VPUPDebugStateTest];
46-
// [[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:VPUPDebugStateOnline];
45+
// [[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:VPUPDebugStateTest];
46+
[[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:VPUPDebugStateOnline];
4747

4848
#ifdef VIDEOOS_DEVAPP
4949
NSLog(@"this current tag is VIDEOOS_DEVAPP");

Example/VPInterfaceControllerDemo/VPLiveTypeSelectViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ - (void)appSettingViewApplyButtonDidClicked:(id)sender {
511511
[PrivateConfig shareConfig].environment = self.appSettingView.environmentControl.selectedSegmentIndex;
512512
[[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:[PrivateConfig shareConfig].environment];
513513
[VPIConfigSDK setAppKey:self.appSettingView.appKeyTextField.text appSecret:self.appSettingView.appSecretTextField.text];
514-
514+
[VPIConfigSDK initSDK];
515515
[self.appSettingView.appKeyTextField resignFirstResponder];
516516
[self.appSettingView.appSecretTextField resignFirstResponder];
517517
[self.appSettingView removeFromSuperview];

Example/VPInterfaceControllerDemo/VPMediaControlView.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ - (IBAction)playbackSliderTouchUpInside:(id)sender {
219219

220220
CGFloat nowValue = _playbackSlider.value;
221221
[_player setCurrentPlaybackTime:nowValue];
222+
[[NSNotificationCenter defaultCenter] postNotificationName:@"VPIPlayButtonAction" object:nil userInfo:@{@"type":@(1)}];
222223
}
223224

224225
- (IBAction)playbackSliderTouchUpOutside:(id)sender {

Example/VPInterfaceControllerDemo/VPSinglePlayerViewController.m

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#import "VPConfigListData.h"
2828
#import <SVGAPlayer/SVGAPlayer.h>
2929
#import <SVGAPlayer/SVGAParser.h>
30+
#import <MBProgressHUD/MBProgressHUD.h>
31+
3032
@interface VPSinglePlayerViewController() <VPInterfaceStatusNotifyDelegate, VPIUserLoginInterface,VPVideoPlayerDelegate,VPIVideoPlayerDelegate,VPIServiceDelegate,VPMediaControlViewDelegate,SVGAPlayerDelegate> {
3133
NSString *_urlString;
3234
NSString *_platformUserID;
@@ -517,7 +519,7 @@ - (void)appSettingViewApplyButtonDidClicked:(id)sender {
517519
[PrivateConfig shareConfig].environment = self.appSettingView.environmentControl.selectedSegmentIndex;
518520
[[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:[PrivateConfig shareConfig].environment];
519521
[VPIConfigSDK setAppKey:self.appSettingView.appKeyTextField.text appSecret:self.appSettingView.appSecretTextField.text];
520-
522+
[VPIConfigSDK initSDK];
521523
[self.appSettingView.appKeyTextField resignFirstResponder];
522524
[self.appSettingView.appSecretTextField resignFirstResponder];
523525
[self.appSettingView removeFromSuperview];
@@ -605,6 +607,8 @@ - (void)initInterfaceController {
605607
VPInterfaceControllerConfig *config = [[VPInterfaceControllerConfig alloc] init];
606608
config.platformID = [PrivateConfig shareConfig].platformID;
607609
config.identifier = [PrivateConfig shareConfig].identifier;
610+
config.episode = @"测试视频";
611+
config.title = @"测试";
608612
config.types = _type;
609613
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:0];
610614
if ([PrivateConfig shareConfig].cate) {
@@ -879,22 +883,25 @@ - (void)vp_interfaceActionNotify:(NSDictionary *)actionDictionary {
879883
}
880884
} else {
881885
// 暂时无法处理的url
882-
[self openWebViewWithUrl:linkUrl];
886+
if (![actionDictionary objectForKey:@"deepLink"] && [[actionDictionary objectForKey:@"deepLink"] length] <= 0) {
887+
[self openWebViewWithUrl:linkUrl];
888+
}
889+
883890
}
884891
}
885892
if ([actionDictionary objectForKey:@"deepLink"] && [[actionDictionary objectForKey:@"deepLink"] length] > 0) {
886893
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:[actionDictionary objectForKey:@"deepLink"]]]) {
887894
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[actionDictionary objectForKey:@"deepLink"]]];
888895
}
889896
else {
890-
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"错误" message:@"App打开失败" preferredStyle:UIAlertControllerStyleAlert];
891-
__weak typeof(self) weakSelf = self;
892-
UIAlertAction *action = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
893-
__strong typeof(self) strongSelf = weakSelf;
894-
[strongSelf->_interfaceController platformCloseActionWebView];
895-
}];
896-
[alert addAction:action];
897-
[[VPUPTopViewController topViewController] presentViewController:alert animated:YES completion:nil];
897+
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
898+
hud.mode = MBProgressHUDModeText;
899+
hud.label.text = @"对应APP未安装";
900+
hud.label.font = [UIFont systemFontOfSize:14];
901+
hud.label.numberOfLines = 0;
902+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
903+
[MBProgressHUD hideHUDForView:self.view animated:YES];
904+
});
898905
}
899906
}
900907
}

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppControllers/DebuggingViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ -(void)settingViewDidCompleWithData:(NSArray<NSString *> *)data andIsOK:(BOOL)is
117117

118118
[[VPUPDebugSwitch sharedDebugSwitch] switchEnvironment:KENVIRONMENT];
119119
[VPIConfigSDK setAppKey:[DevAppTool readUserDataWithKey:KDAAPPKEY] appSecret:[DevAppTool readUserDataWithKey:KDAAPPSECRET]];
120-
120+
[VPIConfigSDK initSDK];
121121

122122
self.resourceDataAry = data;
123123
self.isLocal = isLocal;

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppControllers/DevAppPlayerViewController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ - (void)initInterfaceController {
128128
// config.platformID = @"platformID";
129129
// config.identifier = @"platformID";
130130
config.types = VPInterfaceControllerTypeVideoOS;
131+
config.episode = @"剧集名称";
132+
config.title = @"视频标题";
133+
config.identifier = @"122";
131134

132135
CGSize screenSize = [UIScreen mainScreen].bounds.size;
133136
VPIVideoPlayerSize *videoPlayerSize = [[VPIVideoPlayerSize alloc] init];

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevApp_main.storyboard

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="6Ne-CA-cIG">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="6Ne-CA-cIG">
33
<device id="retina4_7" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
88
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
99
</dependencies>
@@ -33,7 +33,7 @@
3333
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
3434
<subviews>
3535
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Cw8-MD-zBN">
36-
<rect key="frame" x="70" y="201" width="235" height="44"/>
36+
<rect key="frame" x="70" y="386" width="235" height="44"/>
3737
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3838
<constraints>
3939
<constraint firstAttribute="width" constant="235" id="85G-Au-o2j"/>
@@ -52,7 +52,7 @@
5252
</connections>
5353
</button>
5454
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="kav-P4-ysC">
55-
<rect key="frame" x="0.0" y="253" width="375" height="370"/>
55+
<rect key="frame" x="0.0" y="438" width="375.00000000000006" height="185"/>
5656
</imageView>
5757
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hff-Ny-IwI">
5858
<rect key="frame" x="12" y="563" width="351" height="29"/>
@@ -63,16 +63,16 @@
6363
<nil key="highlightedColor"/>
6464
</label>
6565
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="实现人与视频的互动和链接" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ii8-eZ-m7v">
66-
<rect key="frame" x="85.5" y="340" width="204" height="24"/>
66+
<rect key="frame" x="85.5" y="195" width="204" height="24"/>
6767
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="17"/>
6868
<color key="textColor" red="0.87450980392156863" green="0.88235294117647056" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
6969
<nil key="highlightedColor"/>
7070
</label>
7171
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="9Il-nf-QkR">
72-
<rect key="frame" x="80" y="40" width="215" height="290"/>
72+
<rect key="frame" x="80" y="40" width="215" height="145"/>
7373
</imageView>
7474
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lCO-2F-UTW">
75-
<rect key="frame" x="70" y="133" width="235" height="44"/>
75+
<rect key="frame" x="70" y="318" width="235" height="44"/>
7676
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
7777
<constraints>
7878
<constraint firstAttribute="height" constant="44" id="agw-g9-dQ1"/>
@@ -91,7 +91,7 @@
9191
</connections>
9292
</button>
9393
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="免费 I 开源 I 全新上线" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rgT-JF-NWq">
94-
<rect key="frame" x="124" y="372" width="127.5" height="16"/>
94+
<rect key="frame" x="124" y="227" width="127.5" height="16"/>
9595
<fontDescription key="fontDescription" type="system" pointSize="13"/>
9696
<color key="textColor" red="0.87450980392156863" green="0.88235294117647056" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
9797
<nil key="highlightedColor"/>

Example/VPInterfaceControllerDemo/VideoOSDevApp/PrefixHeader.pch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#define SCREENH_HEIGHT [UIScreen mainScreen].bounds.size.height
2828

29-
#define KENVIRONMENT VPUPDebugStateTest
29+
#define KENVIRONMENT VPUPDebugStateOnline
3030

3131
// Include any system framework and library headers here that should be included in all compilation units.
3232
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.

0 commit comments

Comments
 (0)