mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
- Add basic video room based on demo. - Set port range to use for RTP. - coturn: Add component for time-limited TURN configuration. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> [sunil: Don't error out when coturn is not installed/configured] [sunil: Prepend data- to custom attribute in HTML] [sunil: Convert SVG with embedded bitmap to vector graphics] [sunil: Hide Javascript license information in footer] [sunil: Minor changes to comments for styling] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
21 lines
619 B
Python
21 lines
619 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
Views for the Janus app.
|
|
"""
|
|
|
|
from django.views.generic import TemplateView
|
|
|
|
from plinth.modules import janus
|
|
|
|
|
|
class JanusRoomView(TemplateView):
|
|
"""A simple page to host Janus video room."""
|
|
template_name = 'janus_video_room.html'
|
|
|
|
def get_context_data(self, *args, **kwargs):
|
|
"""Add user's TURN server information to view context."""
|
|
config = janus.app.get_component('turn-janus').get_configuration()
|
|
context = super().get_context_data(*args, **kwargs)
|
|
context['user_turn_config'] = config.to_json()
|
|
return context
|