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

Restore playback state when reopening player #877

Merged
merged 1 commit into from
Sep 3, 2016
Merged

Restore playback state when reopening player #877

merged 1 commit into from
Sep 3, 2016

Conversation

Goldob
Copy link
Contributor

@Goldob Goldob commented Sep 2, 2016

This is a follow up for PR #871.

The intended behavior was that when opening player, playing some files and then navigating backward/forward in the app, the playback state is restored. In one particular case, when we open a specific file instead of a torrent and then do the above, the playback starts again at the same file it started at instead.

This PR fixes that.

@@ -34,12 +34,20 @@ module.exports = class PlaybackController {
else this.play()
})
} else {
let initialized = false
Copy link
Contributor

Choose a reason for hiding this comment

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

I had an idea to set torrentSummary.mostRecentFileIndex instead of using the initialized variable and remove the index param from openPlayer, but I don't think it's the best solution after all.

@mathiasvr
Copy link
Contributor

LGTM and tested 👍

@dcposch Can we include this in #885?

@dcposch dcposch merged commit 11f8e42 into webtorrent:master Sep 3, 2016
@dcposch
Copy link
Contributor

dcposch commented Sep 3, 2016

@mathiasvr yeah ill rebase #885

@Goldob Goldob deleted the fix/restore-playback branch September 4, 2016 07:11
@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants