@byteplus/vepusher 1.1.1-rc.0 → 2.0.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/dist/index.es.d.ts +1768 -0
- package/dist/index.es.js +8301 -0
- package/dist/index.umd.js +93 -0
- package/package.json +9 -12
- package/LICENSE +0 -20
- package/README.md +0 -18
- package/dist/vepusher.es.js +0 -34248
- package/dist/vepusher.umd.js +0 -123
- package/es/capture.d.ts +0 -35
- package/es/connect.d.ts +0 -4
- package/es/constant.d.ts +0 -9
- package/es/device.d.ts +0 -25
- package/es/index.d.ts +0 -20
- package/es/interface/index.d.ts +0 -21
- package/es/observer.d.ts +0 -15
- package/es/pusher.d.ts +0 -19
- package/es/rtm.d.ts +0 -3
- package/es/state.d.ts +0 -34
- package/es/utils/convertToRTCDevice.d.ts +0 -4
- package/es/utils/http.d.ts +0 -0
- package/es/utils/logger.d.ts +0 -0
- package/es/videoMixing.d.ts +0 -0
package/es/capture.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { TRACK_TYPES, VIDEO_DEFAULT_QUALITY, AUDIO_DEFAULT_QUALITY } from './interface';
|
|
2
|
-
import type RTM from '@byted/live-rtm/src/index';
|
|
3
|
-
interface Options {
|
|
4
|
-
rtm: RTM;
|
|
5
|
-
}
|
|
6
|
-
export declare class Capture {
|
|
7
|
-
private rtm;
|
|
8
|
-
constructor({ rtm }: Options);
|
|
9
|
-
setVideoQuality(quality: keyof typeof VIDEO_DEFAULT_QUALITY): Promise<void>;
|
|
10
|
-
setAudioQuality(quality: keyof typeof AUDIO_DEFAULT_QUALITY): Promise<void>;
|
|
11
|
-
setVideoCaptureConfig(config: MediaTrackConstraintSet): Promise<void>;
|
|
12
|
-
setAudioCaptureConfig(config: MediaTrackConstraintSet): Promise<void>;
|
|
13
|
-
setVideoBitrate(bitrate: number): Promise<void>;
|
|
14
|
-
setAudioBitrate(bitrate: number): Promise<void>;
|
|
15
|
-
startCamera(deviceId?: string): Promise<void>;
|
|
16
|
-
stopCamera(): Promise<void>;
|
|
17
|
-
switchCamera(deviceId: string): Promise<void>;
|
|
18
|
-
startMicrophone(deviceId?: string): Promise<void>;
|
|
19
|
-
stopMicrophone(): Promise<void>;
|
|
20
|
-
switchMicrophone(deviceId: string): Promise<void>;
|
|
21
|
-
startScreenCapture(): Promise<void>;
|
|
22
|
-
stopScreenCapture(): Promise<void>;
|
|
23
|
-
startVolumeDetect(): Promise<void>;
|
|
24
|
-
stopVolumeDetect(): Promise<void>;
|
|
25
|
-
startMediaFile(file: File | string): Promise<void>;
|
|
26
|
-
stopMediaFile(): Promise<void>;
|
|
27
|
-
startAudioMix(url: string, loop: boolean): Promise<void>;
|
|
28
|
-
pauseAudioMix(): Promise<void>;
|
|
29
|
-
resumeAudioMix(): Promise<void>;
|
|
30
|
-
stopAudioMix(): Promise<void>;
|
|
31
|
-
setRenderView(containerId: string): Promise<void>;
|
|
32
|
-
startPreview(type: TRACK_TYPES): Promise<void>;
|
|
33
|
-
stopPreview(type: TRACK_TYPES): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
package/es/connect.d.ts
DELETED
package/es/constant.d.ts
DELETED
package/es/device.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import RTM from '@byted/live-rtm/src/index';
|
|
2
|
-
import { RTCDevice } from './interface';
|
|
3
|
-
interface Options {
|
|
4
|
-
rtm: RTM;
|
|
5
|
-
}
|
|
6
|
-
export declare class Device {
|
|
7
|
-
private rtm;
|
|
8
|
-
constructor({ rtm }: Options);
|
|
9
|
-
checkSupport(): Promise<boolean>;
|
|
10
|
-
getDevicesList(type?: MediaDeviceKind): Promise<RTCDevice[]>;
|
|
11
|
-
enableDevices(options?: {
|
|
12
|
-
video: boolean;
|
|
13
|
-
audio: boolean;
|
|
14
|
-
}): Promise<{
|
|
15
|
-
video: boolean;
|
|
16
|
-
audio: boolean;
|
|
17
|
-
}>;
|
|
18
|
-
getMicrophones(): Promise<RTCDevice[]>;
|
|
19
|
-
getCameras(): Promise<RTCDevice[]>;
|
|
20
|
-
setCurrentDevice(type: 'audioinput' | 'videoinput', deviceId: string): Promise<void> | undefined;
|
|
21
|
-
switchDevice(type: 'audioinput' | 'videoinput', deviceId: string): Promise<void> | undefined;
|
|
22
|
-
switchCamera(deviceId: string): Promise<void> | undefined;
|
|
23
|
-
switchMicrophone(deviceId: string): Promise<void> | undefined;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
package/es/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ConfigOptions } from './interface';
|
|
2
|
-
import { Capture } from './capture';
|
|
3
|
-
import { Device } from './device';
|
|
4
|
-
import { Pusher } from './pusher';
|
|
5
|
-
import { Observer } from './observer';
|
|
6
|
-
import { State } from './state';
|
|
7
|
-
export default class LivePusher {
|
|
8
|
-
private _rtm;
|
|
9
|
-
device: Device;
|
|
10
|
-
capture: Capture;
|
|
11
|
-
pusher: Pusher;
|
|
12
|
-
observer: Observer;
|
|
13
|
-
state: State;
|
|
14
|
-
get volume(): number;
|
|
15
|
-
static isSupported(mode?: 'rtm' | 'rtmp'): Promise<boolean>;
|
|
16
|
-
constructor(options: ConfigOptions);
|
|
17
|
-
updateConfig(config: ConfigOptions): void;
|
|
18
|
-
bindEvent(): void;
|
|
19
|
-
getStats(): Promise<void | import("@byted/web-rtmp").RTMPStats | import("@byted/live-rtm/src/interface").StatsSnapshoot | undefined>;
|
|
20
|
-
}
|
package/es/interface/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from '@byted/live-rtm/src/interface';
|
|
2
|
-
export declare enum VIDEO_DEFAULT_SIZE {
|
|
3
|
-
'120p' = "160X120",
|
|
4
|
-
'180p' = "320X180",
|
|
5
|
-
'240p' = "320X240",
|
|
6
|
-
'360p' = "640X360",
|
|
7
|
-
'480p' = "640X480",
|
|
8
|
-
'720p' = "1280X720",
|
|
9
|
-
'1080p' = "1920X1080"
|
|
10
|
-
}
|
|
11
|
-
export declare enum Mode {
|
|
12
|
-
RTM = "rtm",
|
|
13
|
-
RTMP = "rtmp"
|
|
14
|
-
}
|
|
15
|
-
export interface RTCDevice {
|
|
16
|
-
deviceId: MediaDeviceInfo['deviceId'];
|
|
17
|
-
deviceType: MediaDeviceInfo['kind'];
|
|
18
|
-
deviceName: MediaDeviceInfo['label'];
|
|
19
|
-
deviceInfo: MediaDeviceInfo;
|
|
20
|
-
deviceState: 'active' | 'inactive';
|
|
21
|
-
}
|
package/es/observer.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RTCDevice } from './interface';
|
|
2
|
-
export declare class Observer {
|
|
3
|
-
onError: (code: number, msg: string, extraInfo?: any) => void;
|
|
4
|
-
onWarning: (msg: string) => void;
|
|
5
|
-
onCaptureFirstAudioFrame: () => void;
|
|
6
|
-
onCaptureFirstVideoFrame: () => void;
|
|
7
|
-
onPushStatusUpdate: (status: number, msg: string) => void;
|
|
8
|
-
onMicrophoneChanged: (changedDevice: RTCDevice) => void;
|
|
9
|
-
onCameraChanged: (changedDevice: RTCDevice) => void;
|
|
10
|
-
onTrackEnded: (Track: MediaStreamTrack) => void;
|
|
11
|
-
onPushStart: () => void;
|
|
12
|
-
constructor();
|
|
13
|
-
}
|
|
14
|
-
declare const _default: Observer;
|
|
15
|
-
export default _default;
|
package/es/pusher.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type RTM from '@byted/live-rtm/src/index';
|
|
2
|
-
import { TRACK_TYPES } from './interface';
|
|
3
|
-
interface Options {
|
|
4
|
-
rtm: RTM;
|
|
5
|
-
}
|
|
6
|
-
export declare class Pusher {
|
|
7
|
-
private rtm;
|
|
8
|
-
constructor({ rtm }: Options);
|
|
9
|
-
get pushStatus(): import("./constant").PushStatus;
|
|
10
|
-
isPushing(): boolean;
|
|
11
|
-
startPush(rtmUrl: string, options?: {
|
|
12
|
-
onlyAudio?: boolean;
|
|
13
|
-
}): Promise<void>;
|
|
14
|
-
updatePush(kind: TRACK_TYPES): Promise<void>;
|
|
15
|
-
stopPush(): Promise<void>;
|
|
16
|
-
setVideoMute(mute: boolean): void;
|
|
17
|
-
setAudioMute(mute: boolean): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
package/es/rtm.d.ts
DELETED
package/es/state.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { PushStatus } from './constant';
|
|
2
|
-
import { RTCDevice } from './interface';
|
|
3
|
-
type CaptureType = {
|
|
4
|
-
CAMERA: boolean;
|
|
5
|
-
SCREEN: boolean;
|
|
6
|
-
VIDEO: boolean;
|
|
7
|
-
MICROPHONE: boolean;
|
|
8
|
-
};
|
|
9
|
-
type PreviewType = {
|
|
10
|
-
CAMERA: boolean;
|
|
11
|
-
MICROPHONE: boolean;
|
|
12
|
-
SCREEN: boolean;
|
|
13
|
-
VIDEO: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare class State {
|
|
16
|
-
deviceList: RTCDevice[];
|
|
17
|
-
currentVideoDevice: RTCDevice;
|
|
18
|
-
currentAudioDevice: RTCDevice;
|
|
19
|
-
captureType: CaptureType;
|
|
20
|
-
PreviewType: PreviewType;
|
|
21
|
-
pushStatus: PushStatus;
|
|
22
|
-
setDevices(devices: RTCDevice[]): void;
|
|
23
|
-
setCaptureType(type: keyof CaptureType): void;
|
|
24
|
-
resetCaptureType(type: keyof CaptureType): void;
|
|
25
|
-
setPreviewType(type: keyof PreviewType): void;
|
|
26
|
-
resetPreviewType(type: keyof PreviewType): void;
|
|
27
|
-
canPushCamera(): boolean;
|
|
28
|
-
canPushScreen(): boolean;
|
|
29
|
-
canPush(): boolean;
|
|
30
|
-
canPushAudio(): boolean;
|
|
31
|
-
setPushState(status: PushStatus): void;
|
|
32
|
-
}
|
|
33
|
-
declare const _default: State;
|
|
34
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RTCDevice } from '../interface';
|
|
2
|
-
import { DeviceInfo } from '@volcengine/rtc';
|
|
3
|
-
export declare function convertDeviceInfoToRTCDevice(deviceInfo: DeviceInfo): RTCDevice;
|
|
4
|
-
export declare function convertMediaDeviceInfoToRTCDevice(deviceInfo: MediaDeviceInfo): RTCDevice;
|
package/es/utils/http.d.ts
DELETED
|
File without changes
|
package/es/utils/logger.d.ts
DELETED
|
File without changes
|
package/es/videoMixing.d.ts
DELETED
|
File without changes
|