GNOME Bugzilla – Bug 795395
iOS GstPlay app: Seekbar slider not reacting
Last modified: 2018-05-04 12:23:18 UTC
Currently the slider is being re-framed after layout for some reason. This makes it unusable. Once we remove the frame rectangle assignment, it functions normally.
Trying to send an attachment to Bugzilla failed with timeout for me unfortunately. We have a patch that fixes the issue. We hope it does not have any side-effect. It seems that there was a rendering hack in place for some reason, but we don't see any need for it currently. Posting our patch proposal here: From: Stephan Hesse <tchakabam@gmail.com> Date: Fri, 20 Apr 2018 11:22:37 +0200 Subject: [PATCH] iOS GstPlay: fix seeking slider behavior --- playback/player/ios/GstPlay/VideoViewController.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/playback/player/ios/GstPlay/VideoViewController.m b/playback/player/ios/GstPlay/VideoViewController.m index 079fcde..767426f 100644 --- a/playback/player/ios/GstPlay/VideoViewController.m +++ b/playback/player/ios/GstPlay/VideoViewController.m @@ -74,6 +74,9 @@ - (void)viewDidLoad is_local_media = [uri hasPrefix:@"file://"]; is_playing_desired = NO; + time_slider.value = 0; + time_slider.minimumValue = 0; + time_slider.maximumValue = 0; } - (void)viewDidDisappear:(BOOL)animated @@ -152,7 +155,9 @@ - (void)viewDidLayoutSubviews video_height_constraint.constant = view_height; } - time_slider.frame = CGRectMake(time_slider.frame.origin.x, time_slider.frame.origin.y, toolbar.frame.size.width - time_slider.frame.origin.x - 8, time_slider.frame.size.height); + // Breaks Slider display/usage. FIXME: What was this for initially? + // time_slider.frame = CGRectMake(time_slider.frame.origin.x, time_slider.frame.origin.y, toolbar.frame.size.width - time_slider.frame.origin.x - 8, time_slider.frame.size.height); + } static void video_dimensions_changed (GstPlayer * unused, gint width, gint height, VideoViewController * self) @@ -198,6 +203,7 @@ static void duration_changed (GstPlayer * unused, GstClockTime duration, VideoVi -(void) durationChanged:(NSInteger)duration { + time_slider.minimumValue = 0; time_slider.maximumValue = duration; [self updateTimeWidget]; } -- 2.15.1 (Apple Git-101)
Created attachment 371155 [details] [review] Patch proposed to fix slider usage
Review of attachment 371155 [details] [review]: ::: playback/player/ios/GstPlay/VideoViewController.m @@ +157,3 @@ + // Breaks Slider display/usage. FIXME: What was this for initially? + // time_slider.frame = CGRectMake(time_slider.frame.origin.x, time_slider.frame.origin.y, toolbar.frame.size.width - time_slider.frame.origin.x - 8, time_slider.frame.size.height); Please just remove it if it does not make any sense and breaks things
Created attachment 371667 [details] [review] Various improvements to the ios playback example Here is a patch that adresses various other issues. Read further in commit log for details. All the changes are also done in atomic commits and can be found here: https://github.com/tchakabam/gst-examples/commits/ios-player-improvements Git log -> commit c7a43241a82e4aacbed5e38b42adaa17ff3e3add (HEAD -> ios-player-improvements, tchakabam/ios-player-improvements) Author: Stephan Hesse <tchakabam@gmail.com> Date: Fri May 4 13:36:47 2018 +0200 ios player: add HLS test streams from video-dev (Hls.js org) commit ce1f298e7860a4ebf73cab5712ca921dddaff19d Author: Stephan Hesse <tchakabam@gmail.com> Date: Fri May 4 13:35:48 2018 +0200 ios playback: introduce macro to enable photos/ library Until now the photo library integration is broken (that API was deprecated by Apple) and the iTunes integration is better to have optional to put our test files in the forefront (and have better way to browse large iTunes libs). commit 15c5ba79b8adf50e790f8688d57adbbcbd68c0c9 Author: Stephan Hesse <tchakabam@gmail.com> Date: Fri May 4 11:59:39 2018 +0200 ios playback: Xcode project: Force Dwarf debug symbols (build time speedup) Until now it was using dSYM by default. Each build was taking forever. commit a94c8c22af8115843a8c71803f5e120e8d523994 Author: Stephan Hesse <tchakabam@gmail.com> Date: Fri May 4 11:58:00 2018 +0200 ios playback: initialize slider value (position) at 0 at first Until now the slider was displaying center position before playback was started. commit d1e3e4644f3fbd8aa359db0e7ad1582d87c1c83f Author: Stephan Hesse <tchakabam@gmail.com> Date: Fri May 4 11:57:05 2018 +0200 ios playback: initialize slider min/max values at zero at first commit 60b584e9c1dc769b3fbb8d1567ea1a12454a9288 Author: Stephan Hesse <tchakabam@gmail.com> Date: Fri May 4 11:52:31 2018 +0200 ios playback: remove time_slider.frame forced set (fix for non-functional slider UI) It's unclear why this line was there, but it renders the slider unresponsive currently
Merged from your GIT branch