Church_AutoStream/README.md

36 lines
1.8 KiB
Markdown
Raw Normal View History

2022-06-01 20:29:46 +00:00
# Church Autostream
The goal of this project is to fully automatically stream a church service without any user input required. This is for people who do not understand how a computer works but still want to join the service.
See https://wiki.herreweb.nl/e/en/Projects/Church_AutoStream for an extended overview of the project.
### Basic setup overview
Each person who wants a setup at our church will receive a prepared RPI4, which will be used to automatically run this script on startup.
### Requirements
Any computer that can run a recent browser and python3. I highly recommend a Linux OS and even better a RPI.
## Adding streaming service
Both Youtube and Kerkdienstgemist are provided as streaming service in this auto streamer. However, if you want to implement your own streamer for a different streaming service you can do that by adding a file to **streaming** with code for the streaming service. You will need to create class that inherits the <span style="color:green">StreamService</span> class in **streaming/base_stream.py** and add the following functions:
```
class NewStreamingService:
def __init__(self, churchid) -> None:
pass
def livestream_url(self):
#Code to get livestream url
def post_load_actions(self, driver):
# Actions to do after loading the page. Like clicking on the video to start playing.
```
Next you will need to tell the streamer to use this service when specified in the config. Edit **streamer.py** and add the line according to your service
```
elif self.streaming_method == "yourservice":
self.stream_service = NewStreamingService(churchid)
```
You will also need to specify this service your **config** file.
## Todo
* Add fallback option for the streamer. For example: If youtube does not work, fall back to KDG