Skip to content

Conversation

@BugsSindFeatures
Copy link
Contributor

Description

The Problem was that the video is rendered before the source of the video changed and the change of the video source didn't lead to a re-render of the video.

Changed key attribute of the video from "activelecture.id" to "videoSRC", so the video is re-rendered every time the video source changes.

In addition, the time span when a new video source is created was extended from 40 Seconds to 4000 Seconds so the Video is not re rendered every 40 Seconds.

I don't know if this will cause problems with the API because I don't know when the video source links expire.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Translation updates (fix/improve or add new translations)

Fixes Bootstrap-Academy/Bootstrap-Academy#117

My Bootstrap Academy username: R4bbit

Copy link
Contributor

@Lauritz-Tieste Lauritz-Tieste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working fine.

@Chel-Jessen
Copy link
Member

Chel-Jessen commented Oct 28, 2024

The current setting for stream_token_ttl is 8 hours.
I assume you use the "/courses/{course_id}/lectures/{lecture_id}" route get_mp4_lecture_link.

time span when a new video source is created reduced to match the current setting for stream_token_ttl 

(4000 Seconds -> 28800 Seconds / 8 hours )
Copy link
Member

@Defelo Defelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BugsSindFeatures Thanks for the PR! One thing to note is that setInterval expects its timeout argument to be specified in milliseconds, so you just changed it to about 28 seconds, not 8 hours. However the real problem here is that switching to the new stream token no longer seems to work. After about 28 seconds after starting the video (e.g. here) the video just stops and resets, so this definititely needs to be fixed before this PR can be merged.

@BugsSindFeatures
Copy link
Contributor Author

BugsSindFeatures commented Oct 28, 2024

Thanks for the response! I corrected the argument from seconds to milliseconds. The described problem can be solved by Merging the pull request #289 because then the time will be automatically restored and to fix the problem that the Video stops if the source changed I added some code to prevent that.

@github-actions
Copy link

Preview deployed to https://053854a8.academy-preview.pages.dev (total size: 14M)

@Defelo Defelo merged commit 180a484 into Bootstrap-Academy:develop Oct 30, 2024
2 checks passed
@TheMorpheus407
Copy link
Contributor

@BugsSindFeatures Du darfst mir sehr gerne auch die Rechnung per Mail stellen - alle Infos dazu hier

Danke fürs mitmachen! Und ich hoffe, du hattest Spaß und machst weiterhin mit :)

@BugsSindFeatures BugsSindFeatures deleted the sorting_selfhosted_videos branch October 30, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sorting of self hosted courses

5 participants