This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+182
View File
@@ -0,0 +1,182 @@
// Metro module 9854 (f9855).
import { useMemo, memo } from "react";
import { Image as Image2, View } from "react-native";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import Module9855 from "../../../_bundle/Module9855";
import Module9856 from "../../../_bundle/Module9856";
import Module9857 from "../../../_bundle/Module9857";
import Module9858 from "../../../_bundle/Module9858";
import Module9859 from "../../../_bundle/Module9859";
import Module9860 from "../../../_bundle/Module9860";
import Module9861 from "../../../_bundle/Module9861";
import Module9862 from "../../../_bundle/Module9862";
import Module9863 from "../../../_bundle/Module9863";
import Module9864 from "../../../_bundle/Module9864";
import Module9865 from "../../../_bundle/Module9865";
import Module9866 from "../../../_bundle/Module9866";
import Module9867 from "../../../_bundle/Module9867";
import Module9868 from "../../../_bundle/Module9868";
import { classifyFileName } from "../../../utils/FileUtils";
import { Text } from "../../../design/components/Text/native/Text";
import * as _PlatformUtils from "../../../utils/PlatformUtils";
import { isAndroid } from "../../../utils/PlatformUtils";
import FastImage from "../../../components_native/common/FastImage";
import { ThumbnailImage } from "../../../design/void/native";
import { CirclePlayIcon } from "../../../design/components/Icon/native/redesign/generated/CirclePlayIcon";
import { VideoComponent } from "../../../components_native/common/Video";
let useStyles, c6543_9, FilenameText, DefaultAttachmentPreview, Component;
const AttachmentIcon = function AttachmentIcon(props) {
const fileName = props.fileName;
return <Image2 style={useStyles().attachmentFileIcon} source={useMemo(() => {
let r9 = fileName;
if (fileName == null) {
r9 = "";
}
let r12 = c6543_9[classifyFileName(r9)];
if (r12 == null) {
r12 = Module9866;
}
return r12;
}, [fileName])} />;
};
FilenameText = function FilenameText(props) {
const fileName2 = props.fileName;
const styles = useStyles();
const r5 = /(?:\.([^.]+))?$/;
let r15 = fileName2;
if (r15 == null) {
r15 = "";
}
const r16 = r5.exec(r15);
return <View>
{fileName2 != null && fileName2 !== "" && <Text style={styles.attachmentFileName} ellipsizeMode="middle" lineClamp={1} variant="text-xs/medium" color="mobile-text-heading-primary">{fileName2}</Text>}
<Text style={styles.attachmentFileName} lineClamp={1} variant="text-xs/medium" color="text-muted">
{r16 != null ? r16[1] != null ? r16[1].toUpperCase() : "UNKNOWN" : "UNKNOWN"}
</Text>
</View>;
};
DefaultAttachmentPreview = function DefaultAttachmentPreview(props) {
const { fileName: fileName2, maxFileWidth, borderRadius } = props;
return <View style={[useStyles().fileInfoAttachmentPreviewFile, {
maxWidth: maxFileWidth,
borderRadius
}]}>
<AttachmentIcon fileName={fileName2} />
<FilenameText fileName={fileName2} />
</View>;
};
useStyles = createStyles({
fileInfoAttachmentPreviewFile: {
flexDirection: "row",
alignItems: "center",
overflow: "hidden",
borderRadius: Module712.radii.sm,
height: 75,
padding: 12,
flex: 1,
gap: Module712.space.PX_8
},
attachmentFileIcon: {
height: 32,
width: 24
},
attachmentFileName: {
paddingRight: 4,
paddingLeft: 4,
maxWidth: 136
},
videoIcon: {
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center"
}
});
c6543_9 = {
archive: Module9855,
acrobat: Module9856,
ae: Module9857,
ai: Module9858,
audio: Module9859,
code: Module9860,
document: Module9861,
image: Module9862,
photoshop: Module9863,
sketch: Module9864,
spreadsheet: Module9865,
unknown: Module9866,
video: Module9867,
webcode: Module9868
};
Component = memo(function({ uri, width, height, borderRadius, style, fileName: fileName2 }) {
let props;
const source = {
uri,
width,
height
};
const r10 = {
width,
height,
borderRadius
};
const r13 = fileName2 != null && fileName2 !== "" && /\.gif$/i.test(fileName2) && (_PlatformUtils.isIOS() && uri.startsWith("ph://") || isAndroid() && uri.startsWith("content://"));
const r34 = {
style: [r10, style, {
overflow: "hidden"
}],
children: null
};
if (r13) {
r34.children = <FastImage style={[r10, style]} source={source} resizeMode="cover" enableAnimation />;
props = r34;
} else {
r34.children = <ThumbnailImage style={[r10, style]} source={source} localImageSource={source} />;
props = r34;
}
return <View {...props} />;
});
export default function AttachmentPreview(props) {
let r44;
const { uri, isImage, isVideo, width = 75, height = 75, maxFileWidth, fileName: fileName2, borderRadius = Module712.radii.sm, showPlayOnVideoPreview = false, defaultPreview = <DefaultAttachmentPreview fileName={fileName2} maxFileWidth={maxFileWidth} borderRadius={borderRadius} /> } = props;
L25: {
const style = props.style;
const styles = useStyles();
if (isImage) {
r44 = <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName2} />;
} else {
if (!(isVideo && isAndroid()) && !(_PlatformUtils.isIOS() && uri.startsWith("ph://"))) {
r44 = defaultPreview;
if (!isVideo) {
break L25;
}
const isIOS = _PlatformUtils.isIOS();
r44 = defaultPreview;
if (!isIOS) {
break L25;
}
r44 = <View style={style}>
<VideoComponent style={{
height,
width
}} source={{
uri
}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />
</View>;
break L25;
}
r44 = showPlayOnVideoPreview ? <View style={style}>
<Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName2} />
<View style={styles.videoIcon}>
<CirclePlayIcon size="md" color="white" secondaryColor="black" />
</View>
</View> : <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName2} />;
}
}
return r44;
};
export { AttachmentIcon };
+30
View File
@@ -0,0 +1,30 @@
// Metro module 8103 (f8104).
import { View } from "react-native";
import { Fonts } from "../../../Constants";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import { hexWithOpacity } from "../../../utils/ColorUtils";
import { LegacyText } from "../../../design/void/native";
const useStyles = createStyles({
captionText: {
fontFamily: Fonts.PRIMARY_BOLD,
color: Module712.colors.WHITE,
fontSize: 12
},
labelContainer: {
backgroundColor: hexWithOpacity(Module712.unsafe_rawColors.PRIMARY_700, 0.5),
borderRadius: Module712.radii.xs,
paddingHorizontal: 8,
paddingVertical: 2,
position: "absolute",
right: 6,
bottom: 6
}
});
export function Caption(props) {
const { label, style, textStyle } = props;
const styles = useStyles();
return <View style={[styles.labelContainer, style]}>
<LegacyText style={[styles.captionText, textStyle]}>{label}</LegacyText>
</View>;
}
@@ -0,0 +1,74 @@
// Metro module 4753 (f4754).
import { NativeModules } from "react-native";
import Logger from "../../debug/Logger";
import LifecycleManager from "../../../lib/LifecycleManager";
let c2906_2 = new Logger("IosImageTypesManager");
let supportedImageTypes = null;
let c2906_4 = null;
let c2906_5 = null;
let c2906_6 = null;
class IosImageTypesManager extends LifecycleManager {
_initialize() {
this.initializeSupportedImageTypes();
}
_terminate() {}
initializeSupportedImageTypes() {
if (supportedImageTypes === null) {
try {
const supportedImageTypes2 = NativeModules.MediaManager.getSupportedImageTypes();
supportedImageTypes = supportedImageTypes2;
const set = new Set();
const set2 = new Set();
const set3 = new Set();
for (const item of Object.entries(supportedImageTypes2)) {
const [, r55] = item;
const { extension, mimeType } = r55;
if (extension != null && extension !== "") {
set.add(extension);
}
if (mimeType != null && mimeType !== "") {
set2.add(mimeType);
}
}
set.add("jpg");
set3.add("gif");
set3.add("webp");
c2906_4 = set;
c2906_5 = set2;
c2906_6 = set3;
} catch ($e) {
c2906_2.warn("Failed to get iOS supported image types:", $e);
supportedImageTypes = {};
c2906_4 = new Set();
c2906_5 = new Set();
c2906_6 = new Set();
}
}
}
getSupportedImageTypes() {
return supportedImageTypes;
}
isImageTypeSupported(a0) {
return supportedImageTypes !== null && a0 in supportedImageTypes;
}
getSupportedExtensions() {
return c2906_4;
}
getSupportedMimeTypes() {
return c2906_5;
}
getAnimatedExtensions() {
return c2906_6;
}
isExtensionSupported(a0) {
return c2906_4 !== null && c2906_4.has(a0);
}
isMimeTypeSupported(a0) {
return c2906_5 !== null && c2906_5.has(a0);
}
isExtensionAnimated(a0) {
return c2906_6 !== null && c2906_6.has(a0);
}
}
const iosImageTypesManager = new IosImageTypesManager();
export default iosImageTypesManager;
+407
View File
@@ -0,0 +1,407 @@
// Metro module 13590 (f13591).
import { NativeEventEmitter, NativeModules } from "react-native";
import EmbeddedActivitiesStore from "../../activities/EmbeddedActivitiesStore";
import VoicePanelStore from "../../voice_panel/VoicePanelStore";
import ChannelStore from "../../../stores/ChannelStore";
import MessageStore from "../../../stores/MessageStore";
import PermissionStore from "../../../stores/PermissionStore";
import AppStateStore from "../../../stores/native/AppStateStore";
import { AppStates } from "../../../Constants";
import { ActivityPanelModes } from "../../activities/panel/ActivityPanelConstants";
import { PLAYBACK_COMPLETION_DETECTION_TOLERANCE, PLAYBACK_PROGRESS_UPDATE_INTERVAL } from "../../media_panel/native/MediaPlaybackPanelConstants";
import { Permissions } from "../../../_bundle/Module505";
import Logger from "../../debug/Logger";
import { create } from "../../../_bundle/Module644";
import { batchUpdates } from "../../../_bundle/Module705";
import LifecycleManager from "../../../lib/LifecycleManager";
import { getRootNavigationRef } from "../../main_tabs_v2/RootNavigationRef.native";
import Dispatcher from "../../../Dispatcher";
import { isIOS } from "../../../utils/PlatformUtils";
import shallowEqual from "../../../_bundle/shallowEqual";
import MessageActionCreators from "../../../actions/MessageActionCreators";
import { getFocusedChannelId } from "../../panels/isChannelFocused.native";
import { $callWithNewTarget } from "../../../_hermes/prelude";
let c9437_16 = new Logger("MediaPlayerManager");
let c9437_17 = create((c20557_0) => ({
activeMediaPlayerSource: void 0,
mediaSourceMessage: void 0,
canAccessMedia: true,
isPlaying: false,
wasPipClosedByUser: false,
progress: void 0,
rate: 0,
showPip: false,
closePip: () => {
batchUpdates(() => c20557_0({
showPip: false
}));
},
displayedMediaItemIdsPerChannel: {},
currentlyDisplayedChannelId: void 0
}));
class MediaPlayerManager extends LifecycleManager {
subscriptions = [];
voicePanelStoreUnsubscribe = void 0;
showPipUnsubscribe = void 0;
pauseAndClosePip = this.pauseAndClosePip.bind(this);
handleVoicePanelStateUpdated = this.handleVoicePanelStateUpdated.bind(this);
handleEmbeddedActivitiesUpdated = this.handleEmbeddedActivitiesUpdated.bind(this);
handleMediaPlayerPlaybackRateChanged = this.handleMediaPlayerPlaybackRateChanged.bind(this);
handleMediaPlayerPlaybackSourceChanged = this.handleMediaPlayerPlaybackSourceChanged.bind(this);
handleMediaPlayerViewWillAppear = this.handleMediaPlayerViewWillAppear.bind(this);
handleMediaPlayerViewDidDisappear = this.handleMediaPlayerViewDidDisappear.bind(this);
updateDisplayState = this.updateDisplayState.bind(this);
updateMediaPermissions = this.updateMediaPermissions.bind(this);
constructor() {
super();
}
_initialize() {
const nativeEventEmitter = new NativeEventEmitter(NativeModules.MediaPlayerManager);
this.subscriptions = [nativeEventEmitter.addListener("MediaPlayerPlaybackSourceChanged", this.handleMediaPlayerPlaybackSourceChanged), nativeEventEmitter.addListener("MediaPlayerPlaybackProgressUpdated", this.handleMediaPlayerPlaybackProgressUpdated), nativeEventEmitter.addListener("MediaPlayerPlaybackRateChanged", this.handleMediaPlayerPlaybackRateChanged), nativeEventEmitter.addListener("MediaPlayerViewWillAppear", this.handleMediaPlayerViewWillAppear), nativeEventEmitter.addListener("MediaPlayerViewDidDisappear", this.handleMediaPlayerViewDidDisappear)];
NativeModules.MediaPlayerManager.subscribeToPlaybackEvents();
const rootNavigationRef = getRootNavigationRef();
if (rootNavigationRef != null) {
rootNavigationRef.addListener("state", this.updateDisplayState);
}
this.voicePanelStoreUnsubscribe = VoicePanelStore.subscribe(this.handleVoicePanelStateUpdated);
EmbeddedActivitiesStore.addChangeListener(this.handleEmbeddedActivitiesUpdated);
ChannelStore.addChangeListener(this.updateMediaPermissions);
PermissionStore.addChangeListener(this.updateMediaPermissions);
Dispatcher.subscribe("LOGOUT", this.userDidClosePip);
if (isIOS()) {
this.showPipUnsubscribe = c9437_17.subscribe((a0, a1) => {
if (a1.showPip && !a0.showPip) {
NativeModules.MediaPlayerManager.clearNowPlayingInfo();
} else if (a1.rate !== 0 && a0.rate === 0 && !a0.showPip && AppStateStore.getState() === AppStates.ACTIVE) {
NativeModules.MediaPlayerManager.clearNowPlayingInfo();
}
});
}
c9437_16.verbose("Initialized and subscribed to playback events");
}
updateMediaPermissions() {
batchUpdates(() => {
let r10 = c9437_17.getState().activeMediaPlayerSource?.channelId;
if (r10 == null) {
r10 = null;
}
const channel = ChannelStore.getChannel(r10);
if (channel != null && (!channel.isPrivate() && !PermissionStore.can(Permissions.VIEW_CHANNEL, channel))) {
c9437_17.setState({
canAccessMedia: false
});
this.pauseCurrentPlayer();
} else {
c9437_17.setState({
canAccessMedia: true
});
}
});
}
_terminate() {
this.subscriptions.forEach((subscription) => subscription.remove());
this.subscriptions = [];
const rootNavigationRef = getRootNavigationRef();
if (rootNavigationRef != null) {
rootNavigationRef.removeListener("state", this.updateDisplayState);
}
const voicePanelStoreUnsubscribe = this.voicePanelStoreUnsubscribe;
if (voicePanelStoreUnsubscribe != null) {
voicePanelStoreUnsubscribe.call(this);
}
const showPipUnsubscribe = this.showPipUnsubscribe;
if (showPipUnsubscribe != null) {
showPipUnsubscribe.call(this);
}
EmbeddedActivitiesStore.removeChangeListener(this.handleEmbeddedActivitiesUpdated);
ChannelStore.removeChangeListener(this.updateMediaPermissions);
PermissionStore.removeChangeListener(this.updateMediaPermissions);
Dispatcher.unsubscribe("LOGOUT", this.userDidClosePip);
}
pauseCurrentPlayer() {
NativeModules.MediaPlayerManager.pauseCurrentPlayer();
}
playCurrentPlayer() {
NativeModules.MediaPlayerManager.playCurrentPlayer();
}
userDidClosePip() {
batchUpdates(() => c9437_17.setState({
wasPipClosedByUser: true,
showPip: false
}));
}
pauseAndClosePip() {
batchUpdates(() => {
this.pauseCurrentPlayer();
c9437_17.setState({
wasPipClosedByUser: true,
showPip: false
});
});
}
handleVoicePanelStateUpdated() {
const state = VoicePanelStore.getState();
if (state.isVoicePanelFullscreen() || state.voicePanelsPIP.size > 0) {
this.pauseAndClosePip();
}
}
handleEmbeddedActivitiesUpdated() {
if (EmbeddedActivitiesStore.getActivityPanelMode() === ActivityPanelModes.PIP) {
this.pauseAndClosePip();
}
}
handleMediaPlayerPlaybackRateChanged({ source, rate }) {
batchUpdates(() => {
if (source == null) {
c9437_17.setState({
rate: 0,
isPlaying: false
});
}
c9437_16.verbose(`Playback rate changed to ${rate}: ${source?.id}`);
const state = c9437_17.getState();
const { activeMediaPlayerSource, isPlaying, wasPipClosedByUser } = state;
if (shallowEqual(activeMediaPlayerSource, source == null ? void 0 : source)) {
const r48 = isPlaying === false && rate > 0;
c9437_17.setState({
rate,
isPlaying: rate !== 0,
wasPipClosedByUser: r48 ? !r48 : wasPipClosedByUser
});
this.updateDisplayState();
return void 0;
}
this.handleMediaPlayerPlaybackSourceChanged({
source
});
this.handleMediaPlayerPlaybackRateChanged({
source,
rate
});
});
}
handleMediaPlayerPlaybackProgressUpdated({ source: source2, time, duration }) {
batchUpdates(() => {
const state = c9437_17.getState();
const activeMediaPlayerSource = state.activeMediaPlayerSource;
const r16 = source2 == null ? void 0 : source2;
L22: {
if (shallowEqual(activeMediaPlayerSource, r16)) {
const currentlyDisplayedChannelId = state.currentlyDisplayedChannelId;
if (!state.showPip) {
if (currentlyDisplayedChannelId == null) {
break L22;
}
if (currentlyDisplayedChannelId !== source2?.channelId) {
break L22;
}
}
const r22 = duration > 0;
let progress2 = void 0;
if (r22) {
let isCompleted = duration <= 0 ? void 0 : duration - time <= PLAYBACK_COMPLETION_DETECTION_TOLERANCE;
if (isCompleted == null) {
isCompleted = false;
}
progress2 = {
time,
duration,
isCompleted
};
}
const progress = state.progress;
if (!(progress != null && progress2 != null && Math.abs(progress2.time - progress.time) < PLAYBACK_PROGRESS_UPDATE_INTERVAL && progress2.time !== progress2.duration)) {
c9437_17.setState({
progress: progress2
});
}
}
}
});
}
handleMediaPlayerPlaybackSourceChanged({ source: source3 }) {
batchUpdates(() => {
const state = c9437_17.getState();
c9437_16.verbose(`Playback source changed: ${source3?.id}`);
let activeMediaPlayerSource = state.activeMediaPlayerSource;
if (activeMediaPlayerSource == null) {
activeMediaPlayerSource = void 0;
}
if (!shallowEqual(activeMediaPlayerSource, source3 == null ? void 0 : source3)) {
c9437_17.setState({
activeMediaPlayerSource: source3 == null ? void 0 : source3,
mediaSourceMessage: source3 != null ? this.getOrFetchMediaSourceMessage(source3) : void 0,
progress: void 0,
rate: 0,
isPlaying: false,
wasPipClosedByUser: false
});
this.updateMediaPermissions();
this.updateDisplayState();
}
});
}
getOrFetchMediaSourceMessage({ channelId: channelId3, messageId, assetUrl }) {
if (messageId != null && channelId3 != null) {
const message = MessageStore.getMessage(channelId3, messageId);
if (message != null) {
return message;
}
if (assetUrl != null) {
const r17 = MessageStore.getMessages(channelId3).toArray().find((item) => {
const contentMessage = item.getContentMessage();
const r2 = contentMessage == null;
let r8 = void 0;
if (!r2) {
const attachments = contentMessage.attachments;
r8 = attachments == null ? void 0 : attachments.some((attachment) => attachment.url === assetUrl);
}
return r8;
});
if (r17 != null) {
return r17;
}
}
MessageActionCreators.fetchMessage({
channelId: channelId3,
messageId
}).then((result) => {
if (result != null) {
this.handleMediaSourceMessageUpdated(result);
}
});
}
}
handleMediaSourceMessageUpdated(mediaSourceMessage) {
batchUpdates(() => {
if (c9437_17.getState().activeMediaPlayerSource?.messageId === mediaSourceMessage.id) {
c9437_17.setState({
mediaSourceMessage
});
}
});
}
handleMediaPlayerViewWillAppear({ mediaItemIds, channelId }) {
batchUpdates(() => {
const displayedMediaItemIdsPerChannel = c9437_17.getState().displayedMediaItemIdsPerChannel;
let r7 = displayedMediaItemIdsPerChannel[channelId];
if (r7 == null) {
r7 = [];
}
displayedMediaItemIdsPerChannel[channelId] = new Set([...r7, ...mediaItemIds]);
c9437_17.setState({
displayedMediaItemIdsPerChannel
});
this.updateDisplayState();
});
}
handleMediaPlayerViewDidDisappear({ mediaItemIds: mediaItemIds2, channelId: channelId2 }) {
batchUpdates(() => {
const displayedMediaItemIdsPerChannel = c9437_17.getState().displayedMediaItemIdsPerChannel;
const r9 = Set;
let r5 = displayedMediaItemIdsPerChannel[channelId2];
if (r5 == null) {
r5 = new Set();
}
const r27 = new r9([...r5].filter((item) => !mediaItemIds2.includes(item)));
if (r27.size === 0) {
delete displayedMediaItemIdsPerChannel[channelId2];
} else {
displayedMediaItemIdsPerChannel[channelId2] = r27;
}
c9437_17.setState({
displayedMediaItemIdsPerChannel
});
this.updateDisplayState();
});
}
updateDisplayState() {
batchUpdates(() => {
const state = c9437_17.getState();
const { displayedMediaItemIdsPerChannel, currentlyDisplayedChannelId, activeMediaPlayerSource = {} } = state;
L27: {
const id = activeMediaPlayerSource.id;
const { wasPipClosedByUser, progress } = state;
let isPlaying = state.isPlaying;
const showPip = state.showPip;
if (wasPipClosedByUser) {
c9437_17.setState({
showPip: false
});
} else {
if (!isPlaying && !showPip) {
break L27;
}
if (!isPlaying) {
isPlaying = progress != null && !(progress.duration <= 0 ? void 0 : progress.duration - progress.time <= PLAYBACK_COMPLETION_DETECTION_TOLERANCE);
}
const focusedChannelId = getFocusedChannelId();
if (focusedChannelId != null && currentlyDisplayedChannelId !== focusedChannelId) {
for (const key in displayedMediaItemIdsPerChannel) {
if (key !== focusedChannelId) {
delete displayedMediaItemIdsPerChannel[key];
}
}
}
if (id != null) {
if (focusedChannelId != null) {
const r45 = displayedMediaItemIdsPerChannel[focusedChannelId];
if (r45 != null) {
if (isPlaying) {
isPlaying = !r45.has(id);
}
c9437_17.setState({
showPip: isPlaying,
currentlyDisplayedChannelId: focusedChannelId,
displayedMediaItemIdsPerChannel
});
} else {
c9437_17.setState({
showPip: isPlaying,
currentlyDisplayedChannelId: focusedChannelId,
displayedMediaItemIdsPerChannel
});
}
} else {
c9437_17.setState({
showPip: isPlaying,
currentlyDisplayedChannelId: focusedChannelId,
displayedMediaItemIdsPerChannel
});
}
} else {
c9437_17.setState({
showPip: isPlaying,
currentlyDisplayedChannelId: focusedChannelId,
displayedMediaItemIdsPerChannel
});
}
}
}
});
}
}
const prototypeOf = Object.getPrototypeOf(MediaPlayerManager);
const r95 = Object.create(MediaPlayerManager.prototype);
const r97 = $callWithNewTarget(prototypeOf, r95, MediaPlayerManager);
const r98 = r97 instanceof Object ? r97 : r95;
r98.subscriptions = [];
r98.voicePanelStoreUnsubscribe = void 0;
r98.showPipUnsubscribe = void 0;
r98.pauseAndClosePip = r98.pauseAndClosePip.bind(r98);
r98.handleVoicePanelStateUpdated = r98.handleVoicePanelStateUpdated.bind(r98);
r98.handleEmbeddedActivitiesUpdated = r98.handleEmbeddedActivitiesUpdated.bind(r98);
r98.handleMediaPlayerPlaybackRateChanged = r98.handleMediaPlayerPlaybackRateChanged.bind(r98);
r98.handleMediaPlayerPlaybackSourceChanged = r98.handleMediaPlayerPlaybackSourceChanged.bind(r98);
r98.handleMediaPlayerViewWillAppear = r98.handleMediaPlayerViewWillAppear.bind(r98);
r98.handleMediaPlayerViewDidDisappear = r98.handleMediaPlayerViewDidDisappear.bind(r98);
r98.updateDisplayState = r98.updateDisplayState.bind(r98);
r98.updateMediaPermissions = r98.updateMediaPermissions.bind(r98);
export default r98;
export { c9437_17 as useMediaPlayerManagerStore };
export function isPlaybackComplete(a0) {
if (a0.duration <= 0) {
return void 0;
}
return a0.duration - a0.time <= PLAYBACK_COMPLETION_DETECTION_TOLERANCE;
}