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

Improvements to fast forward and rewind #581

Merged
merged 7 commits into from
Oct 4, 2020

Conversation

MrChip53
Copy link
Contributor

@MrChip53 MrChip53 commented Oct 1, 2020

Changes

  • Break the seek bar into 10 second segments for more precise seeking
  • Add a more "dynamic" fast forward and rewind function

Todo

  • Put seek segments back to 30 seconds for the seek bar.

Issues

Test and see if the FF/Rewind buttons need to increment faster while holding

I believe between this and the player overlay redesign issue #146 could be considered satisfied.
Also I believe issue #18 should be resolved now also.

@MrChip53 MrChip53 marked this pull request as draft October 2, 2020 17:15
@MrChip53 MrChip53 marked this pull request as ready for review October 3, 2020 04:17
@nielsvanvelzen nielsvanvelzen merged commit 26158d8 into jellyfin:master Oct 4, 2020
@MrChip53 MrChip53 deleted the improve-ff-rewind branch October 6, 2020 05:35
@ManuLinares
Copy link

Seeking in not transcoded files works fine but transcoded files don't, (exoplayer)

Below is a "Horrible seeking fix" that seeking works for transcoded files, but when seeking "seek bar" doesn't update until after seeking. I don't understand the logic to make this work, need a smart pill or some help.

--- app/src/main/java/org/jellyfin/androidtv/ui/playback/PlaybackController.java	(revision 234c5319196348fda05e074f0c1ac509b4086236)
+++ app/src/main/java/org/jellyfin/androidtv/ui/playback/PlaybackController.java	(date 1620277671000)
@@ -871,7 +871,16 @@
         public void run() {
             if (!isPlaying()) return; // in case we completed since this was requested
 
+            if ((mPlaybackMethod == PlayMethod.Transcode && ContainerTypes.MKV.equals(mCurrentStreamInfo.getContainer() ))) {
+                seek(currentSkipPos);
+                currentSkipPos = 0;
+
+            }
             startReportLoop();
+
+            if ((mPlaybackMethod == PlayMethod.Transcode && ContainerTypes.MKV.equals(mCurrentStreamInfo.getContainer() ))) {
+                updateProgress = true; // re-enable true progress updates
+            }
         }
     };
 
@@ -912,9 +921,11 @@
             Timber.d("Duration reported as: %s current pos: %s",mVideoManager.getDuration(), mVideoManager.getCurrentPosition());
             if (currentSkipPos > mVideoManager.getDuration()) currentSkipPos = mVideoManager.getDuration() - 1000;
             mFragment.setCurrentTime(currentSkipPos);
-            seek(currentSkipPos);
-            currentSkipPos = 0;
-            updateProgress = true; // re-enable true progress updates
+            if (!(mPlaybackMethod == PlayMethod.Transcode && ContainerTypes.MKV.equals(mCurrentStreamInfo.getContainer() ))) {
+                seek(currentSkipPos);
+                currentSkipPos = 0;
+                updateProgress = true; // re-enable true progress updates
+            }
             mHandler.postDelayed(skipRunnable, 800);
         }
     }

libVLC seeking is shit still...

@nielsvanvelzen
Copy link
Member

Please open an issue or pull request instead of commenting on old (closed) issues/pull requests/commits

@ManuLinares
Copy link

But I would like to revert this specific commit as it introduced fancy contiguous fast-forward in the detriment of "not working, bad logic".

Please open an issue or pull request instead of commenting on old (closed) issues/pull requests/commits

I would never do it if it would impede the software improvement. I only comment on old issues when they are wrongly closed so as other devs don't go into the rabbit hole unnecessarily. I'm sorry, if you still consider I need to open a new issue no problem at all. Also thanks to you and every dev working on this project.

@nielsvanvelzen
Copy link
Member

Yeah we prefer new issues, you can link to the old issues/prs/commits that are relevant but it's easier to discuss in new issues.

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.

3 participants