import React from 'react'

export default function StreamPlayer({ refreshKey }) {
  // Force MJPEG re-connect when refreshKey changes (camera switch)
  return (
    <img
      key={refreshKey}
      src={`/stream.mjpg?k=${refreshKey}`}
      alt="live stream"
      className="max-w-full max-h-full object-contain rounded border border-line"
    />
  )
}
