OverviewFilesCommitsIssuesDocsReleasesPeers

keet-deobfuscated / @holepunchto / keet-media / shared / constants.js

33 lines · javascript ref:
const e = "image/webp",
  E = 524288
export const CHAT_MESSAGE_MAX_FRAMES = 200
export const CHAT_MESSAGE_PREVIEW = {
  small: {
    resize: { maxWidth: 32, maxHeight: 32 },
    encode: { mimetype: e, maxBytes: E },
    base64: !0,
  },
  medium: {
    resize: { maxWidth: 640, maxHeight: 640 },
    encode: { mimetype: e, maxBytes: E },
    base64: !0,
  },
  large: { resize: { maxWidth: 2560, maxHeight: 2560 }, encode: { mimetype: e } },
}
export const CHAT_LINK_PREVIEW = {
  resize: { maxWidth: 640, maxHeight: 640 },
  encode: { mimetype: e, maxBytes: E },
}
const m = {
  small: { resize: { maxWidth: 165, maxHeight: 165 }, encode: { mimetype: e, maxBytes: E } },
  medium: { resize: { maxWidth: 288, maxHeight: 288 }, encode: { mimetype: e, maxBytes: E } },
}
export const PROFILE_AVATAR = m
export const ROOM_AVATAR = m
export const CHAT_MESSAGE_PREVIEW_SIZE = { LARGE: "large", MEDIUM: "medium", SMALL: "small" }
export const CHAT_MESSAGE_PREVIEW_DEFAULT_SIZES = [
  CHAT_MESSAGE_PREVIEW_SIZE.LARGE,
  CHAT_MESSAGE_PREVIEW_SIZE.MEDIUM,
  CHAT_MESSAGE_PREVIEW_SIZE.SMALL,
]