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

同步代码@20241121

上级 9188608f
......@@ -32,7 +32,8 @@
},
"uni_modules": {
"dependencies": [
"uni-framework"
"uni-framework",
"uni-fileSystemManager"
],
"uni-ext-api": {
"uni": {
......
......@@ -7,7 +7,7 @@ export const createVideoContext : CreateVideoContext = function (videoId : strin
if (component == null) {
const pages = getCurrentPages();
if (pages.length > 0) {
videoElement = pages[pages.length - 1].$el?.parentNode?.querySelector('#' + videoId);
videoElement = pages[pages.length - 1].vm!.$el?.parentNode?.querySelector('#' + videoId);
}
} else {
videoElement = component.$el?.parentNode?.querySelector('#' + videoId);
......
......@@ -18,16 +18,24 @@
import FrameLayout from 'android.widget.FrameLayout';
import ViewGroup from 'android.view.ViewGroup';
import OnHierarchyChangeListener from 'android.view.ViewGroup.OnHierarchyChangeListener';
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 TextUtils from 'android.text.TextUtils';
import JSONObject from 'org.json.JSONObject';
import MediaPlayer from "android.media.MediaPlayer";
import Bitmap from 'android.graphics.Bitmap';
import Handler from 'android.os.Handler';
import Looper from 'android.os.Looper';
import DisplayMetrics from 'android.util.DisplayMetrics';
import Context from 'android.content.Context';
import Glide from 'com.bumptech.glide.Glide';
import File from 'java.io.File';
import { Danmu, RequestFullScreenOptions } from '../interface.uts';
import { UniVideoTimeUpdateEventDetail, UniVideoFullScreenChangeEventDetail, UniVideoProgressEventDetail, UniVideoFullScreenClickEventDetail, UniVideoControlsToggleEventDetail } from '../interface.uts';
import { UniVideoTimeUpdateEventImpl, UniVideoFullScreenChangeEventImpl, UniVideoErrorEventImpl, UniVideoProgressEventImpl, UniVideoFullScreenClickEventImpl, UniVideoControlsToggleEventImpl } from './event.uts';
......@@ -37,11 +45,19 @@
name: "video",
data() {
return {
rootView: null as FrameLayout | null,
playerView: null as IjkPlayerView | null,
currentPos: 0,
currentFrame: null as Bitmap | null,
handler: new Handler(Looper.getMainLooper())
handler: new Handler(Looper.getMainLooper()),
isEnded: false,
isFirstLayoutFinished: false,
isFullScreenChanged: false,
screenWidth: 0,
screenHeight: 0,
layoutWidth: 0,
layoutHeight: 0,
videoBox: null as FrameLayout | null,
copyPath: ''
};
},
emits: ["play", "pause", "ended", "timeupdate", "fullscreenchange", "waiting", "error", "progress", "fullscreenclick", "controlstoggle"],
......@@ -204,13 +220,13 @@
},
"initialTime": {
handler(value : number) {
if (value > 0) this.playerView?.seekTo(value as Int * 1000);
if (value > 0) this.playerView?.seekTo(value.toInt() * 1000);
},
immediate: false
},
"duration": {
handler(value : number) {
if (value > 0) this.playerView?.setDuration(value as Int * 1000);
if (value > 0) this.playerView?.setDuration(value.toInt() * 1000);
},
immediate: false
},
......@@ -246,7 +262,7 @@
},
"direction": {
handler(value : number) {
this.playerView?.setDirection(value as Int);
this.playerView?.setDirection(value.toInt());
},
immediate: false
},
......@@ -379,40 +395,73 @@
immediate: false
}
},
NVLoad() : FrameLayout {
this.rootView = new FrameLayout(this.$androidContext!);
this.playerView = new IjkPlayerView(this.$androidContext);
this.rootView?.addView(this.playerView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
return this.rootView!;
NVLoad() : IjkPlayerView {
return new IjkPlayerView(this.$androidContext!);
},
NVLoaded() {
this.playerView = this.$el;
this.playerView?.init();
this.playerView?.setPlayerRootView(this.$el);
this.playerView?.setOnPlayerChangedListener(new OnPlayerChangedListenerImpl(this, this.playerView!));
this.playerView?.setOnInfoListener(new OnInfoListenerImpl(this, this.playerView!));
this.playerView?.setOnPlayerChangedListener(new OnPlayerChangedListenerImpl(this));
this.playerView?.setOnInfoListener(new OnInfoListenerImpl(this));
this.playerView?.setOnBufferingUpdateListener(new OnBufferingUpdateListenerImpl(this));
this.playerView?.setOnErrorListener(new OnErrorListenerImpl(this));
this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this, this.playerView!));
this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this));
this.playerView?.setOnHierarchyChangeListener(new OnHierarchyChangeListenerImpl(this));
this.playerView?.setOnKeyListener(new OnKeyListenerImpl(this));
this.playerView?.setFocusable(true);
this.playerView?.setFocusableInTouchMode(true);
},
NVLayouted() {
if (!this.isFirstLayoutFinished) {
this.isFirstLayoutFinished = true;
this.playerView?.setPlayerRootView(this.$el!.getParent() as ViewGroup);
this.layoutWidth = this.getLayoutWidth();
this.layoutHeight = this.getLayoutHeight();
const metrics = new DisplayMetrics();
(this.$androidContext!.getSystemService(Context.WINDOW_SERVICE) as WindowManager).getDefaultDisplay().getRealMetrics(metrics);
this.screenWidth = metrics.widthPixels;
this.screenHeight = metrics.heightPixels;
// 调整子组件视图层级
this.videoBox = this.playerView?.findViewWithTag<FrameLayout>("fl_video_box");
(this.playerView as IjkPlayerView).removeView(this.videoBox);
(this.playerView as IjkPlayerView).addView(this.videoBox, 0);
}
if (isFullScreenChanged) {
isFullScreenChanged = false;
if (this.playerView!.isFullscreen()) {
this.playerView?.requestFocus();
if (this.getLayoutWidth() != this.screenHeight) this.setStyleWidth(this.screenHeight.toFloat());
if (this.getLayoutHeight() != this.screenWidth) this.setStyleHeight(this.screenWidth.toFloat());
} else {
this.playerView?.clearFocus();
if (this.getLayoutWidth() != this.layoutWidth) this.setStyleWidth(this.layoutWidth.toFloat());
if (this.getLayoutHeight() != this.layoutHeight) this.setStyleHeight(this.layoutHeight.toFloat());
}
}
},
NVUnloaded() { // 资源回收
if (this.$el != null) { // 如果组件绑定了视图则需要在组件销毁时释放视图相关资源
this.playerView?.onDestroy();
this.playerView = null;
}
if (!this.copyPath.isEmpty()) {
const file = new File(this.copyPath);
if (file.exists()) file.delete();
}
},
NVRecycler() {
this.playerView = this.$el?.getChildAt(0) as IjkPlayerView;
this.playerView = this.$el;
this.playerView?.reset();
this.resetListener();
if (this.currentPos > 0) {
this.runDelayed(() => {
this.playerView?.hidePoster();
this.playerView?.showLastFrame(this.currentFrame);
this.playerView?.seekTo(this.currentPos as Int);
this.playerView?.seekTo(this.currentPos.toInt());
}, 100);
}
},
expose: ['play', 'pause', 'seek', 'requestFullScreen', 'exitFullScreen', 'stop', 'hide', 'show', 'close', 'sendDanmu', 'playbackRate', 'currentPos', 'currentFrame'],
expose: ['play', 'pause', 'seek', 'requestFullScreen', 'exitFullScreen', 'stop', 'hide', 'show', 'close', 'sendDanmu', 'playbackRate', 'currentPos', 'currentFrame', 'isEnded', 'isFirstLayoutFinished', 'isFullScreenChanged', 'videoBox'],
methods: {
/**
* 播放视频
......@@ -435,7 +484,7 @@
* @param pos 跳转到的位置,单位:秒(s)
*/
seek: function (pos : number) {
this.playerView?.seekTo((pos as Int) * 1000);
this.playerView?.seekTo(pos.toInt() * 1000);
},
/**
* 切换到全屏
......@@ -443,11 +492,11 @@
*/
requestFullScreen: function (options : RequestFullScreenOptions | null) {
this.runOnMain(function () {
let direction = -90;
let direction = -1;
if (options != null) {
direction = options.direction as Int;
direction = options.direction ?? -1;
}
this.playerView?.fullScreen(direction as Int);
this.playerView?.fullScreen(direction.toInt());
});
},
/**
......@@ -502,6 +551,10 @@
*/
sendDanmu: function (danmu : Danmu) {
this.runOnMain(function () {
if (!this.enableDanmu) {
console.error('sendDanmu is disabled, set enable-danmu true first!');
return;
}
const data = new JSONObject();
data.put('text', danmu.text);
data.put('color', danmu.color);
......@@ -522,8 +575,8 @@
*/
reload: function (autoplay : boolean) {
this.runOnMain(function () {
this.playerView?.setDuration(this.duration as Int * 1000);
this.playerView?.seekTo(this.initialTime as Int * 1000);
this.playerView?.setDuration(this.duration.toInt() * 1000);
this.playerView?.seekTo(this.initialTime.toInt() * 1000);
this.playerView?.setMutePlayer(this.playerView?.isMutePlayer() == true);
this.playerView?.clearDanma();
this.playerView?.enableDanmaku(this.enableDanmu);
......@@ -538,7 +591,21 @@
if (src.startsWith("https://") || src.startsWith("http://") || src.startsWith("rtmp://") || src.startsWith("rtsp://")) { // 网络地址
return src;
} 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;
}
},
/**
......@@ -560,11 +627,13 @@
* 重置监听,复用时调用
*/
resetListener: function () {
this.playerView?.setOnPlayerChangedListener(new OnPlayerChangedListenerImpl(this, this.playerView!));
this.playerView?.setOnInfoListener(new OnInfoListenerImpl(this, this.playerView!));
this.playerView?.setOnPlayerChangedListener(new OnPlayerChangedListenerImpl(this));
this.playerView?.setOnInfoListener(new OnInfoListenerImpl(this));
this.playerView?.setOnBufferingUpdateListener(new OnBufferingUpdateListenerImpl(this));
this.playerView?.setOnErrorListener(new OnErrorListenerImpl(this));
this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this, this.playerView!));
this.playerView?.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this));
this.playerView?.setOnHierarchyChangeListener(new OnHierarchyChangeListenerImpl(this));
this.playerView?.setOnKeyListener(new OnKeyListenerImpl(this));
}
}
}
......@@ -584,13 +653,13 @@
class OnPlayerChangedListenerImpl implements OnPlayerChangedListener {
private comp : UTSContainer<FrameLayout>;
private comp : UTSContainer<IjkPlayerView>;
private playerView : IjkPlayerView;
constructor(comp : UTSContainer<FrameLayout>, playerView : IjkPlayerView) {
constructor(comp : UTSContainer<IjkPlayerView>) {
super();
this.comp = comp;
this.playerView = playerView;
this.playerView = comp.$el!;
}
override onChanged(type : String, msg : String) : void {
......@@ -599,12 +668,13 @@
this.comp.$emit("timeupdate", new UniVideoTimeUpdateEventImpl(JSON.parse<UniVideoTimeUpdateEventDetail>(msg)!));
break;
case "fullscreenchange":
(this.comp as VideoComponent).isFullScreenChanged = true;
const detail = JSON.parse<UniVideoFullScreenChangeEventDetail>(msg)!;
if (detail.fullScreen) { // 进入全屏时取消监听,避免触发暂停逻辑
this.playerView.setOnTextureRenderViewListener(null);
} else { // 退出全屏时重新监听
setTimeout(() => {
this.playerView.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this.comp, this.playerView));
this.playerView.setOnTextureRenderViewListener(new OnTextureRenderViewListenerImpl(this.comp));
}, 100);
}
this.comp.$emit("fullscreenchange", new UniVideoFullScreenChangeEventImpl(detail));
......@@ -613,57 +683,53 @@
this.comp.$emit("fullscreenclick", new UniVideoFullScreenClickEventImpl(JSON.parse<UniVideoFullScreenClickEventDetail>(msg)!));
break;
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;
case "error":
this.comp.$emit("error", new UniVideoErrorEventImpl(new VideoErrorImpl(100001)));
break;
}
// if (type == "fullscreenchange") {
// if (playerView?.isFullscreen() == true) {
// let container = rootView?.getChildAt(1);
// if (container == null) return;
// setTimeout(() => {
// rootView?.removeView(container);
// playerView?.addView(container);
// container?.bringToFront();
// }, 100);
// } else {
// let container = playerView?.getChildAt(1);
// if (container == null) return;
// setTimeout(() => {
// playerView?.removeView(container);
// rootView?.addView(container);
// container?.bringToFront();
// }, 100);
// }
// }
}
}
class OnInfoListenerImpl implements OnInfoListener {
private comp : UTSContainer<FrameLayout>;
private comp : UTSContainer<IjkPlayerView>;
private playerView : IjkPlayerView;
constructor(comp : UTSContainer<FrameLayout>, playerView : IjkPlayerView) {
constructor(comp : UTSContainer<IjkPlayerView>) {
super();
this.comp = comp;
this.playerView = playerView;
this.playerView = comp.$el!;
}
override onInfo(iMediaPlayer : IMediaPlayer | null, status : Int, extra : Int) : boolean {
switch (status) {
case MediaPlayerParams.STATE_COMPLETED:
this.comp.$emit("ended", new UniEvent("ended"));
(this.comp as VideoComponent).isEnded = true;
if ((this.comp as VideoComponent).loop) {
let initialTime = (this.comp as VideoComponent).initialTime as Int;
if (initialTime > 0) this.playerView.seekTo(initialTime * 1000);
let initialTime = (this.comp as VideoComponent).initialTime;
if (initialTime > 0) this.playerView.seekTo(initialTime.toInt() * 1000);
this.playerView.start();
(this.comp as VideoComponent).isEnded = false;
}
break;
case MediaPlayerParams.STATE_PLAYING:
this.comp.$emit("play", new UniEvent("play"));
setTimeout(() => {
if ((this.comp as VideoComponent).isEnded) {
let initialTime = (this.comp as VideoComponent).initialTime;
if (initialTime > 0) this.playerView.seekTo(initialTime.toInt() * 1000);
(this.comp as VideoComponent).isEnded = false;
}
}, 100);
break;
case MediaPlayerParams.STATE_PAUSED:
this.comp.$emit("pause", new UniEvent("pause"));
......@@ -682,9 +748,9 @@
class OnBufferingUpdateListenerImpl implements OnBufferingUpdateListener {
private comp : UTSContainer<FrameLayout>;
private comp : UTSContainer<IjkPlayerView>;
constructor(comp : UTSContainer<FrameLayout>) {
constructor(comp : UTSContainer<IjkPlayerView>) {
super();
this.comp = comp;
}
......@@ -699,9 +765,9 @@
class OnErrorListenerImpl implements OnErrorListener {
private comp : UTSContainer<FrameLayout>;
private comp : UTSContainer<IjkPlayerView>;
constructor(comp : UTSContainer<FrameLayout>) {
constructor(comp : UTSContainer<IjkPlayerView>) {
super();
this.comp = comp;
}
......@@ -718,13 +784,13 @@
class OnTextureRenderViewListenerImpl implements OnTextureRenderViewListener {
private comp : UTSContainer<FrameLayout>;
private comp : UTSContainer<IjkPlayerView>;
private playerView : IjkPlayerView;
constructor(comp : UTSContainer<FrameLayout>, playerView : IjkPlayerView) {
constructor(comp : UTSContainer<IjkPlayerView>) {
super();
this.comp = comp;
this.playerView = playerView;
this.playerView = comp.$el!;
}
override onDetachedFromWindow() : void {
......@@ -732,9 +798,58 @@
this.playerView.pause();
this.playerView.setCenterPlayBntVisibility((this.comp as VideoComponent).showCenterPlayBtn);
(this.comp as VideoComponent).currentPos = this.playerView.getCurPosition();
(this.comp as VideoComponent).currentFrame?.recycle();
(this.comp as VideoComponent).currentFrame = this.playerView.captureFrame();
const frame = this.playerView.captureFrame();
(this.comp as VideoComponent).currentFrame = frame;
this.playerView.showLastFrame(frame);
}
}
}
class OnHierarchyChangeListenerImpl implements OnHierarchyChangeListener {
private comp : UTSContainer<IjkPlayerView>;
private playerView : IjkPlayerView;
constructor(comp : UTSContainer<IjkPlayerView>) {
super();
this.comp = comp;
this.playerView = comp.$el!;
}
override onChildViewAdded(parent : View, child : View) : void {
// 处理子组件动态添加的情况
if ((this.comp as VideoComponent).isFirstLayoutFinished) {
if (this.playerView.indexOfChild((this.comp as VideoComponent).videoBox) != 0) {
this.playerView.removeView((this.comp as VideoComponent).videoBox);
this.playerView.addView((this.comp as VideoComponent).videoBox, 0);
}
}
}
override onChildViewRemoved(parent : View, child : View) : void {
}
}
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>
\ No newline at end of file
......@@ -8,32 +8,32 @@
<key>BinaryPath</key>
<string>DCUniVideo.framework/DCUniVideo</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>DCUniVideo.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>DCUniVideo.framework/DCUniVideo</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>DCUniVideo.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
......
#if 0
#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
#define DCUNIVIDEO_SWIFT_H
#pragma clang diagnostic push
......@@ -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")
@interface UniVideoPlayerConfig : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
......
// 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-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-ignorable: -enable-bare-slash-regex
// 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 -enable-bare-slash-regex -module-name DCUniVideo
import AVFAudio
import AVFoundation
import CommonCrypto
......@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
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 videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen()
......@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> 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 {
public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
......@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get
set
}
final public var contentView: UIKit.UIView {
final public var contentView: DCUniVideo.UniMonitoredContentView {
get
set
}
......@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play()
final public func pause()
......
// 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-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-ignorable: -enable-bare-slash-regex
// 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 -enable-bare-slash-regex -module-name DCUniVideo
import AVFAudio
import AVFoundation
import CommonCrypto
......@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
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 videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen()
......@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> 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 {
public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
......@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get
set
}
final public var contentView: UIKit.UIView {
final public var contentView: DCUniVideo.UniMonitoredContentView {
get
set
}
......@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play()
final public func pause()
......
#if 0
#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
#define DCUNIVIDEO_SWIFT_H
#pragma clang diagnostic push
......@@ -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")
@interface UniVideoPlayerConfig : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
......@@ -373,7 +382,7 @@ SWIFT_CLASS("_TtC10DCUniVideo18UniVideoPlayerView")
#endif
#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
#define DCUNIVIDEO_SWIFT_H
#pragma clang diagnostic push
......@@ -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")
@interface UniVideoPlayerConfig : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
......
// 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-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-ignorable: -enable-bare-slash-regex
// 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 -enable-bare-slash-regex -module-name DCUniVideo
import AVFAudio
import AVFoundation
import CommonCrypto
......@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
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 videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen()
......@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> 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 {
public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
......@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get
set
}
final public var contentView: UIKit.UIView {
final public var contentView: DCUniVideo.UniMonitoredContentView {
get
set
}
......@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play()
final public func pause()
......
// 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-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-ignorable: -enable-bare-slash-regex
// 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 -enable-bare-slash-regex -module-name DCUniVideo
import AVFAudio
import AVFoundation
import CommonCrypto
......@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
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 videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen()
......@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> 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 {
public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
......@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get
set
}
final public var contentView: UIKit.UIView {
final public var contentView: DCUniVideo.UniMonitoredContentView {
get
set
}
......@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play()
final public func pause()
......
// 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-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-ignorable: -enable-bare-slash-regex
// 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 -enable-bare-slash-regex -module-name DCUniVideo
import AVFAudio
import AVFoundation
import CommonCrypto
......@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
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 videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen()
......@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> 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 {
public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
......@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get
set
}
final public var contentView: UIKit.UIView {
final public var contentView: DCUniVideo.UniMonitoredContentView {
get
set
}
......@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play()
final public func pause()
......
// 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-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-ignorable: -enable-bare-slash-regex
// 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 -enable-bare-slash-regex -module-name DCUniVideo
import AVFAudio
import AVFoundation
import CommonCrypto
......@@ -58,6 +57,8 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func getCurrentUA() -> Swift.String
func sendEvent(_ name: Swift.String, _ params: [Swift.String : Any]?)
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 videoPlayerEnterFullScreen(_ orientation: UIKit.UIInterfaceOrientation)
func lockScreen()
......@@ -71,6 +72,11 @@ public protocol UniVideoPlayerProtocol : AnyObject {
func workRootPath() -> 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 {
public typealias View = DCUniVideo.UniVideoPlayerView
final public var view: DCUniVideo.UniVideoPlayerViewPresent.View
......@@ -79,7 +85,7 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
get
set
}
final public var contentView: UIKit.UIView {
final public var contentView: DCUniVideo.UniMonitoredContentView {
get
set
}
......@@ -87,6 +93,9 @@ final public class UniVideoPlayerViewPresent : DCUniVideo.ViewPresent {
@objc deinit
final public func updateViewFrame(_ rect: CoreFoundation.CGRect)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func onVideoComponentReused(_ config: DCUniVideo.UniVideoPlayerConfig)
}
extension DCUniVideo.UniVideoPlayerViewPresent {
final public func play()
final public func pause()
......
......@@ -6,7 +6,7 @@
<dict>
<key>Headers/DCUniVideo-Swift.h</key>
<data>
8RtESNpNJ/MLh4AISu16ekCnNgM=
6AI8KDmmckpzHIE9MTA87TBlOEA=
</data>
<key>Headers/DCUniVideo.h</key>
<data>
......@@ -18,55 +18,55 @@
</data>
<key>Info.plist</key>
<data>
ZJfU/z0myJ2FJ6v4FI5s1po6+18=
4STIX+M3zL3GrGrwOIBZ35QNXpQ=
</data>
<key>Modules/DCUniVideo.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
<data>
LMw61NwrRpA08JKfgcEYaj3bC4s=
/CTSTQuMxlC70vyU7iOX8wGDf+4=
</data>
<key>Modules/DCUniVideo.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
<data>
7RwLqhAfiKvxA+Cxv6/N962PpOg=
64wiXw8pS4gsJb8AmmNjU/dce+M=
</data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4=
6g7piUV4/cufnba98Op8+kJw65E=
</data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM=
AT+Uc934hqQ5s7XiudgE4R+Klag=
</data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<data>
zaMs+qbaViQJV9jdtXLqo29LabM=
skvNhIA0R3GI+di1j0sdu/54Jgo=
</data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM=
AT+Uc934hqQ5s7XiudgE4R+Klag=
</data>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<data>
gR2m/jlpxNCVmIfuV+qVvd6FVoE=
4WOy1OqT/1CovEL8hNH7mPVwr/U=
</data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4=
6g7piUV4/cufnba98Op8+kJw65E=
</data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ=
9EbVYjfn5tKvGE1pRend6D42C7g=
</data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<data>
tMymyR7BzfUWQ9cTfV/3r+zajeY=
WeMQjnMJwgj3QZJ6JvPtSkLHDfw=
</data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ=
9EbVYjfn5tKvGE1pRend6D42C7g=
</data>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<data>
p+SyNnDNf1lc0DyiX5aiSin5puk=
868ltQGQ9ZGE5Iyk1H7oWXmN8JY=
</data>
<key>Modules/module.modulemap</key>
<data>
......@@ -79,11 +79,11 @@
<dict>
<key>hash</key>
<data>
8RtESNpNJ/MLh4AISu16ekCnNgM=
6AI8KDmmckpzHIE9MTA87TBlOEA=
</data>
<key>hash2</key>
<data>
6rkDl2fzm2saIt4Lj2MYeOP5Z1dDjaCYAEu7PhIdI/k=
N818DwGCZblozLzhJGHxkM9CUzR3/hgBV+b2dliE1bk=
</data>
</dict>
<key>Headers/DCUniVideo.h</key>
......@@ -112,132 +112,132 @@
<dict>
<key>hash</key>
<data>
LMw61NwrRpA08JKfgcEYaj3bC4s=
/CTSTQuMxlC70vyU7iOX8wGDf+4=
</data>
<key>hash2</key>
<data>
rQ6ecTyNYorIWSPYIIIvMKXzPCj9nGj+LNKMEIJBP5U=
mXFCGPbsKJ1JiOP54zWfFztb2vrPw+3oQonSw3l6RUc=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
<dict>
<key>hash</key>
<data>
7RwLqhAfiKvxA+Cxv6/N962PpOg=
64wiXw8pS4gsJb8AmmNjU/dce+M=
</data>
<key>hash2</key>
<data>
Un6dHCBddlRbwPe/xkfXUJUkqJfmlwC9uhfZwcpAHos=
BLjUlDgXs4UIoOKdAhIC+N1JYbZpgOOlezMlmxeFbO4=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash</key>
<data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4=
6g7piUV4/cufnba98Op8+kJw65E=
</data>
<key>hash2</key>
<data>
G6BCmgVzUh+8PT4Vb2Mo2M57OK54006L7d81dNPspfY=
JQ/uRwcNEZAemsl2XxnN+U1LH2g5HWw9hODc1t6xrSk=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash</key>
<data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM=
AT+Uc934hqQ5s7XiudgE4R+Klag=
</data>
<key>hash2</key>
<data>
fGUfQRyQkDydTP0YQ2ycZuJ+xLOTauxL6nBJJtVHeUo=
OcfDfHnBnZ1Cc8+ED7WInmje9+thSxUDvdHE7HK2UdQ=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash</key>
<data>
zaMs+qbaViQJV9jdtXLqo29LabM=
skvNhIA0R3GI+di1j0sdu/54Jgo=
</data>
<key>hash2</key>
<data>
ltXhZrQmuZPwZ/zatuXP0+KdjKP8anH8ihgjTcDuFzc=
lNWH1MV4Mzre1nP4Za3ZX5YObDq5i/XHbsm1fIREytI=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash</key>
<data>
TYzZQAPhXzOjxQ7cOKZu2E3/gOM=
AT+Uc934hqQ5s7XiudgE4R+Klag=
</data>
<key>hash2</key>
<data>
fGUfQRyQkDydTP0YQ2ycZuJ+xLOTauxL6nBJJtVHeUo=
OcfDfHnBnZ1Cc8+ED7WInmje9+thSxUDvdHE7HK2UdQ=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash</key>
<data>
gR2m/jlpxNCVmIfuV+qVvd6FVoE=
4WOy1OqT/1CovEL8hNH7mPVwr/U=
</data>
<key>hash2</key>
<data>
kSBWEAVrVxWfOnEsU4ryWR+gx8eY6RmX8ppIpJlBx9A=
z+56Py2JAl94oNNpRG54OpTOYx6MytxbwujY5jTFiwc=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash</key>
<data>
nk9o0CXiQ/GZWFtpqNFQSf56Aq4=
6g7piUV4/cufnba98Op8+kJw65E=
</data>
<key>hash2</key>
<data>
G6BCmgVzUh+8PT4Vb2Mo2M57OK54006L7d81dNPspfY=
JQ/uRwcNEZAemsl2XxnN+U1LH2g5HWw9hODc1t6xrSk=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash</key>
<data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ=
9EbVYjfn5tKvGE1pRend6D42C7g=
</data>
<key>hash2</key>
<data>
VzdCbPQNtj1hylfhs2PD3X4eBPdh0GAfIBhp+KSR+P4=
ElH2U0ZxMym5pgUUeycsjfZ8NlPNEW7dLNFHVhUIRUk=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash</key>
<data>
tMymyR7BzfUWQ9cTfV/3r+zajeY=
WeMQjnMJwgj3QZJ6JvPtSkLHDfw=
</data>
<key>hash2</key>
<data>
9dLnwDexyVteRT+z/YK1LMyqtXXzArso9N35QjFp6bU=
nqCcouRnuFnUpuLy2+rb6C6BrrEytmIDxcf70dIRpyU=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash</key>
<data>
P9A/XUTYbV9hqAFkvIsnL90B8HQ=
9EbVYjfn5tKvGE1pRend6D42C7g=
</data>
<key>hash2</key>
<data>
VzdCbPQNtj1hylfhs2PD3X4eBPdh0GAfIBhp+KSR+P4=
ElH2U0ZxMym5pgUUeycsjfZ8NlPNEW7dLNFHVhUIRUk=
</data>
</dict>
<key>Modules/DCUniVideo.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash</key>
<data>
p+SyNnDNf1lc0DyiX5aiSin5puk=
868ltQGQ9ZGE5Iyk1H7oWXmN8JY=
</data>
<key>hash2</key>
<data>
AYg5nbZM23N1eAD0JL/9x+MWHN0Lplo1fiDhPwHVPtc=
QwlZD6edjFe9YD6Q6lQL7b23TVaPh7+GWMOLiEahBsc=
</data>
</dict>
<key>Modules/module.modulemap</key>
......
......@@ -6,9 +6,10 @@
<script lang="uts">
import { UniVideoPlayerConfig, UniVideoPlayerViewPresent } from "DCUniVideo" assert { type: "implementationOnly" };
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 { Danmu } from "../interface.uts"
import { Danmu } from "../interface.uts";
import { UniCssFlexEdge } from "DCloudUniappRuntime";
export default {
name: "video",
......@@ -146,42 +147,42 @@
immediate: false
},
"autoplay": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("autoplay", newValue);
},
immediate: false
},
"loop": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("loop", newValue);
},
immediate: false
},
"muted": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("muted", newValue);
},
immediate: false
},
"initialTime": {
handler(newValue: Number, oldValue: Number) {
handler(newValue : Number, oldValue : Number) {
"[weak self]"
this?.updateProp("initialTime", newValue);
},
immediate: false
},
"duration": {
handler(newValue: Number, oldValue: Number) {
handler(newValue : Number, oldValue : Number) {
"[weak self]"
this?.updateProp("duration", newValue);
},
immediate: false
},
"controls": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("controls", newValue);
},
......@@ -195,140 +196,140 @@
immediate: false
},
"danmuBtn": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("danmuBtn", newValue);
},
immediate: false
},
"enableDanmu": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("enableDanmu", newValue);
},
immediate: false
},
"pageGesture": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("pageGesture", newValue);
},
immediate: false
},
"direction": {
handler(newValue: Number, oldValue: Number) {
handler(newValue : Number, oldValue : Number) {
"[weak self]"
this?.updateProp("direction", newValue);
},
immediate: false
},
"showProgress": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("showProgress", newValue);
},
immediate: false
},
"showFullscreenBtn": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("showFullscreenBtn", newValue);
},
immediate: false
},
"showPlayBtn": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("showPlayBtn", newValue);
},
immediate: false
},
"showCenterPlayBtn": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("showCenterPlayBtn", newValue);
},
immediate: false
},
"showLoading": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("showLoading", newValue);
},
immediate: false
},
"enableProgressGesture": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("enableProgressGesture", newValue);
},
immediate: false
},
"objectFit": {
handler(newValue: String, oldValue: String) {
handler(newValue : String, oldValue : String) {
"[weak self]"
this?.updateProp("objectFit", newValue);
},
immediate: false
},
"poster": {
handler(newValue: String, oldValue: String) {
handler(newValue : String, oldValue : String) {
"[weak self]"
this?.updateProp("poster", newValue);
},
immediate: false
},
"showMuteBtn": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("showMuteBtn", newValue);
},
immediate: false
},
"title": {
handler(newValue: String, oldValue: String) {
handler(newValue : String, oldValue : String) {
"[weak self]"
this?.updateProp("title", newValue);
},
immediate: false
},
"enablePlayGesture": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("enablePlayGesture", newValue);
},
immediate: false
},
"vslideGesture": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("vslideGesture", newValue);
},
immediate: false
},
"vslideGestureInFullscreen": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("vslideGestureInFullscreen", newValue);
},
immediate: false
},
"httpCache": {
handler(newValue: Boolean, oldValue: Boolean) {
handler(newValue : Boolean, oldValue : Boolean) {
"[weak self]"
this?.updateProp("httpCache", newValue);
},
immediate: false
},
"codec": {
handler(newValue: string, oldValue: string) {
handler(newValue : string, oldValue : string) {
"[weak self]"
this?.updateProp("codec", newValue);
},
immediate: false
},
"playStrategy": {
handler(newValue: number, oldValue: number) {
handler(newValue : number, oldValue : number) {
"[weak self]"
this?.updateProp("playStrategy", newValue);
},
......@@ -359,7 +360,7 @@
NVLoad() : UIView {
if (this.present != null) {
return this.present!.contentView;
} else{
} else {
return new UIView()
}
},
......@@ -444,8 +445,8 @@
this.present?.palybackRate(rate);
},
updateProp: function (key: string, value: any) {
DispatchQueue.main.async(execute=():void => {
updateProp: function (key : string, value : any | null) {
DispatchQueue.main.async(execute = () : void => {
this.present?.setControlValue(value, key)
})
......@@ -455,23 +456,25 @@
@UTSiOS.keyword("private")
class DCloudUniVideoComponentDelegate implements UniVideoPlayerProtocol {
@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
super.init()
}
getCookieString(url: URL): string | null {
getCookieString(url : URL) : string | null {
return UTSiOS.getCookieString(url)
}
getCurrentUA(): string {
getCurrentUA() : string {
return UTSiOS.getUserAgent()
}
sendEvent(name: string, params: Dictionary<string,any> | null) {
switch (name){
sendEvent(name : string, params : Dictionary<string, any> | null) {
switch (name) {
case "play":
case "pause":
case "waiting":
......@@ -491,8 +494,12 @@
}
}
loadImage(url: string, complete: (image: UIImage) => void) {
UTSiOS.loadImage(url, complete);
loadImage(url : string, complete : (image : UIImage) => void) {
UTSiOS.loadImage(url, (image, data) => {
if (image != null) {
complete(image!);
}
});
}
lockScreen() {
......@@ -503,27 +510,27 @@
UTSiOS.unlockScreen()
}
setFullScreen(yesOrNo: boolean) {
setFullScreen(yesOrNo : boolean) {
UTSiOS.setFullScreen(yesOrNo)
}
setHomeIndicatorAutoHidden(yesOrNo: boolean) {
setHomeIndicatorAutoHidden(yesOrNo : boolean) {
UTSiOS.setHomeIndicatorAutoHidden(yesOrNo)
}
setTempOrientation(temp: UIInterfaceOrientationMask) {
setTempOrientation(temp : UIInterfaceOrientationMask) {
UTSiOS.setTempOrientation(temp)
}
configSupportOrientation(orientation: UIInterfaceOrientation): boolean {
configSupportOrientation(orientation : UIInterfaceOrientation) : boolean {
return UTSiOS.configSupportOrientation(orientation)
}
setDeviceInterfaceOrientation(orientation: UIInterfaceOrientation) {
setDeviceInterfaceOrientation(orientation : UIInterfaceOrientation) {
UTSiOS.setDeviceInterfaceOrientation(orientation)
}
h5Path2SysPath(path: string, basePath: string | null) : string {
h5Path2SysPath(path : string, basePath : string | null) : string {
return UTSiOS.getResourceAbsolutePath(path, basePath)
}
......@@ -531,15 +538,44 @@
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()
}
}
......
......@@ -34,6 +34,48 @@ export type RequestFullScreenOptions = {
* "uniVer": "√",
* "unixVer": "4.11"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
* "uniVer": "x",
......@@ -58,6 +100,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -81,6 +170,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -105,6 +241,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -128,6 +311,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -152,6 +382,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -176,6 +453,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -200,6 +524,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -224,6 +595,53 @@ export interface VideoContext {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* },
* "web": {
......@@ -239,7 +657,6 @@ export interface VideoContext {
export interface Uni {
/**
* 创建并返回 video 上下文 videoContext 对象
* @description 创建并返回 video 上下文 videoContext 对象
* @uniPlatform {
* "app": {
* "android": {
......@@ -251,17 +668,66 @@ export interface Uni {
* "osVer": "12.0",
* "uniVer": "√",
* "unixVer": "4.11"
* },
* "harmony": {
* "osVer": "3.0",
* "uniVer": "4.23",
* "unixVer": "x"
* }
* },
* "web": {
* "uniVer": "√",
* "unixVer": "4.0"
* },
* "mp": {
* "weixin": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "4.35"
* },
* "alipay": {
* "hostVer": "1.10.0",
* "uniVer": "√",
* "unixVer": "x"
* },
* "baidu": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "toutiao": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "lark": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "qq": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "kuaishou": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* },
* "jd": {
* "hostVer": "√",
* "uniVer": "√",
* "unixVer": "x"
* }
* }
* }
* @uniVueVersion 2,3
* @return {VideoContext} video组件上下文对象
*
* @tutorial http://uniapp.dcloud.io/api/media/video-context?id=createVideoContext
* @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video-context.html#createvideocontext
* @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/create-video-context.html#createvideocontext
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/create-video-context.html#createvideocontext
*
*/
createVideoContext : CreateVideoContext
......@@ -269,12 +735,41 @@ export interface Uni {
/**
* 通用事件
* 临时方案,规避组件Event接口无法直接继承UniEvent的问题
*/
interface UniVideoEvent {
/**
* 是否冒泡
*/
bubbles : boolean
/**
* 是否可以取消
*/
cancelable : boolean
/**
* 事件类型
*/
type : string
target : Element | null
currentTarget : Element | null
/**
* 触发事件的组件
*/
target ?: UniElement | null
/**
* 当前组件
*/
currentTarget ?: UniElement | null
/**
* 事件发生时的时间戳
*/
timeStamp : Long
/**
* 阻止当前事件的进一步传播
*/
stopPropagation() : void
/**
* 阻止当前事件的默认行为
*/
preventDefault() : void
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册