-
-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration of Owncast with MediaCMS for live streaming #763
base: main
Are you sure you want to change the base?
Conversation
Thanks a lot for the PR! Would it be possible to share a screenshot, or even include a section on the documentation? |
Not sure how to resolve that conflict, but I added documentation as to how to use this. Due to the project this is being used on, I cannot include a screenshot. Hopefully that's enough to explain how it works. Feel free to change as needed to resolve the conflict. |
Hi together, |
OK, have tried to make the same changes as you showed in your 3 commits above but nothing has changed on my site... Do i have to do something more as make the same changes? Many thanks for your help! |
Update: Made it... and i love it: After replicating your changes this was necessary to rebuild the frontend: apt update cd /home/mediacms.io/mediacms/frontend |
Awesome! Glad it's working for you. And now we have a screenshot to work with. |
Attempted fixing merge conflicts |
files/context_processors.py
Outdated
@@ -31,4 +31,6 @@ def stuff(request): | |||
ret["ALLOW_RATINGS_CONFIRMED_EMAIL_ONLY"] = settings.ALLOW_RATINGS_CONFIRMED_EMAIL_ONLY | |||
ret["VIDEO_PLAYER_FEATURED_VIDEO_ON_INDEX_PAGE"] = settings.VIDEO_PLAYER_FEATURED_VIDEO_ON_INDEX_PAGE | |||
ret["RSS_URL"] = "/rss" | |||
ret["LIVESTREAM_BACKEND"] = settings.LIVESTREAM_BACKEND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're not adding a default value on settings, so this will make the process break with
AttributeError: 'Settings' object has no attribute 'LIVESTREAM_BACKEND'
Better wrap this in a try/except to ensure that it does not break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in latest commit
@@ -7,7 +7,8 @@ export function ItemsListHandler( | |||
first_item_request_url, | |||
request_url, | |||
itemsCountCallback, | |||
loadItemsCallback | |||
loadItemsCallback, | |||
translateCallback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what translateCallback
is doing, can you help me explain these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea with this is to keep the frontend as unmodified as possible. The way it does this is by having the OwnCast query's response translated into the same format as the MediaCMS server would normally return for a video item.
I would like to things here before I can merge the PR:
|
thanks for the updates, will try to test it out, and mostly ensure about 2. (Make sure that a new (or existing) installation that is NOT using this feature, does not get affected at all.), thanks! |
I'll note that I'm still running this, and it still works well, even with newer versions of Owncast (0.1.2). |
Description
Integration of Owncast with MediaCMS. After running this now for several months, there's more I'd like to add but I feel it's stable enough for primetime.
Setup for this is really simple. This operates using two new settings which can be added to
local_settings.py
:LIVESTREAM_BACKEND
-> Set to "owncast" to enable the live stream functionality. This leaves open the possibility (which I intend to use in the future) of tying into alternative live streaming platforms.LIVESTREAM_URI
-> Set to the base address of your Owncast installation, e.g. "https://live.example.com/"When enabled, it adds an item to the left nav bar called "Live", and if it's able to successfully connect to Owncast and query its status, it will change to "Live (Offline)" or "Live (Online)" depending on the very resource-minimal Owncast status API, which then gets queried once per minute from the client end so people can watch right away when a stream goes live. If the stream is live when the homepage is loaded, it also shows the live stream at the top with a thumbnail and count of current viewers, again using the information queried from Owncast.
Eventually I'd love to have the left nav bar item open in a new window. But that's really about the only thing I'm not 100% satisfied with about the way this has been working for me.
Steps
Pre-deploy
Post-deploy