@opentok/client
Advanced tools
Comparing version 2.12.2 to 2.13.0
@@ -60,3 +60,3 @@ declare namespace OT { | ||
audioFallbackEnabled?: boolean; | ||
audioSource?: string; | ||
audioSource?: string | null | boolean | MediaStreamTrack; | ||
disableAudioProcessing?: boolean; | ||
@@ -79,3 +79,3 @@ frameRate?: 30 | 15 | 7 | 1; | ||
usePreviousDeviceSelection?: boolean; | ||
videoSource?: string; | ||
videoSource?: string | null | boolean | MediaStreamTrack; | ||
}; | ||
@@ -162,2 +162,4 @@ | ||
getStats(callback: (error?: OTError, stats?: PublisherStatsArr) => void): void; | ||
mediaStopped: Event<'mediaStopped', Publisher> & { | ||
@@ -201,3 +203,3 @@ track: MediaStreamTrack | undefined | ||
properties?: PublisherProperties, | ||
callback?: () => void | ||
callback?: (error?: OTError) => void | ||
): Publisher; | ||
@@ -293,8 +295,20 @@ | ||
export function initSession( | ||
partnerId: string, | ||
sessionId: string | ||
): Session; | ||
export function initSession( | ||
partnerId: string, | ||
sessionId: string, | ||
options?: { | ||
connectionEventsSuppressed?: boolean; | ||
iceConfig?: { | ||
includeServers: 'all' | 'custom'; | ||
transportPolicy: 'all' | 'relay'; | ||
customServers: { | ||
urls: string | string[]; | ||
username?: string; | ||
credential?: string; | ||
}[]; | ||
}; | ||
} | ||
): Session; | ||
type TrackStats = { | ||
type IncomingTrackStats = { | ||
bytesReceived: number; | ||
@@ -305,8 +319,28 @@ packetsLost: number; | ||
type OutgoingTrackStats = { | ||
bytesSent: number; | ||
packetsLost: number; | ||
packetsSent: number; | ||
} | ||
type SubscriberStats = { | ||
audio: TrackStats; | ||
video: TrackStats & { frameRate: number; }; | ||
audio: IncomingTrackStats; | ||
video: IncomingTrackStats & { frameRate: number; }; | ||
timestamp: number; | ||
} | ||
type PublisherStats = { | ||
audio: OutgoingTrackStats; | ||
video: OutgoingTrackStats & { frameRate: number; }; | ||
timestamp: number; | ||
} | ||
type PublisherStatContainer = { | ||
subscriberId?: string, | ||
connectionId?: string, | ||
stats: PublisherStats | ||
} | ||
type PublisherStatsArr = PublisherStatContainer[]; | ||
export class Subscriber extends OTEventEmitter<{ | ||
@@ -313,0 +347,0 @@ audioLevelUpdated: Event<'audioLevelUpdated', Subscriber> & { |
{ | ||
"name": "@opentok/client", | ||
"version": "2.12.2", | ||
"version": "2.13.0", | ||
"description": "The OpenTok.js library lets you use OpenTok-powered video sessions on the web", | ||
@@ -5,0 +5,0 @@ "homepage": "https://tokbox.com/developer/sdks/js/", |
@@ -44,3 +44,3 @@ # OpenTok.js | ||
Source maps can be found in `dist/js/sourcemaps/`. Make sure your bundler is configured to include them if you need to generate source maps. | ||
Source maps can be found in `dist/js/`. Make sure your bundler is configured to include them if you need to generate source maps. | ||
@@ -47,0 +47,0 @@ ### As a global window object |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
9143148
0
1
0
47807