PageSourceSearch

https://app.sundaysky.com/client/mediaUtils.BqcrtZqT.js

js sundaysky.com collected 2026-10-01 08:41:35 UTC 1,554 bytes, 29 lines download raw bytes

1//#region client/utils/mediaUtils.ts
2/**
3* Returns true for the benign rejections that `HTMLMediaElement.play()` produces when its promise is
4* interrupted before it resolves: an `AbortError` (interrupted by `pause()`, a `src` change / `load()`,
5* or the element being removed from the DOM - the classic "The play() request was interrupted by ..."
6* error, see https://goo.gl/LdLk22) or a `NotAllowedError` (blocked by the browser autoplay policy).
7* Both are expected outcomes of normal UI flows and should not surface as unhandled rejections.
8*/
9
10!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="03d50509-86aa-50fe-9ea7-3e59419a74db")}catch(e){}}();
11function isIgnorablePlayError(error) {
12	const name = error?.name;
13	return name === "AbortError" || name === "NotAllowedError";
14}
15/**
16* Plays a media element while absorbing the benign rejections described in {@link isIgnorablePlayError}.
17* Any other rejection is genuinely unexpected and is re-thrown so it still reaches Sentry.
18*/
19function safePlayMedia(media) {
20	const playPromise = media?.play();
21	if (playPromise != null && typeof playPromise.catch === "function") playPromise.catch((error) => {
22		if (!isIgnorablePlayError(error)) throw error;
23	});
24}
25//#endregion
26export { safePlayMedia as t };
27
28//# sourceMappingURL=mediaUtils.BqcrtZqT.js.map
29//# debugId=03d50509-86aa-50fe-9ea7-3e59419a74db

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.