@volcengine/react-native-live-pull 1.0.3-rc.0 → 1.1.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/AndroidManifest.xml +7 -1
- package/android/src/main/AndroidManifestNew.xml +15 -1
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModule.java +28 -20
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcView.java +7 -8
- package/android/src/main/java/com/volcengine/velive/rn/pull/pictureInpicture/FloatingWindowHelper.java +224 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/pictureInpicture/FloatingWindowService.java +171 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/pictureInpicture/IFloatingWindowHelper.java +80 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/pictureInpicture/PictureInPictureManager.java +280 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/pictureInpicture/VeLiveRefManager.java +119 -0
- package/android/src/main/res/drawable/button_close.xml +14 -0
- package/android/src/main/res/layout/floating_window_layout.xml +19 -0
- package/ios/VeLivePlayerMultiObserver.h +54 -0
- package/ios/VeLivePlayerMultiObserver.m +324 -0
- package/ios/pictureInpicture/PictureInPictureManager.h +29 -0
- package/ios/pictureInpicture/PictureInPictureManager.m +274 -0
- package/ios/pictureInpicture/VeLivePictureInPictureController.h +207 -0
- package/ios/pictureInpicture/VeLivePictureInPictureController.m +3393 -0
- package/lib/commonjs/index.js +524 -8
- package/lib/module/index.js +524 -8
- package/lib/typescript/core/api.d.ts +88 -1
- package/lib/typescript/core/callback.d.ts +52 -0
- package/lib/typescript/platforms/android/extends.d.ts +1 -1
- package/lib/typescript/platforms/android/pictureInpicture.d.ts +26 -0
- package/lib/typescript/platforms/ios/pictureInpicture.d.ts +32 -0
- package/package.json +1 -1
|
@@ -1 +1,53 @@
|
|
|
1
1
|
export type { VeLivePlayerObserver } from '../codegen/pack/callback';
|
|
2
|
+
/**
|
|
3
|
+
* {zh}
|
|
4
|
+
* @brief 悬浮窗管理器回调
|
|
5
|
+
* @order 1
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* {en}
|
|
9
|
+
* @brief Picture in picture manager callback
|
|
10
|
+
* @order 1
|
|
11
|
+
*/
|
|
12
|
+
export interface PictureInPictureManagerListener {
|
|
13
|
+
/**
|
|
14
|
+
* {zh}
|
|
15
|
+
* @brief 悬浮窗开始回调
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* {en}
|
|
19
|
+
* @brief Picture in picture start callback
|
|
20
|
+
*/
|
|
21
|
+
onStartPictureInPicture?(): void;
|
|
22
|
+
/**
|
|
23
|
+
* {zh}
|
|
24
|
+
* @brief 悬浮窗结束回调
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* {en}
|
|
28
|
+
* @brief Picture in picture stop callback
|
|
29
|
+
*/
|
|
30
|
+
onStopPictureInPicture?(): void;
|
|
31
|
+
/**
|
|
32
|
+
* {zh}
|
|
33
|
+
* @brief 悬浮窗点击回调
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* {en}
|
|
37
|
+
* @brief Picture in picture click callback
|
|
38
|
+
*/
|
|
39
|
+
onClickPictureInPicture?(): void;
|
|
40
|
+
/**
|
|
41
|
+
* {zh}
|
|
42
|
+
* @brief 悬浮窗错误回调
|
|
43
|
+
* @param code 错误码 0: 成功, 1: 不支持, 2: 参数错误, 3: 已开启
|
|
44
|
+
* @param extraData 额外数据
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* {en}
|
|
48
|
+
* @brief Picture in picture error callback
|
|
49
|
+
* @param code error code 0: success, 1: not supported, 2: invalid params, 3: already opened
|
|
50
|
+
* @param extraData extra data
|
|
51
|
+
*/
|
|
52
|
+
onError?(code: number, extraData: any): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NativeProxyService } from '@vcloud-lux/hybrid-runtime';
|
|
2
|
+
import type { ApplicationContext, NativeSurfaceView } from './extends';
|
|
3
|
+
import * as $p_a from '../../codegen/android';
|
|
4
|
+
export declare class PictureInPictureManagerListener {
|
|
5
|
+
onStartPictureInPicture?(): void;
|
|
6
|
+
onStopPictureInPicture?(): void;
|
|
7
|
+
onClickPictureInPicture?(): void;
|
|
8
|
+
onError?(code: number, extraData: any): void;
|
|
9
|
+
}
|
|
10
|
+
export declare class android_PictureInPictureListener extends PictureInPictureManagerListener {
|
|
11
|
+
protected _instance: PictureInPictureManagerListener;
|
|
12
|
+
constructor(_instance: PictureInPictureManagerListener);
|
|
13
|
+
onStartPictureInPicture?(): void;
|
|
14
|
+
onStopPictureInPicture?(): void;
|
|
15
|
+
onClickPictureInPicture?(): void;
|
|
16
|
+
onError?(code: number, extraData: any): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class PictureInPictureManager extends NativeProxyService {
|
|
19
|
+
static getInstance(): PictureInPictureManager;
|
|
20
|
+
isPictureInPictureSupported(): boolean;
|
|
21
|
+
setupConfig(aspectRatio: number, x: number, y: number): void;
|
|
22
|
+
setListener(listener: PictureInPictureManagerListener): void;
|
|
23
|
+
startPictureInPicture(aspectRatio?: number, x?: number, y?: number): Promise<void>;
|
|
24
|
+
stopPictureInPicture(): Promise<void>;
|
|
25
|
+
setupPlayer(player: $p_a.VeLivePlayer, context: ApplicationContext, surfaceView: NativeSurfaceView): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { TVLManager, VeLivePlayerObserver } from '../../codegen/ios';
|
|
2
|
+
export declare class VeLivePictureInPictureManager {
|
|
3
|
+
static getInstance(): VeLivePictureInPictureManager;
|
|
4
|
+
isPictureInPictureSupported(): boolean;
|
|
5
|
+
setupPlayer(player: TVLManager): Promise<void>;
|
|
6
|
+
startPictureInPicture(): Promise<void>;
|
|
7
|
+
stopPictureInPicture(): Promise<void>;
|
|
8
|
+
enablePictureInPicture(): Promise<void>;
|
|
9
|
+
disablePictureInPicture(): Promise<void>;
|
|
10
|
+
destroyPictureInPicture(): Promise<void>;
|
|
11
|
+
setListener(listener: VeLivePictureInPictureManagerListener): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export declare class VeLivePlayerMultiObserver {
|
|
14
|
+
static getInstance(): VeLivePlayerMultiObserver;
|
|
15
|
+
setupPlayer(player: TVLManager): Promise<void>;
|
|
16
|
+
addObserver(observerId: string, observer: VeLivePlayerObserver): Promise<void>;
|
|
17
|
+
removeObserver(observerId: string): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export declare class VeLivePictureInPictureManagerListener {
|
|
20
|
+
onStartPictureInPicture?(): void;
|
|
21
|
+
onStopPictureInPicture?(): void;
|
|
22
|
+
onClickPictureInPicture?(): void;
|
|
23
|
+
onError$code$extraData?(code: number, extraData: any): void;
|
|
24
|
+
}
|
|
25
|
+
export declare class ios_PictureInPictureManagerListener extends VeLivePictureInPictureManagerListener {
|
|
26
|
+
protected _instance: VeLivePictureInPictureManagerListener;
|
|
27
|
+
constructor(_instance: VeLivePictureInPictureManagerListener);
|
|
28
|
+
onStartPictureInPicture?(): void;
|
|
29
|
+
onStopPictureInPicture?(): void;
|
|
30
|
+
onClickPictureInPicture?(): void;
|
|
31
|
+
onError$code$extraData?(code: number, extraData: any): void;
|
|
32
|
+
}
|