mirror of
https://github.com/koush/scrypted.git
synced 2026-02-11 01:32:02 +00:00
webrtc: sdk update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { MediaStreamTrack, RTCPeerConnection, RTCRtpCodecParameters } from "@koush/werift";
|
||||
import { Settings, RTCSignalingChannel, ScryptedDeviceType, ScryptedInterface, VideoCamera, Setting, SettingValue, RTCSessionControl, RTCSignalingSession, FFMpegInput, ScryptedMimeTypes, RTCAVSignalingSetup, Intercom, RequestMediaStreamOptions, MediaObject, MediaStreamOptions, DeviceCreator, DeviceProvider, DeviceCreatorSettings, RTCSignalingOptions } from '@scrypted/sdk';
|
||||
import { Settings, RTCSignalingChannel, ScryptedDeviceType, ScryptedInterface, VideoCamera, Setting, SettingValue, RTCSessionControl, RTCSignalingSession, FFMpegInput, ScryptedMimeTypes, RTCAVSignalingSetup, Intercom, RequestMediaStreamOptions, MediaObject, MediaStreamOptions, DeviceCreator, DeviceProvider, DeviceCreatorSettings, RTCSignalingOptions, ResponseMediaStreamOptions } from '@scrypted/sdk';
|
||||
import sdk from '@scrypted/sdk';
|
||||
import { AutoenableMixinProvider } from '@scrypted/common/src/autoenable-mixin-provider';
|
||||
import { ffmpegLogInitialOutput, safeKillFFmpeg, safePrintFFmpegArguments } from '@scrypted/common/src/media-helpers';
|
||||
@@ -369,8 +369,8 @@ class WebRTCMixin extends SettingsMixinDeviceBase<VideoCamera & RTCSignalingChan
|
||||
return mediaManager.createFFmpegMediaObject(ffmpegInput);
|
||||
}
|
||||
|
||||
async getVideoStreamOptions(): Promise<MediaStreamOptions[]> {
|
||||
let ret: MediaStreamOptions[] = [];
|
||||
async getVideoStreamOptions(): Promise<ResponseMediaStreamOptions[]> {
|
||||
let ret: ResponseMediaStreamOptions[] = [];
|
||||
if (this.mixinDeviceInterfaces.includes(ScryptedInterface.VideoCamera)) {
|
||||
ret = await this.mixinDevice.getVideoStreamOptions();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import sdk, { RTCSessionControl, RTCSignalingClient, RTCSignalingSession, ScryptedDeviceBase, RTCAVSignalingSetup, RTCSignalingSendIceCandidate, VideoCamera, MediaObject, MediaStreamOptions, RequestMediaStreamOptions, RTCSignalingChannel, RTCSignalingOptions, Intercom } from "@scrypted/sdk"; import { createRTCPeerConnectionSource, getRTCMediaStreamOptions } from "./wrtc-to-rtsp";
|
||||
import sdk, { RTCSessionControl, RTCSignalingClient, RTCSignalingSession, ScryptedDeviceBase, RTCAVSignalingSetup, RTCSignalingSendIceCandidate, VideoCamera, MediaObject, MediaStreamOptions, RequestMediaStreamOptions, RTCSignalingChannel, RTCSignalingOptions, Intercom, ResponseMediaStreamOptions } from "@scrypted/sdk"; import { createRTCPeerConnectionSource, getRTCMediaStreamOptions } from "./wrtc-to-rtsp";
|
||||
const { mediaManager, systemManager, deviceManager } = sdk;
|
||||
|
||||
export class WebRTCCamera extends ScryptedDeviceBase implements VideoCamera, RTCSignalingClient, RTCSignalingChannel, Intercom {
|
||||
@@ -39,7 +39,7 @@ export class WebRTCCamera extends ScryptedDeviceBase implements VideoCamera, RTC
|
||||
return mediaManager.createFFmpegMediaObject(ffmpegInput);
|
||||
}
|
||||
|
||||
async getVideoStreamOptions(): Promise<MediaStreamOptions[]> {
|
||||
async getVideoStreamOptions(): Promise<ResponseMediaStreamOptions[]> {
|
||||
const mediaStreamOptions = getRTCMediaStreamOptions('webrtc', 'WebRTC', true);
|
||||
return [
|
||||
mediaStreamOptions,
|
||||
|
||||
Reference in New Issue
Block a user