Skip to content
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

Skip initial silence #1262

Merged
merged 12 commits into from
Jan 19, 2024
Merged

Conversation

Mjaethers
Copy link
Contributor

@Mjaethers Mjaethers commented Dec 10, 2023

Motivation and Context

Closes #1188
Instead of opening a VOD, waiting for it to load, clicking skip, and waiting for it to load again there should be a user setting which allows the player to immediately skip past the first period of silence.

Description

A new user setting to allow automatic skipping was added, this can be modified in the users settings page.
When this setting is enabled, the watch page sets the progress of the stream VOD to the maximum of the watch progress in the database and the end of the first period of silence.

This only happens if the stream is not a self-stream (lecture_hall_id != 0). This is because the progress is converted into a timestamp using the JS videoplayer duration, not the duration calculated by subtracting the stream end from stream beginning. I think it's safe to assume these two duration values will be the same when it is not a self-stream, as the recording just runs on in those cases.

Steps for Testing

Prerequisites:

  • An instance of the new starter database (in the docs)
  1. Navigate to the "Einführung Brauereiwesen" course
  2. Select one of the VODs
  3. Notice it will start at the beginning and blend in the skip ahead button
  4. Navigate to the user settings
  5. Enable "Automatically Skip First Silence"
  6. Return to the "Einführung Brauereiwesen" Course
  7. Select one of the VODs
  8. Notice it will no longer start at the beginning, but where the skip ahead button would have taken you

Screenshots

Screenshot_Skip_Silence_Setting

@Mjaethers Mjaethers closed this Dec 18, 2023
@Mjaethers Mjaethers reopened this Dec 18, 2023
@SebiWrn SebiWrn marked this pull request as ready for review January 11, 2024 14:57
@Mjaethers Mjaethers marked this pull request as draft January 14, 2024 14:43
@Mjaethers Mjaethers marked this pull request as ready for review January 14, 2024 21:02
Copy link
Contributor

@YiranDuan721 YiranDuan721 left a comment

Choose a reason for hiding this comment

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

Works smoothly!

@YiranDuan721
Copy link
Contributor

Before merging it to dev, I would like to make sure: we do rebuild the database container using "/docs/static/tum-live-starter.sql" for each deployment, right?

@Mjaethers
Copy link
Contributor Author

I'm afraid I don't quite follow.
My understanding of the file is that it is used to create a local docker container, as outlined in the docs and that it has no impact on the database used in deployment. As far as I know this is just for testing during development.
The container would only be rebuilt if one were to manually rebuild it then.

But we can always get someone who is more familiar with the system in here if need be.

@Mjaethers
Copy link
Contributor Author

I thought it would make sense to commit these changes as well for future testing in this area, but we can also exclude this file if it's cluttering the db.

@YiranDuan721
Copy link
Contributor

YiranDuan721 commented Jan 18, 2024

Yes, I think changes to the sql file should be pushed anyway, but they need to be handled more carefully when deployed. I'd like to hear from someone more familiar with the project on this issue.

@Mjaethers
Copy link
Contributor Author

@alexanderstephan or @joschahenningsen what are your thoughts on the matter?

Copy link
Sponsor Member

@joschahenningsen joschahenningsen left a comment

Choose a reason for hiding this comment

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

tum-live-starter.sql Is just for local testing and can be modified without worries :)

web/watch.go Outdated Show resolved Hide resolved
web/watch.go Outdated Show resolved Hide resolved
Mjaethers and others added 2 commits January 19, 2024 11:26
Co-authored-by: Joscha Henningsen <[email protected]>
Co-authored-by: Joscha Henningsen <[email protected]>
Copy link
Sponsor Member

@joschahenningsen joschahenningsen left a comment

Choose a reason for hiding this comment

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

🍻

@Mjaethers Mjaethers merged commit a0d815f into TUM-Dev:dev Jan 19, 2024
7 of 8 checks passed
SebiWrn pushed a commit that referenced this pull request May 7, 2024
* added api endpoints for user setting

* fixed API endpoints

* watchPageData sets progress to end of first silence when user setting is set

* GetAutoSkipEnabled wraps result in json

* added front-end component

* added error handling when getting user setting

* make sure stream is not selfstream before skipping silence

* imported logger

* gofumpt everything

* updated db starter for better testing

* use correct logger

Co-authored-by: Joscha Henningsen <[email protected]>

* use correct logger

Co-authored-by: Joscha Henningsen <[email protected]>

---------

Co-authored-by: Joscha Henningsen <[email protected]>
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.

Setting to automatically "Skip" after opening stream
3 participants