更换播放方式
This commit is contained in:
parent
2d91c06b27
commit
8c4ad06daa
@ -1048,7 +1048,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1.0;
|
CURRENT_PROJECT_VERSION = 1.1;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_TEAM = 8DQD6BV6H9;
|
DEVELOPMENT_TEAM = 8DQD6BV6H9;
|
||||||
ENABLE_APP_SANDBOX = NO;
|
ENABLE_APP_SANDBOX = NO;
|
||||||
@ -1077,7 +1077,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.5.1;
|
MARKETING_VERSION = 1.6;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
||||||
@ -1101,7 +1101,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1.0;
|
CURRENT_PROJECT_VERSION = 1.1;
|
||||||
DEVELOPMENT_TEAM = 8DQD6BV6H9;
|
DEVELOPMENT_TEAM = 8DQD6BV6H9;
|
||||||
ENABLE_APP_SANDBOX = NO;
|
ENABLE_APP_SANDBOX = NO;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
@ -1129,7 +1129,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.5.1;
|
MARKETING_VERSION = 1.6;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
||||||
|
|||||||
Binary file not shown.
@ -114,6 +114,8 @@ class ZZHCustomPlayer: UIView {
|
|||||||
|
|
||||||
avPlayerLayer = AVPlayerLayer(player: avPlayer)
|
avPlayerLayer = AVPlayerLayer(player: avPlayer)
|
||||||
avPlayerLayer?.frame = CGRect(x: 0, y: 0, width: Int(playerWidth), height: playerHeight)
|
avPlayerLayer?.frame = CGRect(x: 0, y: 0, width: Int(playerWidth), height: playerHeight)
|
||||||
|
// avPlayerLayer?.backgroundColor = UIColor.red.cgColor
|
||||||
|
avPlayerLayer?.videoGravity = .resizeAspectFill
|
||||||
playerLayerBgView!.layer.addSublayer(avPlayerLayer!)
|
playerLayerBgView!.layer.addSublayer(avPlayerLayer!)
|
||||||
playerLayerBgView?.backgroundColor = UIColor.clear
|
playerLayerBgView?.backgroundColor = UIColor.clear
|
||||||
|
|
||||||
@ -156,8 +158,8 @@ class ZZHCustomPlayer: UIView {
|
|||||||
playerIsSeeking = true
|
playerIsSeeking = true
|
||||||
self.avPlayer?.seek(to: ct,toleranceBefore:.zero,toleranceAfter: .zero)
|
self.avPlayer?.seek(to: ct,toleranceBefore:.zero,toleranceAfter: .zero)
|
||||||
if(!isMoving) {//结束拖动时,再进行播放
|
if(!isMoving) {//结束拖动时,再进行播放
|
||||||
// self.play(true)
|
self.play(true)
|
||||||
self.avPlayer?.play()
|
// self.avPlayer?.play()
|
||||||
self.playerIsSeeking = false
|
self.playerIsSeeking = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user