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

Resume videos for non-logged in users #3885

Merged
merged 4 commits into from
Mar 31, 2021

Conversation

kontrollanten
Copy link
Contributor

Description

Stores the current video duration in local storage for non-logged in users so that they can go back to a video and continue where they ended.

Upon app init a check is done to cleanup old durations.

Related issues

closes #3866

Has this been tested?

  • 👍 yes, light tests as follows are enough

Resume

  1. Logout.
  2. Watch a video for a few seconds.
  3. Reload the page.

Cleanup

  1. Edit the local storage and change the date in peertube-videojs-video-watch to a date more than 31 days back.
  2. Reload the page.
  3. See that the duration has been cleared.

client/src/assets/player/peertube-player-local-storage.ts Outdated Show resolved Hide resolved
client/src/assets/player/peertube-player-local-storage.ts Outdated Show resolved Hide resolved
client/src/assets/player/peertube-player-local-storage.ts Outdated Show resolved Hide resolved
client/src/assets/player/peertube-player-local-storage.ts Outdated Show resolved Hide resolved
client/src/assets/player/peertube-player-local-storage.ts Outdated Show resolved Hide resolved
client/src/app/app.component.ts Outdated Show resolved Hide resolved
client/src/assets/player/peertube-player-local-storage.ts Outdated Show resolved Hide resolved
client/src/assets/player/peertube-plugin.ts Outdated Show resolved Hide resolved
@Chocobozzz
Copy link
Owner

Thanks

@Chocobozzz Chocobozzz merged commit 58b9ce3 into Chocobozzz:develop Mar 31, 2021
@kontrollanten kontrollanten deleted the feat-3866-resume-video branch March 31, 2021 09:39
kontrollanten added a commit to kontrollanten/PeerTube that referenced this pull request Apr 9, 2021
* client: resume videos for non-logged in users

closes Chocobozzz#3866

* fix build for embeded

* Update client/src/app/app.component.ts

* fix review comments
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.

Resume video for non-logged in users
2 participants