Skip to content

Commit

Permalink
Remove Node.JS reference from the RxPlayer code
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Oct 13, 2023
1 parent 9950040 commit 31359a5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/compat/event_listeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function getVideoVisibilityRef(
stopListening : CancellationSignal
) : IReadOnlySharedReference<boolean> {
const isDocVisibleRef = getDocumentVisibilityRef(stopListening);
let currentTimeout : number | NodeJS.Timeout | undefined;
let currentTimeout : number | undefined;
const ref = new SharedReference(true, stopListening);
stopListening.register(() => {
clearTimeout(currentTimeout);
Expand Down
2 changes: 2 additions & 0 deletions src/compat/global_scope.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import isNode from "./is_node";
import isWorker from "./is_worker";

declare const global: typeof self;

/**
* The current environment's global object, written in such a way to maximize
* compatibility.
Expand Down
2 changes: 1 addition & 1 deletion src/core/fetchers/cdn_prioritizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default class CdnPrioritizer extends EventEmitter<ICdnPrioritizerEvents>
* `metadata` array which is used considerably more than the `timeouts`
* array.
*/
timeouts : Array<number | NodeJS.Timeout>;
timeouts : number[];
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils/request/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default function fetchRequest(
abortController.abort();
}

let timeout : number | NodeJS.Timeout | undefined;
let timeout : number | undefined;
if (options.timeout !== undefined) {
timeout = setTimeout(() => {
timeouted = true;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/request/xhr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function request<T>(
const xhr = new XMLHttpRequest();
xhr.open("GET", url, true);

let timeoutId : undefined | number | NodeJS.Timeout;
let timeoutId : undefined | number;
if (timeout !== undefined) {
xhr.timeout = timeout;

Expand Down

0 comments on commit 31359a5

Please sign in to comment.