yuppity / unifi-video-api

Python API for UniFi Video
MIT License
59 stars 11 forks source link

Snapshot can take a width argument #6

Closed Diaoul closed 4 years ago

Diaoul commented 4 years ago

From inspecting my browser requests I can see that there is a width argument that can be passed to snapshot to get a smaller image. This is used to get a thumbnail when previewing a camera in Unifi Video with width=182 being added to the query.

Can you make this available?

yuppity commented 4 years ago

This is temporarily on a separate branch (34df30afe6568389d8db0eb2fd38484fe9d92427) in case you or anyone else can test it. Otherwise it'll have to wait till the spotty GPRS connection my remote UniFi Video server relies on comes back online :)

I mostly just want to verify that UniFi Video does in fact accept arbitrary values (width=182 is hardcoded in the frontend JS) and that nothing odd happens if you give it a value that is greater than the camera's native resolution.