New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@livekit/components-core

Package Overview
Dependencies
Maintainers
20
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livekit/components-core - npm Package Compare versions

Comparing version 0.10.1 to 0.10.2

dist/helper/transcriptions.d.ts

30

dist/components-core.d.ts

@@ -17,2 +17,3 @@ import type { AudioCaptureOptions } from 'livekit-client';

import type { ParticipantPermission } from '@livekit/protocol';
import type { PublicationEventCallbacks } from 'livekit-client/dist/src/room/track/TrackPublication';
import { RemoteParticipant } from 'livekit-client';

@@ -28,2 +29,3 @@ import { Room } from 'livekit-client';

import type { TrackPublishOptions } from 'livekit-client';
import { TranscriptionSegment } from 'livekit-client';
import type { VideoCaptureOptions } from 'livekit-client';

@@ -33,2 +35,7 @@

export declare function addMediaTimestampToTranscription(segment: TranscriptionSegment, timestamps: {
timestamp: number;
rtpTimestamp?: number;
}): ReceivedTranscriptionSegment;
export declare const allParticipantEvents: ParticipantEvent[];

@@ -125,6 +132,18 @@

/**
* @returns An array of unique (by id) `TranscriptionSegment`s. Latest wins. If the resulting array would be longer than `windowSize`, the array will be reduced to `windowSize` length
*/
export declare function dedupeSegments<T extends TranscriptionSegment>(prevSegments: T[], newSegments: T[], windowSize: number): T[];
export declare const defaultUserChoices: LocalUserChoices;
export declare function didActiveSegmentsChange<T extends TranscriptionSegment>(prevActive: T[], newActive: T[]): boolean;
export declare function encryptionStatusObservable(room: Room, participant: Participant): Observable<boolean>;
export declare function getActiveTranscriptionSegments(segments: ReceivedTranscriptionSegment[], syncTimes: {
timestamp: number;
rtpTimestamp?: number;
}, maxAge?: number): ReceivedTranscriptionSegment[];
/**

@@ -350,2 +369,7 @@ * Calculates the scrollbar width by creating two HTML elements

export declare type ReceivedTranscriptionSegment = TranscriptionSegment & {
receivedAtMediaTimestamp: number;
receivedAt: number;
};
declare interface RegExOptions {

@@ -575,2 +599,4 @@ /**

export declare function trackEventSelector<T extends TrackEvent_2>(publication: TrackPublication | Track, event: T): Observable<Parameters<PublicationEventCallbacks[Extract<T, keyof PublicationEventCallbacks>]>>;
/**

@@ -628,2 +654,6 @@ * The TrackIdentifier type is used to select Tracks either based on

export declare function trackSyncTimeObserver(track: Track): Observable<number>;
export declare function trackTranscriptionObserver(publication: TrackPublication): Observable<[transcription: TranscriptionSegment[]]>;
declare type UpdatableItem = TrackReferenceOrPlaceholder | number;

@@ -630,0 +660,0 @@

1

dist/helper/index.d.ts

@@ -10,2 +10,3 @@ export * from './detectMobileBrowser';

export { supportsScreenSharing } from './featureDetection';
export * from './transcriptions';
//# sourceMappingURL=index.d.ts.map

@@ -6,2 +6,3 @@ import type { Participant, Room, Track, TrackPublication } from 'livekit-client';

import type { ParticipantTrackIdentifier } from '../types';
import type { PublicationEventCallbacks } from 'livekit-client/dist/src/room/track/TrackPublication';
export declare function trackObservable(track: TrackPublication): Observable<TrackPublication>;

@@ -18,3 +19,6 @@ export declare function observeTrackEvents(track: TrackPublication, ...events: TrackEvent[]): Observable<TrackPublication>;

export declare function participantTracksObservable(participant: Participant, trackIdentifier: ParticipantTrackIdentifier): Observable<TrackReference[]>;
export declare function trackEventSelector<T extends TrackEvent>(publication: TrackPublication | Track, event: T): Observable<Parameters<PublicationEventCallbacks[Extract<T, keyof PublicationEventCallbacks>]>>;
export declare function trackTranscriptionObserver(publication: TrackPublication): Observable<[transcription: import("livekit-client").TranscriptionSegment[]]>;
export declare function trackSyncTimeObserver(track: Track): Observable<number>;
export {};
//# sourceMappingURL=track.d.ts.map

2

package.json
{
"name": "@livekit/components-core",
"version": "0.10.1",
"version": "0.10.2",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "author": "LiveKit",

@@ -10,1 +10,2 @@ export * from './detectMobileBrowser';

export { supportsScreenSharing } from './featureDetection';
export * from './transcriptions';

@@ -17,2 +17,3 @@ import type {

import { observeParticipantEvents } from './participant';
import type { PublicationEventCallbacks } from 'livekit-client/dist/src/room/track/TrackPublication';

@@ -174,1 +175,36 @@ export function trackObservable(track: TrackPublication) {

}
export function trackEventSelector<T extends TrackEvent>(
publication: TrackPublication | Track,
event: T,
) {
const observable = new Observable<
Parameters<PublicationEventCallbacks[Extract<T, keyof PublicationEventCallbacks>]>
>((subscribe) => {
const update = (
...params: Parameters<PublicationEventCallbacks[Extract<T, keyof PublicationEventCallbacks>]>
) => {
subscribe.next(params);
};
// @ts-expect-error not a perfect overlap between TrackEvent and keyof TrackEventCallbacks
publication.on(event, update);
const unsubscribe = () => {
// @ts-expect-error not a perfect overlap between TrackEvent and keyof TrackEventCallbacks
publication.off(event, update);
};
return unsubscribe;
});
return observable;
}
export function trackTranscriptionObserver(publication: TrackPublication) {
return trackEventSelector(publication, TrackEvent.TranscriptionReceived);
}
export function trackSyncTimeObserver(track: Track) {
return trackEventSelector(track, TrackEvent.TimeSyncUpdate).pipe(
map(([timeUpdate]) => timeUpdate),
);
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc