> ## Documentation Index
> Fetch the complete documentation index at: https://guide.tipx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Withdrawing & Mug Betting

> Learn what mug betting is, why it's essential, and how to do it.

export const B2Video = ({fileKey, autoPlay = false, muted = false, loop = false, controls = true, aspectRatio = "16 / 9"}) => {
  const [videoUrl, setVideoUrl] = useState(null);
  const [error, setError] = useState(null);
  const parseAspectRatio = value => {
    if (typeof value === "number" && Number.isFinite(value) && value > 0) {
      return {
        width: value,
        height: 1
      };
    }
    if (typeof value === "string") {
      const trimmed = value.trim();
      if (trimmed.includes("/")) {
        const [rawWidth, rawHeight] = trimmed.split("/").map(part => Number(part.trim()));
        if (Number.isFinite(rawWidth) && Number.isFinite(rawHeight) && rawWidth > 0 && rawHeight > 0) {
          return {
            width: rawWidth,
            height: rawHeight
          };
        }
      }
      const numericRatio = Number(trimmed);
      if (Number.isFinite(numericRatio) && numericRatio > 0) {
        return {
          width: numericRatio,
          height: 1
        };
      }
    }
    return {
      width: 16,
      height: 9
    };
  };
  const containerStyle = {
    position: "relative",
    width: "100%",
    borderRadius: "12px",
    overflow: "hidden"
  };
  const overlayStyle = {
    position: "absolute",
    inset: 0,
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    color: "currentColor",
    fontSize: "0.95rem",
    padding: "1rem",
    textAlign: "center"
  };
  const videoStyle = {
    position: "absolute",
    inset: 0,
    width: "100%",
    height: "100%",
    display: "block",
    objectFit: "cover"
  };
  const {width, height} = parseAspectRatio(aspectRatio);
  const paddingTop = `${height / width * 100}%`;
  const videoWidth = Math.round(width);
  const videoHeight = Math.round(height);
  useEffect(() => {
    let isMounted = true;
    setError(null);
    setVideoUrl(null);
    const fetchUrl = async () => {
      try {
        const res = await fetch(`https://api.tipx.ai/api/videos/url?key=${encodeURIComponent(fileKey)}`);
        if (!res.ok) throw new Error(`Failed to load video (${res.status})`);
        const data = await res.json();
        if (!isMounted) return;
        setVideoUrl(data.url);
      } catch (err) {
        console.error("B2Video error:", err);
        if (!isMounted) return;
        setError(err.message);
      }
    };
    fetchUrl();
    return () => {
      isMounted = false;
    };
  }, [fileKey]);
  const statusText = error ? "Unable to load video right now." : !videoUrl ? "Loading video..." : null;
  return <div style={containerStyle}>
      <div aria-hidden style={{
    paddingTop
  }} />

      {statusText && <div style={overlayStyle}>{statusText}</div>}

      {videoUrl && !error && <video controls={controls} autoPlay={autoPlay} muted={muted} loop={loop} playsInline preload="metadata" width={videoWidth} height={videoHeight} src={videoUrl} onError={() => setError("Failed to load video")} style={videoStyle} />}
    </div>;
};

<Frame>
  <div style={{ width: "100%", maxWidth: "1024px", margin: "0 auto" }}>
    <B2Video fileKey="two_way_mug.mp4" autoPlay loop aspectRatio="1658 / 1080" />
  </div>
</Frame>

## What is Mug Betting?

Mug betting is placing a normal-looking bet that a regular punter would place. You're not trying to profit from it — it's how you get your deposited money back out of the bookmaker.

## Why Can't I Just Withdraw?

Most bookmakers have a **turnover requirement** on deposits. This means you need to bet through your deposited amount at least once before you can withdraw it. If you deposit \$50 and try to withdraw it straight away without placing any bets, the bookmaker will block the withdrawal.

A mug bet solves this. You place a simple, low-risk bet to meet the turnover requirement, and then you're free to withdraw your deposit.

## How To Mug Bet

1. **Use the mug bet finder bot** in Discord to find the best mug bet — it will show you the optimal bet and the hedge
2. **Place both bets** — one on the bookmaker you need to turn over, and the hedge on the opposing outcome at another bookmaker
3. **Once the bets settle**, withdraw your balance

By placing both sides, you cover yourself regardless of the outcome and lose very little (or nothing) in the process. The video above walks through the whole thing step by step.

It's also good practice long-term for keeping your accounts healthy, but for now just focus on using it to get your deposit back out.
