ResourceTracker
is a utility class used to manage the lifecycle of resources, ensuring they are properly cleaned up to prevent memory leaks.
true
if the tracker has been disposed, false
otherwise.
cleanup
: A function that will be called when the tracker is disposed.dispose()
or .close()
method.
disposable
: An object with a .dispose()
or .close()
methodtimerId
: The ID returned by setTimeout
or setInterval
isInterval
: For trackTimer
only - set to true
if the timer is an intervalcallback
: The function to executems
: The time in milliseconds to wait before executionStreamType
enum value or a language-specific stream string.
subscription
: The stream identifier to parse (e.g., “transcription:en-US”)LanguageStreamInfo
object, or null
if the input is not a valid language-specific stream
Example:
language
: The language code (e.g., “en-US”)sourceLanguage
: The source language code (e.g., “es-ES”)targetLanguage
: The target language code (e.g., “en-US”)StreamType
enum member or a valid language-specific stream string.
subscription
: The value to checktrue
if the subscription type is valid, false
otherwise
Example:
StreamType
enum value from an ExtendedStreamType
.
subscription
: The ExtendedStreamType
valueStreamType
, or null
if invalid
Example:
ExtendedStreamType
represents a language-specific stream.
subscription
: The ExtendedStreamType
valuetrue
if it’s a language-specific stream format, false
otherwise
Example:
parseLanguageStream()
.
subscription
: The ExtendedStreamType
valuenull