webrtc-streaming-core
Advanced tools
Comparing version 1.1.20 to 1.1.21
@@ -1,19 +0,16 @@ | ||
import { DataChannel } from "./datachannel/datachannel"; | ||
import { HID } from "./gui/hid"; | ||
import { HID } from "./hid/hid"; | ||
import { DeviceSelection, DeviceSelectionResult } from "./models/devices.model"; | ||
import { WebRTC } from "./webrtc"; | ||
import { SignallingClient } from "./signaling/websocket"; | ||
import { Pipeline } from "./pipeline/pipeline"; | ||
export declare class WebRTCClient { | ||
video: any; | ||
audio: any; | ||
webrtc: WebRTC; | ||
hid: HID | null; | ||
signaling: SignallingClient; | ||
datachannels: Map<string, DataChannel>; | ||
pipelines: Map<string, Pipeline>; | ||
private readonly platform; | ||
private video; | ||
private audio; | ||
private webrtc; | ||
private signaling; | ||
private datachannels; | ||
private pipelines; | ||
DeviceSelection: (input: DeviceSelection) => Promise<DeviceSelectionResult>; | ||
alert: (input: string) => (void); | ||
started: boolean; | ||
constructor(signalingURL: string, vid: any, audio: any, token: string, DeviceSelection: (n: DeviceSelection) => Promise<DeviceSelectionResult>); | ||
constructor(signalingURL: string, vid: HTMLVideoElement, audio: HTMLAudioElement, token: string, DeviceSelection: (n: DeviceSelection) => Promise<DeviceSelectionResult>, platform: 'mobile' | 'desktop' | null); | ||
private handleIncomingTrack; | ||
@@ -20,0 +17,0 @@ private handleWebRTCMetric; |
@@ -14,3 +14,3 @@ "use strict"; | ||
const datachannel_1 = require("./datachannel/datachannel"); | ||
const hid_1 = require("./gui/hid"); | ||
const hid_1 = require("./hid/hid"); | ||
const log_1 = require("./utils/log"); | ||
@@ -20,4 +20,5 @@ const devices_model_1 = require("./models/devices.model"); | ||
const websocket_1 = require("./signaling/websocket"); | ||
const platform_1 = require("./utils/platform"); | ||
class WebRTCClient { | ||
constructor(signalingURL, vid, audio, token, DeviceSelection) { | ||
constructor(signalingURL, vid, audio, token, DeviceSelection, platform) { | ||
(0, log_1.Log)(log_1.LogLevel.Infor, `Started oneplay app connect to signaling server ${signalingURL}`); | ||
@@ -30,2 +31,3 @@ (0, log_1.Log)(log_1.LogLevel.Infor, `Session token: ${token}`); | ||
this.pipelines = new Map(); | ||
this.platform = platform != null ? platform : (0, platform_1.getPlatform)(); | ||
this.DeviceSelection = DeviceSelection; | ||
@@ -42,3 +44,3 @@ this.hid = null; | ||
(0, log_1.LogConnectionEvent)(log_1.ConnectionEvent.ReceivedAudioStream); | ||
this.audio.current.srcObject = evt.streams[0]; | ||
this.audio.srcObject = evt.streams[0]; | ||
} | ||
@@ -48,3 +50,3 @@ else if (evt.track.kind == "video") { | ||
(0, log_1.LogConnectionEvent)(log_1.ConnectionEvent.ReceivedVideoStream); | ||
this.video.current.srcObject = evt.streams[0]; | ||
this.video.srcObject = evt.streams[0]; | ||
// let pipeline = new Pipeline('h264'); // TODO | ||
@@ -76,3 +78,3 @@ // pipeline.updateSource(evt.streams[0]) | ||
})); | ||
this.hid = new hid_1.HID(this.video.current, (data) => __awaiter(this, void 0, void 0, function* () { | ||
this.hid = new hid_1.HID(this.platform, this.video, (data) => __awaiter(this, void 0, void 0, function* () { | ||
(0, log_1.Log)(log_1.LogLevel.Debug, data); | ||
@@ -79,0 +81,0 @@ let channel = this.datachannels.get("hid"); |
@@ -1,3 +0,5 @@ | ||
type Platform = "Mac OS" | "iOS" | "Windows" | "Linux" | "Android" | "unknown"; | ||
export declare function getOS(): Platform; | ||
type OS = "Mac OS" | "iOS" | "Windows" | "Linux" | "Android" | "unknown"; | ||
type Platform = 'desktop' | 'mobile'; | ||
export declare function getPlatform(): Platform; | ||
export declare function getOS(): OS; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getOS = void 0; | ||
exports.getOS = exports.getPlatform = void 0; | ||
function getPlatform() { | ||
let os = getOS(); | ||
return (os == 'Android' || os == 'iOS') ? 'mobile' : 'desktop'; | ||
} | ||
exports.getPlatform = getPlatform; | ||
function getOS() { | ||
@@ -5,0 +10,0 @@ let OSName = "unknown"; |
{ | ||
"name": "webrtc-streaming-core", | ||
"version": "1.1.20", | ||
"version": "1.1.21", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/app.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193794
64
2928