Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
11cb890
update: docker-compose-dev-updated.yml with correct paths
Yiannistaos Apr 13, 2025
98a4e14
feat: Load the video without page reload after clicking a timestamp
Yiannistaos Apr 13, 2025
7eaaa7e
fix: close popups on outside click (search, user menu, download)
Yiannistaos Apr 13, 2025
c024552
feat: Add a bash script to easily build the static assets
Yiannistaos Apr 13, 2025
d70d9c5
feat: Add video chapters support with active state tracking
Yiannistaos Apr 13, 2025
7060831
feat: Add video-editor a vite/react external app
Yiannistaos Apr 14, 2025
db5d0b9
feat: deploy video-editor in static assets
Yiannistaos Apr 14, 2025
cb14a46
feat: Prepare edit_media for Video Editor (trim and chapters)
Yiannistaos Apr 14, 2025
eb36781
feat: Update video-editor Readme file
Yiannistaos Apr 14, 2025
cc0ed16
fix: Bug fixes and Minor improvements on Video Editor
Yiannistaos Apr 14, 2025
53c4991
chore: Remove predefinedRanges, and add chapters support in edit_media
Yiannistaos Apr 14, 2025
560d49e
fix: The preview buttons in chapters' are now working properly
Yiannistaos Apr 14, 2025
85be637
chore: Build video editor react app
Yiannistaos Apr 14, 2025
33864f9
chore: build static files
Yiannistaos Apr 14, 2025
b590554
chore: create the static assets
Yiannistaos Apr 14, 2025
45e66bb
Update .gitignore
Yiannistaos Apr 15, 2025
2043255
Remove static collected files
Yiannistaos Apr 15, 2025
8c8fd4b
Update .gitignore
Yiannistaos Apr 15, 2025
05b861a
feat: add edit media options (#1254)
mgogoulos Apr 15, 2025
8c1b4cb
chore: Remove unnecessary comments
Yiannistaos Apr 15, 2025
dc451e6
feat: Split the Chapters/Trim views in python
Yiannistaos Apr 15, 2025
916f7fe
feat: media.media_file.path is needed at the frontend
Yiannistaos Apr 15, 2025
de71091
chore: Remove unnecessary comments
Yiannistaos Apr 15, 2025
55e6b0d
feat: Separate chapters and video trimming elements
Yiannistaos Apr 15, 2025
4dac485
chore: Remove the not-found component from react
Yiannistaos Apr 16, 2025
7c5dbb0
feat: Create the functionality to submit the Chapters in react
Yiannistaos Apr 16, 2025
07cb875
style: Improve some styling in video editor by removing the Card comp…
Yiannistaos Apr 16, 2025
62b3f0e
chore: The media.friendly_token is needed at frontend (edit_video and…
Yiannistaos Apr 16, 2025
89f20c9
feat: Modify edit chapters/video python html pages to get the correct…
Yiannistaos Apr 16, 2025
bee4e42
chore: Add static assets after build
Yiannistaos Apr 16, 2025
045e6d9
feat: New MediaCMS Video Editor
Yiannistaos Apr 26, 2025
bacce06
Update build_and_deploy.sh
Yiannistaos Apr 26, 2025
3971222
fix: Move the video-editor.js above in edit_video (django)
Yiannistaos Apr 26, 2025
99b695e
Update .gitignore
Yiannistaos Apr 26, 2025
b2fc772
Create .prettierignore
Yiannistaos Apr 26, 2025
5f6ffcb
fix: The styling in modals
Yiannistaos Apr 26, 2025
b8b495f
chore: Set the correct outDir path
Yiannistaos Apr 26, 2025
21401b0
chore: Build assets (video_editor)
Yiannistaos Apr 26, 2025
af36c64
chore: fix margin in timeline controls
Yiannistaos Apr 26, 2025
af63f28
Update video-editor.css
Yiannistaos Apr 26, 2025
e7e783c
edit media url, hide chapters, increase form titles
mgogoulos Apr 27, 2025
fa04291
edit media url, hide chapters, increase form titles
mgogoulos Apr 27, 2025
148438e
admin menu
mgogoulos Apr 27, 2025
7bd0f06
admin optimizations
mgogoulos Apr 27, 2025
ff14815
admin
mgogoulos Apr 27, 2025
79eb88f
rounded cornerns
mgogoulos Apr 27, 2025
b52f02e
docs
mgogoulos Apr 27, 2025
f671112
chore: Temporarily remove the Chapters View
Yiannistaos Apr 27, 2025
d9c6bfc
fix: Improve segment creation logic to prevent overlap and handle edg…
Yiannistaos Apr 27, 2025
7fb5d71
chore: Adjust the final modal to only show the view processed video b…
Yiannistaos Apr 27, 2025
e029cdb
docs: Update instructions to reflect current build and deployment con…
Yiannistaos Apr 27, 2025
62ecd87
chore: Upload assets after build
Yiannistaos Apr 27, 2025
e14bdaf
refactor: Add confirmation field for RBAC content state changes
mgogoulos Apr 28, 2025
db0170a
refactor: Simplify confirm state validation for RBAC category media
mgogoulos Apr 28, 2025
ff5cc40
refactor: Improve MediaPublishForm with minor code cleanup and TODO note
mgogoulos Apr 28, 2025
6398b59
refactor: Remove confirm_state field from MediaPublishForm layout
mgogoulos Apr 28, 2025
78b6ec8
feat: Add dynamic confirm_state field to form layout for RBAC categories
mgogoulos Apr 28, 2025
d807b4d
refactor: Simplify RBAC category state confirmation logic in MediaPub…
mgogoulos Apr 28, 2025
1a9f340
refactor: Insert confirm_state field before submit button in layout
mgogoulos Apr 28, 2025
6c0caf0
refactor: Update MediaPublishForm validation for RBAC category sharin…
mgogoulos Apr 28, 2025
9415365
refactor: Modify confirm_state field placement to appear after state …
mgogoulos Apr 28, 2025
9b0b9bd
text
mgogoulos Apr 28, 2025
c585d21
typo
mgogoulos Apr 28, 2025
acfc423
chore: media_id needed in react app
Yiannistaos Apr 29, 2025
34f0049
feat: Redirect user to the video after video trim
Yiannistaos Apr 29, 2025
81e9bd2
chore: Pass the mediaId to the MEDIA_DATA
Yiannistaos Apr 29, 2025
27949e0
feat: Add new save segments button
Yiannistaos Apr 29, 2025
70b627e
feat: Prepare the real API call /api/v1/media/${mediaId}/trim_video
Yiannistaos Apr 29, 2025
9563407
chore: Get the media_id value in video trim tab (django)
Yiannistaos Apr 29, 2025
651b6b9
chore: Upload assets after build
Yiannistaos Apr 29, 2025
0ace1a0
feat: New segment popup, minor improvements and bug fixes
Yiannistaos May 1, 2025
b0722ce
chore: Improve the CSS styling of buttons
Yiannistaos May 1, 2025
495df17
chore: Upload assets after build
Yiannistaos May 1, 2025
5721574
Update TimelineControls.css
Yiannistaos May 1, 2025
a352e97
chore: Upload assets after build
Yiannistaos May 1, 2025
1b2becd
feat: add trim_video view for video editing functionality
mgogoulos May 2, 2025
1a24bfc
feat: Add video trim request handling with task management
mgogoulos May 2, 2025
f57918b
feat: Add VideoTrimRequest model and import to views and tasks
mgogoulos May 2, 2025
6ebbca9
feat: add VideoTrimRequest model for handling video trimming operations
mgogoulos May 2, 2025
6189795
url
mgogoulos May 2, 2025
92eb444
video trim request
mgogoulos May 2, 2025
6cbce40
feat: Popup menu behavior, playback controls, and UI improvements
Yiannistaos May 5, 2025
1e7df45
fix: Set the min width of timeline buttons
Yiannistaos May 5, 2025
5ee2497
feat: Improve playback behavior, UI consistency, and mobile interactions
Yiannistaos May 12, 2025
365b0fe
chore: Upload assets after build
Yiannistaos May 12, 2025
c2eb782
feat: Add get_trim_timestamps function to process video timestamps wi…
mgogoulos May 2, 2025
58558ca
refactor: optimize get_trim_timestamps function with improved input v…
mgogoulos May 2, 2025
21861a5
refactor: extract timestamp conversion to separate function
mgogoulos May 2, 2025
d90d367
helpers
mgogoulos May 13, 2025
5a1a0af
refactor: restrict media state options in MediaPublishForm
mgogoulos May 13, 2025
fa6c9a7
feat: add support for creating video segments from chapters
mgogoulos May 13, 2025
b616d16
refactor: update media publish form state filtering and segment creat…
mgogoulos May 13, 2025
c080a86
refactor: Update MediaPublishForm state choices based on PORTAL_WORKF…
mgogoulos May 13, 2025
11d6365
fix: import helpers module to resolve undefined name errors
mgogoulos May 13, 2025
b63209d
fix: update state choices in MediaPublishForm to use valid states dir…
mgogoulos May 13, 2025
b080efc
refactor: prevent duplicate states in MediaPublishForm valid_states
mgogoulos May 13, 2025
604cacb
fix: add debug print statement for valid states in MediaPublishForm
mgogoulos May 13, 2025
8f12023
fix: convert valid_states to choices tuples in MediaPublishForm
mgogoulos May 13, 2025
3b03c6a
helpers
mgogoulos May 13, 2025
52d0ef2
ref
mgogoulos May 13, 2025
bed32e9
ref
mgogoulos May 13, 2025
4403b88
wtv
mgogoulos May 13, 2025
67f3e28
wtv
mgogoulos May 13, 2025
2b86006
ref
mgogoulos May 13, 2025
5d3cbd9
p
mgogoulos May 13, 2025
66378dc
ref
mgogoulos May 14, 2025
6303baa
neg
mgogoulos May 14, 2025
b3ca854
ref
mgogoulos May 14, 2025
babbb32
ref
mgogoulos May 14, 2025
606ecff
ref
mgogoulos May 14, 2025
7877e82
ref
mgogoulos May 14, 2025
0f8d7e0
issue: 55#issuecomment-2881952183
Yiannistaos May 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ static/drf-yasg
cms/local_settings.py
deploy/docker/local_settings.py
yt.readme.md
/frontend-tools/video-editor/node_modules
/frontend-tools/video-editor/client/node_modules
/static_collected
/frontend-tools/video-editor-v1
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
USE_IDENTITY_PROVIDERS = False
JAZZMIN_UI_TWEAKS = {"theme": "flatly"}

USE_ROUNDED_CORNERS = True

try:
# keep a local_settings.py file for local overrides
Expand Down
26 changes: 26 additions & 0 deletions deploy/scripts/build_and_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Exit on any error
set -e

echo "Starting build process..."

# Build video editor package
echo "Building video editor package..."
cd frontend-tools/video-editor
yarn build:django
cd ../../

# Run npm build in the frontend container
echo "Building frontend assets..."
docker compose -f docker-compose/docker-compose-dev-updated.yaml exec frontend npm run dist

# Copy static assets to the static directory
echo "Copying static assets..."
cp -r frontend/dist/static/* static/

# Restart the web service
echo "Restarting web service..."
docker compose -f docker-compose/docker-compose-dev-updated.yaml restart web

echo "Build and deployment completed successfully!"
15 changes: 8 additions & 7 deletions docker-compose/docker-compose-dev-updated.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: mediacms-dev
services:
migrations:
platform: linux/amd64
build:
context: .
dockerfile: ./Dockerfile
context: ..
dockerfile: Dockerfile
args:
- DEVELOPMENT_MODE=True
image: mediacms/mediacms:latest
volumes:
- ./:/home/mediacms.io/mediacms/
command: "./deploy/docker/prestart.sh"
- ../:/home/mediacms.io/mediacms/
command: "/home/mediacms.io/mediacms/deploy/docker/prestart.sh"
environment:
DEVELOPMENT_MODE: True
ENABLE_UWSGI: 'no'
Expand Down Expand Up @@ -95,13 +96,13 @@ services:
ports:
- "80:80"
volumes:
- ./:/home/mediacms.io/mediacms/
- ../:/home/mediacms.io/mediacms/
depends_on:
- migrations
db:
image: postgres:17.2-alpine
volumes:
- ./postgres_data:/var/lib/postgresql/data/
- ../postgres_data:/var/lib/postgresql/data/
restart: always
environment:
POSTGRES_USER: mediacms
Expand All @@ -127,7 +128,7 @@ services:
deploy:
replicas: 1
volumes:
- ./:/home/mediacms.io/mediacms/
- ../:/home/mediacms.io/mediacms/
environment:
ENABLE_UWSGI: 'no'
ENABLE_NGINX: 'no'
Expand Down
22 changes: 8 additions & 14 deletions docs/admins_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -809,14 +809,8 @@ This will disable the transcoding process and only the original file will be sho

## 19. Rounded corners on videos

By default the video player and media items are now having rounded corners, on larger screens (not in mobile). If you don't like this change, remove the `border-radius` added on the following files:
By default the video player and media items are now having rounded corners, on larger screens (not in mobile). If you don't like this change, set `USE_ROUNDED_CORNERS = False` in `local_settings.py`.

```
frontend/src/static/css/_extra.css
frontend/src/static/js/components/list-item/Item.scss
frontend/src/static/js/components/media-page/MediaPage.scss
```
you now have to re-run the frontend build in order to see the changes (check docs/dev_exp.md)


## 20. Translations
Expand Down Expand Up @@ -879,7 +873,7 @@ By default there are 3 statuses for any Media that lives on the system, public,

Now user can view the Media even if it is in private state. User also sees all media in Category page

When user is added to group, they can be set as Member, Contributor, Manager.
When user is added to group, they can be set as Member, Contributor, Manager.

- Member: user can view media that are published on one or more categories that this group is associated with
- Contributor: besides viewing, user can also edit the Media in a category associated with this Group. They can also publish Media to this category
Expand All @@ -891,17 +885,17 @@ Use cases facilitated with RBAC:
- viewing all media of a category: if RBAC is enabled, and user visits a Category, they are able to see the listing of all media that are published in this category, independent of their state, provided that the category is associated with a group that the user is member of
- viewing all categories associated with groups the user is member of: if RBAC is enabled, and user visits the listing of categories, they can view all categories that are associated with a group the user is member

How to enable RBAC support:
How to enable RBAC support:

```
USE_RBAC = True
```

on `local_settings.py` and restart the instance.
on `local_settings.py` and restart the instance.


## 23. SAML setup
SAML authentication is supported along with the option to utilize the SAML response and do useful things as setting up the user role in MediaCMS or participation in groups.
SAML authentication is supported along with the option to utilize the SAML response and do useful things as setting up the user role in MediaCMS or participation in groups.

To enable SAML support, edit local_settings.py and set the following options:

Expand Down Expand Up @@ -942,8 +936,8 @@ Select the SAML Configurations tab, create a new one and set:

1. **IDP ID**: Must be a URL
2. **IDP Certificate**: x509cert from your SAML provider
3. **SSO URL**:
4. **SLO URL**:
3. **SSO URL**:
4. **SLO URL**:
5. **SP Metadata URL**: The metadata URL that the IDP will utilize. This can be https://{portal}/saml/metadata and is autogenerated by MediaCMS

- Step 3: Set other Options
Expand Down Expand Up @@ -971,5 +965,5 @@ to enable the identity providers, set the following setting on `local_settings.p
USE_IDENTITY_PROVIDERS = True
```

Visiting the admin, you will see the Identity Providers tab and you can add one.
Visiting the admin, you will see the Identity Providers tab and you can add one.

5 changes: 5 additions & 0 deletions files/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Encoding,
Language,
Media,
VideoTrimRequest,
Subtitle,
Tag,
)
Expand Down Expand Up @@ -198,6 +199,9 @@ class LanguageAdmin(admin.ModelAdmin):
class SubtitleAdmin(admin.ModelAdmin):
pass

class VideoTrimRequestAdmin(admin.ModelAdmin):
pass


class EncodingAdmin(admin.ModelAdmin):
list_display = ["get_title", "chunk", "profile", "progress", "status", "has_file"]
Expand All @@ -222,5 +226,6 @@ def has_file(self, obj):
admin.site.register(Tag, TagAdmin)
admin.site.register(Subtitle, SubtitleAdmin)
admin.site.register(Language, LanguageAdmin)
admin.site.register(VideoTrimRequest, VideoTrimRequestAdmin)

Media._meta.app_config.verbose_name = "Media"
3 changes: 3 additions & 0 deletions files/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def stuff(request):
ret["TRANSLATION"] = get_translation(request.LANGUAGE_CODE)
ret["REPLACEMENTS"] = get_translation_strings(request.LANGUAGE_CODE)
ret["USE_SAML"] = settings.USE_SAML
ret["USE_RBAC"] = settings.USE_RBAC
ret["USE_ROUNDED_CORNERS"] = settings.USE_ROUNDED_CORNERS

if request.user.is_superuser:
ret["DJANGO_ADMIN_URL"] = settings.DJANGO_ADMIN_URL

Expand Down
Loading
Loading