As info, many ESP32CAM firmwares are limited by being able to stream to a single client only. i.e. If you are testing and watching the stream in your browser, then other clients connecting to the camera will possibly be unable to get the stream. Just throwing it out there, in case this limitation might be affecting you.
Then the issue is confirmed - it's a browser security feature that blocks accessing local IP addresses from what it perceives as 'public' sites. It can't tell if octopi.local is private or public. You can only access the camera with a local IP if OctoPrint is accessed from a local IP. Hope that's clear enough...