Disclaimer - I'm inexperienced in webdev, so please excuse lack of knowledge or incorrect terminology.
Context:
I'm working on getting a live IP camera feed from an Axis camera onto an Ignition Perspective Video Player. I'm following Axis documentation for media stream over HTTP. I got a live feed working with the correct camera view by passing a static address as the source of the video feed:
The only problem with this is that it seems passing a static, single instance of the username and password causes the authorization to time out, and sometime several hours later the feed drops. As soon as I refresh the project, the feed starts fresh. I can (and have) used Python to script a periodic reset of the project, but it's clunky to have the whole thing reload unnecessarily just to reinitialize the feed.
Where I'm stuck now:
The video player has the ability to accept HTTP bindings with headers/body and Digest authorization (which the Axis documentation tells me is what's necessary). The problem is that no matter what I've read on forums and documentation, I haven't been able to figure out how to format what I'm putting into the binding. I don't understand the function of headers vs body and every combination of values that I've tried thus far returns a 401 error (not authorized).
If you were attempting this, where/how would you enter the username/password? Would you use headers/body, and if so, which ones?
Thank you in advance for whatever help you can lend. I've been digging for days and read most of the content in forum posts already.
It also bears mentioning that if I copy/paste the working static URL into the HTTP binding, that it doesn't work. I've only had it work by entering the text rather than binding.
Whether video or audio or IFrames, such components need the URL supplied as a string, not a binding, because they make the connection they need on their own, from the browser side. For such purposes, Ignition simply does not support digest authentication. Sorry.
You will need to transcode/proxy through another server. Perhaps the gateway itself, via my Image Streamer module (but beware of the CPU load that generates):
Out of curiosity, do you know if refreshBinding() might work to re-initialize the feed even if the source component is a static string not a binding? Otherwise, I'm stuck sending a scheduled/periodic refresh to the whole session which works but is a bit clunky for my needs.
As in have a hidden iframe just to load/re-initialize the authentication periodically? There's gotta be a better way...
I don't know if it makes a difference, but I forgot to mention the camera view is on a carousel component. Maybe there's something I can do in the config on the carousel that would make the feed reload periodically?
Consider using a binding that delivers the string conditionally. Like, one second once per hour, make the string empty, then back to the proper string. That should briefly halt the stream, then start it over. (There might be something better in the component to pause/resume.)