Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No expectations that this should be merged as is, but wanted to open the pull request for better visibility and to have somewhere to discuss.
Basically by running a command like
ffmpeg -f v4l2 -i /dev/video0 -vf "scale=640:480" -hls_time 2 -hls_list_size 5 -hls_flags delete_segments webcam.m3u8
on the pi in the /var/www/pioreactorui/data folder, video snippets are saved from a webcam into this folder and refreshed over time. This addition adds a new tab to the UI that can display two of these streams using the hls js library. There may be a better way of doing this but the nice thing about this method is it doesn't require any additional ports, streaming etc. so all the current methods through tailscale etc. should just work.Some future improvements:
Current status:
![pioreactor_webcams](https://private-user-images.githubusercontent.com/39567418/395104584-e290215c-6fce-4cd6-8662-1d520a3911e5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzI2MTgsIm5iZiI6MTczOTQzMjMxOCwicGF0aCI6Ii8zOTU2NzQxOC8zOTUxMDQ1ODQtZTI5MDIxNWMtNmZjZS00Y2Q2LTg2NjItMWQ1MjBhMzkxMWU1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDA3MzgzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzNTZhNTA4ZGMzZTVjMzc4ZDczMzNkOWIyN2I4NDdkMTQ0NjY2MjdiNzJjNTVhNzZiZGI0YzQzYjM1M2U2OWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GnIv4B3JQZdNsszTdbOWbLM1WzBnGpGXgGFyO4-i4T8)