提交 7daffa30 编写于 作者: DCloud-yyl's avatar DCloud-yyl

Merge branch 'alpha'

# Conflicts:
#	uni_modules/uni-video/package.json
#	uni_modules/uni-video/utssdk/app-android/index.uts
#	uni_modules/uni-video/utssdk/app-android/index.vue
#	uni_modules/uni-video/utssdk/app-android/libs/videoplayer.aar
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/Info.plist
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/DCUniVideo
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/Headers/DCUniVideo-Swift.h
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/Info.plist
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios.abi.json
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios.private.swiftinterface
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios.swiftdoc
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios.swiftinterface
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/DCUniVideo
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Headers/DCUniVideo-Swift.h
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Info.plist
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.abi.json
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftdoc
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftinterface
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.abi.json
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftdoc
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftinterface
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/_CodeSignature/CodeDirectory
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/_CodeSignature/CodeRequirements-1
#	uni_modules/uni-video/utssdk/app-ios/frameworks/DCUniVideo.xcframework/ios-arm64_x86_64-simulator/DCUniVideo.framework/_CodeSignature/CodeResources
#	uni_modules/uni-video/utssdk/app-ios/index.vue
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
}, },
"uni_modules": { "uni_modules": {
"dependencies": [ "dependencies": [
"uni-framework" "uni-framework",
"uni-fileSystemManager"
], ],
"uni-ext-api": { "uni-ext-api": {
"uni": { "uni": {
......
...@@ -7,7 +7,7 @@ export const createVideoContext : CreateVideoContext = function (videoId : strin ...@@ -7,7 +7,7 @@ export const createVideoContext : CreateVideoContext = function (videoId : strin
if (component == null) { if (component == null) {
const pages = getCurrentPages(); const pages = getCurrentPages();
if (pages.length > 0) { if (pages.length > 0) {
videoElement = pages[pages.length - 1].$el?.parentNode?.querySelector('#' + videoId); videoElement = pages[pages.length - 1].vm!.$el?.parentNode?.querySelector('#' + videoId);
} }
} else { } else {
videoElement = component.$el?.parentNode?.querySelector('#' + videoId); videoElement = component.$el?.parentNode?.querySelector('#' + videoId);
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
import ViewGroup from 'android.view.ViewGroup'; import ViewGroup from 'android.view.ViewGroup';
import OnHierarchyChangeListener from 'android.view.ViewGroup.OnHierarchyChangeListener'; import OnHierarchyChangeListener from 'android.view.ViewGroup.OnHierarchyChangeListener';
import View from 'android.view.View'; import View from 'android.view.View';
import OnKeyListener from 'android.view.View.OnKeyListener';
import KeyEvent from 'android.view.KeyEvent';
import WindowManager from 'android.view.WindowManager'; import WindowManager from 'android.view.WindowManager';
import TextUtils from 'android.text.TextUtils'; import TextUtils from 'android.text.TextUtils';
import JSONObject from 'org.json.JSONObject'; import JSONObject from 'org.json.JSONObject';
...@@ -32,6 +34,8 @@ ...@@ -32,6 +34,8 @@
import Glide from 'com.bumptech.glide.Glide'; import Glide from 'com.bumptech.glide.Glide';
import File from 'java.io.File';
import { Danmu, RequestFullScreenOptions } from '../interface.uts'; import { Danmu, RequestFullScreenOptions } from '../interface.uts';
import { UniVideoTimeUpdateEventDetail, UniVideoFullScreenChangeEventDetail, UniVideoProgressEventDetail, UniVideoFullScreenClickEventDetail, UniVideoControlsToggleEventDetail } from '../interface.uts'; import { UniVideoTimeUpdateEventDetail, UniVideoFullScreenChangeEventDetail, UniVideoProgressEventDetail, UniVideoFullScreenClickEventDetail, UniVideoControlsToggleEventDetail } from '../interface.uts';
import { UniVideoTimeUpdateEventImpl, UniVideoFullScreenChangeEventImpl, UniVideoErrorEventImpl, UniVideoProgressEventImpl, UniVideoFullScreenClickEventImpl, UniVideoControlsToggleEventImpl } from './event.uts'; import { UniVideoTimeUpdateEventImpl, UniVideoFullScreenChangeEventImpl, UniVideoErrorEventImpl, UniVideoProgressEventImpl, UniVideoFullScreenClickEventImpl, UniVideoControlsToggleEventImpl } from './event.uts';
...@@ -52,7 +56,8 @@ ...@@ -52,7 +56,8 @@
screenHeight: 0, screenHeight: 0,
layoutWidth: 0, layoutWidth: 0,
layoutHeight: 0, layoutHeight: 0,
videoBox: null as FrameLayout | null videoBox: null as FrameLayout | null,
copyPath: ''
}; };
}, },
emits: ["play", "pause", "ended", "timeupdate", "fullscreenchange", "waiting", "error", "progress", "fullscreenclick", "controlstoggle"], emits: ["play", "pause", "ended", "timeupdate", "fullscreenchange", "waiting", "error", "progress", "fullscreenclick", "controlstoggle"],
...@@ -402,6 +407,9 @@ ...@@ -402,6 +407,9 @@
this.playerView?.setOnErrorListener(new OnErrorListenerImpl(this)); this.playerView?.setOnErrorListener(new OnErrorListenerImpl(this));
this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this)); this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this));
this.playerView?.setOnHierarchyChangeListener(new OnHierarchyChangeListenerImpl(this)); this.playerView?.setOnHierarchyChangeListener(new OnHierarchyChangeListenerImpl(this));
this.playerView?.setOnKeyListener(new OnKeyListenerImpl(this));
this.playerView?.setFocusable(true);
this.playerView?.setFocusableInTouchMode(true);
}, },
NVLayouted() { NVLayouted() {
if (!this.isFirstLayoutFinished) { if (!this.isFirstLayoutFinished) {
...@@ -421,9 +429,11 @@ ...@@ -421,9 +429,11 @@
if (isFullScreenChanged) { if (isFullScreenChanged) {
isFullScreenChanged = false; isFullScreenChanged = false;
if (this.playerView!.isFullscreen()) { if (this.playerView!.isFullscreen()) {
this.playerView?.requestFocus();
if (this.getLayoutWidth() != this.screenHeight) this.setStyleWidth(this.screenHeight.toFloat()); if (this.getLayoutWidth() != this.screenHeight) this.setStyleWidth(this.screenHeight.toFloat());
if (this.getLayoutHeight() != this.screenWidth) this.setStyleHeight(this.screenWidth.toFloat()); if (this.getLayoutHeight() != this.screenWidth) this.setStyleHeight(this.screenWidth.toFloat());
} else { } else {
this.playerView?.clearFocus();
if (this.getLayoutWidth() != this.layoutWidth) this.setStyleWidth(this.layoutWidth.toFloat()); if (this.getLayoutWidth() != this.layoutWidth) this.setStyleWidth(this.layoutWidth.toFloat());
if (this.getLayoutHeight() != this.layoutHeight) this.setStyleHeight(this.layoutHeight.toFloat()); if (this.getLayoutHeight() != this.layoutHeight) this.setStyleHeight(this.layoutHeight.toFloat());
} }
...@@ -434,6 +444,10 @@ ...@@ -434,6 +444,10 @@
this.playerView?.onDestroy(); this.playerView?.onDestroy();
this.playerView = null; this.playerView = null;
} }
if (!this.copyPath.isEmpty()) {
const file = new File(this.copyPath);
if (file.exists()) file.delete();
}
}, },
NVRecycler() { NVRecycler() {
this.playerView = this.$el; this.playerView = this.$el;
...@@ -577,7 +591,21 @@ ...@@ -577,7 +591,21 @@
if (src.startsWith("https://") || src.startsWith("http://") || src.startsWith("rtmp://") || src.startsWith("rtsp://")) { // 网络地址 if (src.startsWith("https://") || src.startsWith("http://") || src.startsWith("rtmp://") || src.startsWith("rtsp://")) { // 网络地址
return src; return src;
} else { // 本地地址 } else { // 本地地址
return UTSAndroid.convert2AbsFullPath(src); const path = UTSAndroid.convert2AbsFullPath(src);
if (path.startsWith('/android_asset')) {
const destDirPath = UTSAndroid.getAppContext()!.getCacheDir().getAbsolutePath() + '/uni-net-cache/video/';
const destDir = new File(destDirPath);
if (!destDir.exists()) destDir.mkdirs();
const destFilePath = destDirPath + path.substring(path.lastIndexOf('/') + 1);
const destFile = new File(destFilePath);
if (!destFile.exists()) {
destFile.createNewFile();
uni.getFileSystemManager().copyFileSync(src, destFilePath);
}
this.copyPath = destFilePath;
return destFilePath;
}
return path;
} }
}, },
/** /**
...@@ -604,6 +632,8 @@ ...@@ -604,6 +632,8 @@
this.playerView?.setOnBufferingUpdateListener(new OnBufferingUpdateListenerImpl(this)); this.playerView?.setOnBufferingUpdateListener(new OnBufferingUpdateListenerImpl(this));
this.playerView?.setOnErrorListener(new OnErrorListenerImpl(this)); this.playerView?.setOnErrorListener(new OnErrorListenerImpl(this));
this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this)); this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this));
this.playerView?.setOnHierarchyChangeListener(new OnHierarchyChangeListenerImpl(this));
this.playerView?.setOnKeyListener(new OnKeyListenerImpl(this));
} }
} }
} }
...@@ -653,7 +683,13 @@ ...@@ -653,7 +683,13 @@
this.comp.$emit("fullscreenclick", new UniVideoFullScreenClickEventImpl(JSON.parse<UniVideoFullScreenClickEventDetail>(msg)!)); this.comp.$emit("fullscreenclick", new UniVideoFullScreenClickEventImpl(JSON.parse<UniVideoFullScreenClickEventDetail>(msg)!));
break; break;
case "controlstoggle": case "controlstoggle":
this.comp.$emit("controlstoggle", new UniVideoControlsToggleEventImpl(JSON.parse<UniVideoControlsToggleEventDetail>(msg)!)); const detail = JSON.parse<UniVideoControlsToggleEventDetail>(msg)!;
if (detail.show && this.playerView.isFullscreen()) {
setTimeout(() => {
if (!this.playerView.isFocused()) this.playerView.requestFocus();
}, 100);
}
this.comp.$emit("controlstoggle", new UniVideoControlsToggleEventImpl(detail));
break; break;
case "error": case "error":
this.comp.$emit("error", new UniVideoErrorEventImpl(new VideoErrorImpl(100001))); this.comp.$emit("error", new UniVideoErrorEventImpl(new VideoErrorImpl(100001)));
...@@ -762,8 +798,9 @@ ...@@ -762,8 +798,9 @@
this.playerView.pause(); this.playerView.pause();
this.playerView.setCenterPlayBntVisibility((this.comp as VideoComponent).showCenterPlayBtn); this.playerView.setCenterPlayBntVisibility((this.comp as VideoComponent).showCenterPlayBtn);
(this.comp as VideoComponent).currentPos = this.playerView.getCurPosition(); (this.comp as VideoComponent).currentPos = this.playerView.getCurPosition();
(this.comp as VideoComponent).currentFrame?.recycle(); const frame = this.playerView.captureFrame();
(this.comp as VideoComponent).currentFrame = this.playerView.captureFrame(); (this.comp as VideoComponent).currentFrame = frame;
this.playerView.showLastFrame(frame);
} }
} }
} }
...@@ -793,4 +830,26 @@ ...@@ -793,4 +830,26 @@
} }
} }
class OnKeyListenerImpl implements OnKeyListener {
private comp : UTSContainer<IjkPlayerView>;
private playerView : IjkPlayerView;
constructor(comp : UTSContainer<IjkPlayerView>) {
super();
this.comp = comp;
this.playerView = comp.$el!;
}
override onKey(v : View, keyCode : Int, event : KeyEvent) : Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {
if (this.playerView.isFullscreen()) {
(this.comp as VideoComponent).exitFullScreen();
return true;
}
}
return false;
}
}
</script> </script>
\ No newline at end of file
...@@ -8,32 +8,32 @@ ...@@ -8,32 +8,32 @@
<key>BinaryPath</key> <key>BinaryPath</key>
<string>DCUniVideo.framework/DCUniVideo</string> <string>DCUniVideo.framework/DCUniVideo</string>
<key>LibraryIdentifier</key> <key>LibraryIdentifier</key>
<string>ios-arm64</string> <string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key> <key>LibraryPath</key>
<string>DCUniVideo.framework</string> <string>DCUniVideo.framework</string>
<key>SupportedArchitectures</key> <key>SupportedArchitectures</key>
<array> <array>
<string>arm64</string> <string>arm64</string>
<string>x86_64</string>
</array> </array>
<key>SupportedPlatform</key> <key>SupportedPlatform</key>
<string>ios</string> <string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict> </dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>DCUniVideo.framework/DCUniVideo</string> <string>DCUniVideo.framework/DCUniVideo</string>
<key>LibraryIdentifier</key> <key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string> <string>ios-arm64</string>
<key>LibraryPath</key> <key>LibraryPath</key>
<string>DCUniVideo.framework</string> <string>DCUniVideo.framework</string>
<key>SupportedArchitectures</key> <key>SupportedArchitectures</key>
<array> <array>
<string>arm64</string> <string>arm64</string>
<string>x86_64</string>
</array> </array>
<key>SupportedPlatform</key> <key>SupportedPlatform</key>
<string>ios</string> <string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict> </dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
......
#if 0 #if 0
#elif defined(__arm64__) && __arm64__ #elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
#ifndef DCUNIVIDEO_SWIFT_H #ifndef DCUNIVIDEO_SWIFT_H
#define DCUNIVIDEO_SWIFT_H #define DCUNIVIDEO_SWIFT_H
#pragma clang diagnostic push #pragma clang diagnostic push
...@@ -339,6 +339,15 @@ SWIFT_CLASS("_TtC10DCUniVideo13HJDanmakuView") ...@@ -339,6 +339,15 @@ SWIFT_CLASS("_TtC10DCUniVideo13HJDanmakuView")
SWIFT_CLASS("_TtC10DCUniVideo23UniMonitoredContentView")
@interface UniMonitoredContentView : UIView
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
- (void)didAddSubview:(UIView * _Nonnull)subview;
- (void)layoutSubviews;
@end
SWIFT_CLASS("_TtC10DCUniVideo20UniVideoPlayerConfig") SWIFT_CLASS("_TtC10DCUniVideo20UniVideoPlayerConfig")
@interface UniVideoPlayerConfig : NSObject @interface UniVideoPlayerConfig : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE; - (nonnull instancetype)init SWIFT_UNAVAILABLE;
......
// swift-interface-format-version: 1.0 // swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniVideo // swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name DCUniVideo
// swift-module-flags-ignorable: -enable-bare-slash-regex
import AVFAudio import AVFAudio
import AVFoundation import AVFoundation
import CommonCrypto import CommonCrypto
...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?) func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void) func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void)
func videoPlayerWillEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerWillExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen() func lockScreen()
...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> Swift.String func workRootPath() -> Swift.String
func videoCacheDir() -> Swift.String func videoCacheDir() -> Swift.String
} }
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class UniMonitoredContentView : UIKit.UIView {
@_Concurrency.MainActor(unsafe) @objc override dynamic public func didAddSubview(_ subview: UIKit.UIView)
@_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
@objc deinit
}
final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
public typealias View = DCUniVideo.UniVideoPlayerView public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get get
set set
} }
final public var contentView: UIKit.UIView { final public var contentView: DCUniVideo.UniMonitoredContentView {
get get
set set
} }
...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit @objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect) final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
} }
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent { extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play() final public func play()
final public func pause() final public func pause()
......
// swift-interface-format-version: 1.0 // swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniVideo // swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name DCUniVideo
// swift-module-flags-ignorable: -enable-bare-slash-regex
import AVFAudio import AVFAudio
import AVFoundation import AVFoundation
import CommonCrypto import CommonCrypto
...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?) func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void) func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void)
func videoPlayerWillEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerWillExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen() func lockScreen()
...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> Swift.String func workRootPath() -> Swift.String
func videoCacheDir() -> Swift.String func videoCacheDir() -> Swift.String
} }
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class UniMonitoredContentView : UIKit.UIView {
@_Concurrency.MainActor(unsafe) @objc override dynamic public func didAddSubview(_ subview: UIKit.UIView)
@_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
@objc deinit
}
final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
public typealias View = DCUniVideo.UniVideoPlayerView public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get get
set set
} }
final public var contentView: UIKit.UIView { final public var contentView: DCUniVideo.UniMonitoredContentView {
get get
set set
} }
...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit @objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect) final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
} }
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent { extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play() final public func play()
final public func pause() final public func pause()
......
#if 0 #if 0
#elif defined(__arm64__) && __arm64__ #elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
#ifndef DCUNIVIDEO_SWIFT_H #ifndef DCUNIVIDEO_SWIFT_H
#define DCUNIVIDEO_SWIFT_H #define DCUNIVIDEO_SWIFT_H
#pragma clang diagnostic push #pragma clang diagnostic push
...@@ -339,6 +339,15 @@ SWIFT_CLASS("_TtC10DCUniVideo13HJDanmakuView") ...@@ -339,6 +339,15 @@ SWIFT_CLASS("_TtC10DCUniVideo13HJDanmakuView")
SWIFT_CLASS("_TtC10DCUniVideo23UniMonitoredContentView")
@interface UniMonitoredContentView : UIView
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
- (void)didAddSubview:(UIView * _Nonnull)subview;
- (void)layoutSubviews;
@end
SWIFT_CLASS("_TtC10DCUniVideo20UniVideoPlayerConfig") SWIFT_CLASS("_TtC10DCUniVideo20UniVideoPlayerConfig")
@interface UniVideoPlayerConfig : NSObject @interface UniVideoPlayerConfig : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE; - (nonnull instancetype)init SWIFT_UNAVAILABLE;
...@@ -373,7 +382,7 @@ SWIFT_CLASS("_TtC10DCUniVideo18UniVideoPlayerView") ...@@ -373,7 +382,7 @@ SWIFT_CLASS("_TtC10DCUniVideo18UniVideoPlayerView")
#endif #endif
#elif defined(__x86_64__) && __x86_64__ #elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
#ifndef DCUNIVIDEO_SWIFT_H #ifndef DCUNIVIDEO_SWIFT_H
#define DCUNIVIDEO_SWIFT_H #define DCUNIVIDEO_SWIFT_H
#pragma clang diagnostic push #pragma clang diagnostic push
...@@ -712,6 +721,15 @@ SWIFT_CLASS("_TtC10DCUniVideo13HJDanmakuView") ...@@ -712,6 +721,15 @@ SWIFT_CLASS("_TtC10DCUniVideo13HJDanmakuView")
SWIFT_CLASS("_TtC10DCUniVideo23UniMonitoredContentView")
@interface UniMonitoredContentView : UIView
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
- (void)didAddSubview:(UIView * _Nonnull)subview;
- (void)layoutSubviews;
@end
SWIFT_CLASS("_TtC10DCUniVideo20UniVideoPlayerConfig") SWIFT_CLASS("_TtC10DCUniVideo20UniVideoPlayerConfig")
@interface UniVideoPlayerConfig : NSObject @interface UniVideoPlayerConfig : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE; - (nonnull instancetype)init SWIFT_UNAVAILABLE;
......
// swift-interface-format-version: 1.0 // swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniVideo // swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name DCUniVideo
// swift-module-flags-ignorable: -enable-bare-slash-regex
import AVFAudio import AVFAudio
import AVFoundation import AVFoundation
import CommonCrypto import CommonCrypto
...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?) func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void) func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void)
func videoPlayerWillEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerWillExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen() func lockScreen()
...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> Swift.String func workRootPath() -> Swift.String
func videoCacheDir() -> Swift.String func videoCacheDir() -> Swift.String
} }
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class UniMonitoredContentView : UIKit.UIView {
@_Concurrency.MainActor(unsafe) @objc override dynamic public func didAddSubview(_ subview: UIKit.UIView)
@_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
@objc deinit
}
final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
public typealias View = DCUniVideo.UniVideoPlayerView public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get get
set set
} }
final public var contentView: UIKit.UIView { final public var contentView: DCUniVideo.UniMonitoredContentView {
get get
set set
} }
...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit @objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect) final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
} }
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent { extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play() final public func play()
final public func pause() final public func pause()
......
// swift-interface-format-version: 1.0 // swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniVideo // swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name DCUniVideo
// swift-module-flags-ignorable: -enable-bare-slash-regex
import AVFAudio import AVFAudio
import AVFoundation import AVFoundation
import CommonCrypto import CommonCrypto
...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?) func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void) func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void)
func videoPlayerWillEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerWillExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen() func lockScreen()
...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> Swift.String func workRootPath() -> Swift.String
func videoCacheDir() -> Swift.String func videoCacheDir() -> Swift.String
} }
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class UniMonitoredContentView : UIKit.UIView {
@_Concurrency.MainActor(unsafe) @objc override dynamic public func didAddSubview(_ subview: UIKit.UIView)
@_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
@objc deinit
}
final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
public typealias View = DCUniVideo.UniVideoPlayerView public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get get
set set
} }
final public var contentView: UIKit.UIView { final public var contentView: DCUniVideo.UniMonitoredContentView {
get get
set set
} }
...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit @objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect) final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
} }
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent { extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play() final public func play()
final public func pause() final public func pause()
......
// swift-interface-format-version: 1.0 // swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniVideo // swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name DCUniVideo
// swift-module-flags-ignorable: -enable-bare-slash-regex
import AVFAudio import AVFAudio
import AVFoundation import AVFoundation
import CommonCrypto import CommonCrypto
...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?) func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void) func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void)
func videoPlayerWillEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerWillExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen() func lockScreen()
...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> Swift.String func workRootPath() -> Swift.String
func videoCacheDir() -> Swift.String func videoCacheDir() -> Swift.String
} }
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class UniMonitoredContentView : UIKit.UIView {
@_Concurrency.MainActor(unsafe) @objc override dynamic public func didAddSubview(_ subview: UIKit.UIView)
@_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
@objc deinit
}
final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
public typealias View = DCUniVideo.UniVideoPlayerView public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get get
set set
} }
final public var contentView: UIKit.UIView { final public var contentView: DCUniVideo.UniMonitoredContentView {
get get
set set
} }
...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit @objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect) final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
} }
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent { extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play() final public func play()
final public func pause() final public func pause()
......
// swift-interface-format-version: 1.0 // swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) // swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniVideo // swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name DCUniVideo
// swift-module-flags-ignorable: -enable-bare-slash-regex
import AVFAudio import AVFAudio
import AVFoundation import AVFoundation
import CommonCrypto import CommonCrypto
...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?) func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void) func loadImage(_ url: Swift.String, _ complete: @escaping (UIKit.UIImage) -> Swift.Void)
func videoPlayerWillEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerWillExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerExitFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation) func videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen() func lockScreen()
...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject { ...@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> Swift.String func workRootPath() -> Swift.String
func videoCacheDir() -> Swift.String func videoCacheDir() -> Swift.String
} }
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor(unsafe) public class UniMonitoredContentView : UIKit.UIView {
@_Concurrency.MainActor(unsafe) @objc override dynamic public func didAddSubview(_ subview: UIKit.UIView)
@_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
@objc deinit
}
final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
public typealias View = DCUniVideo.UniVideoPlayerView public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get get
set set
} }
final public var contentView: UIKit.UIView { final public var contentView: DCUniVideo.UniMonitoredContentView {
get get
set set
} }
...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent { ...@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit @objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect) final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
} }
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent { extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play() final public func play()
final public func pause() final public func pause()
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Headers/DCUniVideo-Swift.h</key> <key>Headers/DCUniVideo-Swift.h</key>
<data> <data>
8RtESNpNJ/MLh4AISu16ekCnNgM= 6AI8KDmmckpzHIE9MTA87TBlOEA=
</data> </data>
<key>Headers/DCUniVideo.h</key> <key>Headers/DCUniVideo.h</key>
<data> <data>
...@@ -18,55 +18,55 @@ ...@@ -18,55 +18,55 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
ZJfU/z0myJ2FJ6v4FI5s1po6+18= 4STIX+M3zL3GrGrwOIBZ35QNXpQ=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key> <key>Modules/DCUniVideo.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
<data> <data>
LMw61NwrRpA08JKfgcEYaj3bC4s= /CTSTQuMxlC70vyU7iOX8wGDf+4=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key> <key>Modules/DCUniVideo.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
<data> <data>
7RwLqhAfiKvxA+Cxv6/N962PpOg= 64wiXw8pS4gsJb8AmmNjU/dce+M=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.abi.json</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<data> <data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4= 6g7piUV4/cufnba98Op8+kJw65E=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<data> <data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM= AT+Uc934hqQ5s7XiudgE4R+Klag=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<data> <data>
zaMs+qbaViQJV9jdtXLqo29LabM= skvNhIA0R3GI+di1j0sdu/54Jgo=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<data> <data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM= AT+Uc934hqQ5s7XiudgE4R+Klag=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<data> <data>
gR2m/jlpxNCVmIfuV+qVvd6FVoE= 4WOy1OqT/1CovEL8hNH7mPVwr/U=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.abi.json</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<data> <data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4= 6g7piUV4/cufnba98Op8+kJw65E=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<data> <data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ= 9EbVYjfn5tKvGE1pRend6D42C7g=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<data> <data>
tMymyR7BzfUWQ9cTfV/3r+zajeY= WeMQjnMJwgj3QZJ6JvPtSkLHDfw=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<data> <data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ= 9EbVYjfn5tKvGE1pRend6D42C7g=
</data> </data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<data> <data>
p+SyNnDNf1lc0DyiX5aiSin5puk= 868ltQGQ9ZGE5Iyk1H7oWXmN8JY=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -79,11 +79,11 @@ ...@@ -79,11 +79,11 @@
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
8RtESNpNJ/MLh4AISu16ekCnNgM= 6AI8KDmmckpzHIE9MTA87TBlOEA=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
6rkDl2fzm2saIt4Lj2MYeOP5Z1dDjaCYAEu7PhIdI/k= N818DwGCZblozLzhJGHxkM9CUzR3/hgBV+b2dliE1bk=
</data> </data>
</dict> </dict>
<key>Headers/DCUniVideo.h</key> <key>Headers/DCUniVideo.h</key>
...@@ -112,132 +112,132 @@ ...@@ -112,132 +112,132 @@
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
LMw61NwrRpA08JKfgcEYaj3bC4s= /CTSTQuMxlC70vyU7iOX8wGDf+4=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
rQ6ecTyNYorIWSPYIIIvMKXzPCj9nGj+LNKMEIJBP5U= mXFCGPbsKJ1JiOP54zWfFztb2vrPw+3oQonSw3l6RUc=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key> <key>Modules/DCUniVideo.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
7RwLqhAfiKvxA+Cxv6/N962PpOg= 64wiXw8pS4gsJb8AmmNjU/dce+M=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
Un6dHCBddlRbwPe/xkfXUJUkqJfmlwC9uhfZwcpAHos= BLjUlDgXs4UIoOKdAhIC+N1JYbZpgOOlezMlmxeFbO4=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.abi.json</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4= 6g7piUV4/cufnba98Op8+kJw65E=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
G6BCmgVzUh+8PT4Vb2Mo2M57OK54006L7d81dNPspfY= JQ/uRwcNEZAemsl2XxnN+U1LH2g5HWw9hODc1t6xrSk=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM= AT+Uc934hqQ5s7XiudgE4R+Klag=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
fGUfQRyQkDydTP0YQ2ycZuJ+xLOTauxL6nBJJtVHeUo= OcfDfHnBnZ1Cc8+ED7WInmje9+thSxUDvdHE7HK2UdQ=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
zaMs+qbaViQJV9jdtXLqo29LabM= skvNhIA0R3GI+di1j0sdu/54Jgo=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
ltXhZrQmuZPwZ/zatuXP0+KdjKP8anH8ihgjTcDuFzc= lNWH1MV4Mzre1nP4Za3ZX5YObDq5i/XHbsm1fIREytI=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM= AT+Uc934hqQ5s7XiudgE4R+Klag=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
fGUfQRyQkDydTP0YQ2ycZuJ+xLOTauxL6nBJJtVHeUo= OcfDfHnBnZ1Cc8+ED7WInmje9+thSxUDvdHE7HK2UdQ=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key> <key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
gR2m/jlpxNCVmIfuV+qVvd6FVoE= 4WOy1OqT/1CovEL8hNH7mPVwr/U=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
kSBWEAVrVxWfOnEsU4ryWR+gx8eY6RmX8ppIpJlBx9A= z+56Py2JAl94oNNpRG54OpTOYx6MytxbwujY5jTFiwc=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.abi.json</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4= 6g7piUV4/cufnba98Op8+kJw65E=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
G6BCmgVzUh+8PT4Vb2Mo2M57OK54006L7d81dNPspfY= JQ/uRwcNEZAemsl2XxnN+U1LH2g5HWw9hODc1t6xrSk=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ= 9EbVYjfn5tKvGE1pRend6D42C7g=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
VzdCbPQNtj1hylfhs2PD3X4eBPdh0GAfIBhp+KSR+P4= ElH2U0ZxMym5pgUUeycsjfZ8NlPNEW7dLNFHVhUIRUk=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
tMymyR7BzfUWQ9cTfV/3r+zajeY= WeMQjnMJwgj3QZJ6JvPtSkLHDfw=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
9dLnwDexyVteRT+z/YK1LMyqtXXzArso9N35QjFp6bU= nqCcouRnuFnUpuLy2+rb6C6BrrEytmIDxcf70dIRpyU=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ= 9EbVYjfn5tKvGE1pRend6D42C7g=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
VzdCbPQNtj1hylfhs2PD3X4eBPdh0GAfIBhp+KSR+P4= ElH2U0ZxMym5pgUUeycsjfZ8NlPNEW7dLNFHVhUIRUk=
</data> </data>
</dict> </dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key> <key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<dict> <dict>
<key>hash</key> <key>hash</key>
<data> <data>
p+SyNnDNf1lc0DyiX5aiSin5puk= 868ltQGQ9ZGE5Iyk1H7oWXmN8JY=
</data> </data>
<key>hash2</key> <key>hash2</key>
<data> <data>
AYg5nbZM23N1eAD0JL/9x+MWHN0Lplo1fiDhPwHVPtc= QwlZD6edjFe9YD6Q6lQL7b23TVaPh7+GWMOLiEahBsc=
</data> </data>
</dict> </dict>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
......
<template> <template>
<view style="width: 300px;height: 225px;"> <view style="width: 300px;height: 225px;">
<slot /> <slot />
...@@ -6,9 +7,10 @@ ...@@ -6,9 +7,10 @@
<script lang="uts"> <script lang="uts">
import { UniVideoPlayerConfig, UniVideoPlayerViewPresent } from "DCUniVideo" assert { type: "implementationOnly" }; import { UniVideoPlayerConfig, UniVideoPlayerViewPresent } from "DCUniVideo" assert { type: "implementationOnly" };
import { URL, NSDictionary, CGFloat } from "Foundation"; import { URL, NSDictionary, CGFloat } from "Foundation";
import { UIImage, UIInterfaceOrientationMask, UIInterfaceOrientation, UIView } from 'UIKit'; import { UIImage, UIInterfaceOrientationMask, UIInterfaceOrientation, UIView, UIScreen, CGRect } from 'UIKit';
import { Bool, Int } from 'Swift'; import { Bool, Int } from 'Swift';
import { Danmu } from "../interface.uts" import { Danmu } from "../interface.uts";
import { UniCssFlexEdge } from "DCloudUniappRuntime";
export default { export default {
name: "video", name: "video",
...@@ -146,42 +148,42 @@ ...@@ -146,42 +148,42 @@
immediate: false immediate: false
}, },
"autoplay": { "autoplay": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("autoplay", newValue); this?.updateProp("autoplay", newValue);
}, },
immediate: false immediate: false
}, },
"loop": { "loop": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("loop", newValue); this?.updateProp("loop", newValue);
}, },
immediate: false immediate: false
}, },
"muted": { "muted": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("muted", newValue); this?.updateProp("muted", newValue);
}, },
immediate: false immediate: false
}, },
"initialTime": { "initialTime": {
handler(newValue: Number, oldValue: Number) { handler(newValue : Number, oldValue : Number) {
"[weak self]" "[weak self]"
this?.updateProp("initialTime", newValue); this?.updateProp("initialTime", newValue);
}, },
immediate: false immediate: false
}, },
"duration": { "duration": {
handler(newValue: Number, oldValue: Number) { handler(newValue : Number, oldValue : Number) {
"[weak self]" "[weak self]"
this?.updateProp("duration", newValue); this?.updateProp("duration", newValue);
}, },
immediate: false immediate: false
}, },
"controls": { "controls": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("controls", newValue); this?.updateProp("controls", newValue);
}, },
...@@ -195,140 +197,140 @@ ...@@ -195,140 +197,140 @@
immediate: false immediate: false
}, },
"danmuBtn": { "danmuBtn": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("danmuBtn", newValue); this?.updateProp("danmuBtn", newValue);
}, },
immediate: false immediate: false
}, },
"enableDanmu": { "enableDanmu": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("enableDanmu", newValue); this?.updateProp("enableDanmu", newValue);
}, },
immediate: false immediate: false
}, },
"pageGesture": { "pageGesture": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("pageGesture", newValue); this?.updateProp("pageGesture", newValue);
}, },
immediate: false immediate: false
}, },
"direction": { "direction": {
handler(newValue: Number, oldValue: Number) { handler(newValue : Number, oldValue : Number) {
"[weak self]" "[weak self]"
this?.updateProp("direction", newValue); this?.updateProp("direction", newValue);
}, },
immediate: false immediate: false
}, },
"showProgress": { "showProgress": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("showProgress", newValue); this?.updateProp("showProgress", newValue);
}, },
immediate: false immediate: false
}, },
"showFullscreenBtn": { "showFullscreenBtn": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("showFullscreenBtn", newValue); this?.updateProp("showFullscreenBtn", newValue);
}, },
immediate: false immediate: false
}, },
"showPlayBtn": { "showPlayBtn": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("showPlayBtn", newValue); this?.updateProp("showPlayBtn", newValue);
}, },
immediate: false immediate: false
}, },
"showCenterPlayBtn": { "showCenterPlayBtn": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("showCenterPlayBtn", newValue); this?.updateProp("showCenterPlayBtn", newValue);
}, },
immediate: false immediate: false
}, },
"showLoading": { "showLoading": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("showLoading", newValue); this?.updateProp("showLoading", newValue);
}, },
immediate: false immediate: false
}, },
"enableProgressGesture": { "enableProgressGesture": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("enableProgressGesture", newValue); this?.updateProp("enableProgressGesture", newValue);
}, },
immediate: false immediate: false
}, },
"objectFit": { "objectFit": {
handler(newValue: String, oldValue: String) { handler(newValue : String, oldValue : String) {
"[weak self]" "[weak self]"
this?.updateProp("objectFit", newValue); this?.updateProp("objectFit", newValue);
}, },
immediate: false immediate: false
}, },
"poster": { "poster": {
handler(newValue: String, oldValue: String) { handler(newValue : String, oldValue : String) {
"[weak self]" "[weak self]"
this?.updateProp("poster", newValue); this?.updateProp("poster", newValue);
}, },
immediate: false immediate: false
}, },
"showMuteBtn": { "showMuteBtn": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("showMuteBtn", newValue); this?.updateProp("showMuteBtn", newValue);
}, },
immediate: false immediate: false
}, },
"title": { "title": {
handler(newValue: String, oldValue: String) { handler(newValue : String, oldValue : String) {
"[weak self]" "[weak self]"
this?.updateProp("title", newValue); this?.updateProp("title", newValue);
}, },
immediate: false immediate: false
}, },
"enablePlayGesture": { "enablePlayGesture": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("enablePlayGesture", newValue); this?.updateProp("enablePlayGesture", newValue);
}, },
immediate: false immediate: false
}, },
"vslideGesture": { "vslideGesture": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("vslideGesture", newValue); this?.updateProp("vslideGesture", newValue);
}, },
immediate: false immediate: false
}, },
"vslideGestureInFullscreen": { "vslideGestureInFullscreen": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("vslideGestureInFullscreen", newValue); this?.updateProp("vslideGestureInFullscreen", newValue);
}, },
immediate: false immediate: false
}, },
"httpCache": { "httpCache": {
handler(newValue: Boolean, oldValue: Boolean) { handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]" "[weak self]"
this?.updateProp("httpCache", newValue); this?.updateProp("httpCache", newValue);
}, },
immediate: false immediate: false
}, },
"codec": { "codec": {
handler(newValue: string, oldValue: string) { handler(newValue : string, oldValue : string) {
"[weak self]" "[weak self]"
this?.updateProp("codec", newValue); this?.updateProp("codec", newValue);
}, },
immediate: false immediate: false
}, },
"playStrategy": { "playStrategy": {
handler(newValue: number, oldValue: number) { handler(newValue : number, oldValue : number) {
"[weak self]" "[weak self]"
this?.updateProp("playStrategy", newValue); this?.updateProp("playStrategy", newValue);
}, },
...@@ -359,7 +361,7 @@ ...@@ -359,7 +361,7 @@
NVLoad() : UIView { NVLoad() : UIView {
if (this.present != null) { if (this.present != null) {
return this.present!.contentView; return this.present!.contentView;
} else{ } else {
return new UIView() return new UIView()
} }
}, },
...@@ -416,7 +418,7 @@ ...@@ -416,7 +418,7 @@
stop: function () { stop: function () {
this.present?.stop() this.present?.stop()
}, },
/**  /**
* 显示状态栏,仅在iOS全屏下有效 * 显示状态栏,仅在iOS全屏下有效
*/ */
showStatusBar: function () { showStatusBar: function () {
...@@ -444,8 +446,8 @@ ...@@ -444,8 +446,8 @@
this.present?.palybackRate(rate); this.present?.palybackRate(rate);
}, },
updateProp: function (key: string, value: any | null) { updateProp: function (key : string, value : any | null) {
DispatchQueue.main.async(execute=():void => { DispatchQueue.main.async(execute = () : void => {
this.present?.setControlValue(value, key) this.present?.setControlValue(value, key)
}) })
...@@ -455,23 +457,25 @@ ...@@ -455,23 +457,25 @@
@UTSiOS.keyword("private") @UTSiOS.keyword("private")
class DCloudUniVideoComponentDelegate implements UniVideoPlayerProtocol { class DCloudUniVideoComponentDelegate implements UniVideoPlayerProtocol {
@UTSiOS.keyword("weak") @UTSiOS.keyword("weak")
private component: VideoComponent | null = null private component : VideoComponent | null = null
private originalFrame : CGRect | null = null
constructor(component: VideoComponent) { //todotest
constructor(component : VideoComponent) {
this.component = component this.component = component
super.init() super.init()
} }
getCookieString(url: URL): string | null { getCookieString(url : URL) : string | null {
return UTSiOS.getCookieString(url) return UTSiOS.getCookieString(url)
} }
getCurrentUA(): string { getCurrentUA() : string {
return UTSiOS.getUserAgent() return UTSiOS.getUserAgent()
} }
sendEvent(name: string, params: Dictionary<string,any> | null) { sendEvent(name : string, params : Dictionary<string, any> | null) {
switch (name){ switch (name) {
case "play": case "play":
case "pause": case "pause":
case "waiting": case "waiting":
...@@ -491,9 +495,9 @@ ...@@ -491,9 +495,9 @@
} }
} }
loadImage(url: string, complete: (image: UIImage) => void) { loadImage(url : string, complete : (image : UIImage) => void) {
UTSiOS.loadImage(url,(image,data) => { UTSiOS.loadImage(url, (image, data) => {
if(image != null){ if (image != null) {
complete(image!); complete(image!);
} }
}); });
...@@ -507,27 +511,27 @@ ...@@ -507,27 +511,27 @@
UTSiOS.unlockScreen() UTSiOS.unlockScreen()
} }
setFullScreen(yesOrNo: boolean) { setFullScreen(yesOrNo : boolean) {
UTSiOS.setFullScreen(yesOrNo) UTSiOS.setFullScreen(yesOrNo)
} }
setHomeIndicatorAutoHidden(yesOrNo: boolean) { setHomeIndicatorAutoHidden(yesOrNo : boolean) {
UTSiOS.setHomeIndicatorAutoHidden(yesOrNo) UTSiOS.setHomeIndicatorAutoHidden(yesOrNo)
} }
setTempOrientation(temp: UIInterfaceOrientationMask) { setTempOrientation(temp : UIInterfaceOrientationMask) {
UTSiOS.setTempOrientation(temp) UTSiOS.setTempOrientation(temp)
} }
configSupportOrientation(orientation: UIInterfaceOrientation): boolean { configSupportOrientation(orientation : UIInterfaceOrientation) : boolean {
return UTSiOS.configSupportOrientation(orientation) return UTSiOS.configSupportOrientation(orientation)
} }
setDeviceInterfaceOrientation(orientation: UIInterfaceOrientation) { setDeviceInterfaceOrientation(orientation : UIInterfaceOrientation) {
UTSiOS.setDeviceInterfaceOrientation(orientation) UTSiOS.setDeviceInterfaceOrientation(orientation)
} }
h5Path2SysPath(path: string, basePath: string | null) : string { h5Path2SysPath(path : string, basePath : string | null) : string {
return UTSiOS.getResourceAbsolutePath(path, basePath) return UTSiOS.getResourceAbsolutePath(path, basePath)
} }
...@@ -535,15 +539,44 @@ ...@@ -535,15 +539,44 @@
return UTSiOS.getWorkRootPath() return UTSiOS.getWorkRootPath()
} }
videoPlayerExitFullScreen(orientation: UIInterfaceOrientation) { videoPlayerWillEnterFullScreen(orientation : UIInterfaceOrientation) {
this.originalFrame = this.component?.view.frame
const deviceSize = UIScreen.main.bounds.size
const min = min(deviceSize.width, deviceSize.height)
const max = max(deviceSize.width, deviceSize.height)
if (orientation == UIInterfaceOrientation.portrait) {
this.component?.setStyleWidth(width = Float(min))
this.component?.setStyleHeight(height = Float(max))
} else {
this.component?.setStyleWidth(width = Float(max))
this.component?.setStyleHeight(height = Float(min))
}
this.component?.domNode?.setPositionEdge(UniCssFlexEdge.top, value = -Float(this.originalFrame?.minY ?? 0))
this.component?.domNode?.setPositionEdge(UniCssFlexEdge.left, value = -Float(self.originalFrame?.minX ?? 0))
this.component?.setNeedsLayout()
}
videoPlayerWillExitFullScreen(orientation : UIInterfaceOrientation) {
if (this.originalFrame != null) {
const width = this.originalFrame!.size.width
const height = this.originalFrame!.size.height
this.component?.setStyleWidth(width = Float(width))
this.component?.setStyleHeight(height = Float(height))
this.component?.domNode?.setPositionEdge(UniCssFlexEdge.top, value = 0)
this.component?.domNode?.setPositionEdge(UniCssFlexEdge.left, value = 0)
this.component?.setNeedsLayout()
}
}
videoPlayerExitFullScreen(orientation : UIInterfaceOrientation) {
} }
videoPlayerEnterFullScreen(orientation: UIInterfaceOrientation) { videoPlayerEnterFullScreen(orientation : UIInterfaceOrientation) {
} }
videoCacheDir(): string { videoCacheDir() : string {
return UTSiOS.getVideoCacheDir() return UTSiOS.getVideoCacheDir()
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册