diff --git a/web/b3desk/models/bbb.py b/web/b3desk/models/bbb.py index eb74f8d..60b0397 100644 --- a/web/b3desk/models/bbb.py +++ b/web/b3desk/models/bbb.py @@ -275,9 +275,26 @@ def get_recordings(self): type = format.find("type").text if type in ("presentation", "video"): data["playbacks"][type] = { - "url": format.find("url").text, + "url": (media_url := format.find("url").text), "images": images, } + if type == "video": + try: + resp = requests.get( + direct_link := media_url + "video-0.m4v" + ) + if resp.status_code == 200: + data["playbacks"][type]["direct_link"] = ( + direct_link + ) + except ( + requests.exceptions.HTTPError, + requests.exceptions.ConnectionError, + ): + current_app.logger.warning( + "No direct recording link for meeting %s", + self.meeting.meetingID, + ) result.append(data) except Exception as exception: current_app.logger.error(exception) diff --git a/web/b3desk/settings.py b/web/b3desk/settings.py index b584877..facb0c0 100644 --- a/web/b3desk/settings.py +++ b/web/b3desk/settings.py @@ -1051,3 +1051,20 @@ def get_email_whitelist( ENABLE_LASUITENUMERIQUE: Optional[bool] = False """Enable LaSuite numerique homepage style.""" + + VIDEO_STREAMING_LINKS: Optional[dict[str, str]] = {} + """List of streaming service for video sharing.""" + + @field_validator("VIDEO_STREAMING_LINKS", mode="before") + def get_video_streaming_links( + cls, + video_streaming_links: Optional[dict[str, str]], + info: ValidationInfo, + ) -> dict[str, str]: + if not video_streaming_links: + return {} + + if isinstance(video_streaming_links, str): + return json.loads(video_streaming_links) + + return video_streaming_links diff --git a/web/b3desk/templates/meeting/recordings.html b/web/b3desk/templates/meeting/recordings.html index 9c6a826..3d39114 100644 --- a/web/b3desk/templates/meeting/recordings.html +++ b/web/b3desk/templates/meeting/recordings.html @@ -26,10 +26,12 @@
@@ -151,6 +158,50 @@
+
+
+
{% endfor %}
|