rubensousa / previewseekbar Goto Github PK
View Code? Open in Web Editor NEWA SeekBar suited for showing a preview of something. As seen in Google Play Movies.
License: Apache License 2.0
A SeekBar suited for showing a preview of something. As seen in Google Play Movies.
License: Apache License 2.0
PreviewTimeBar not found even added normal dependency with exoplayer extension dependency. Only PreviewSeekBar is available in library. Please solve this.
Can i use this with JiaoZiVideoPlayer?
Is it possible to support webVtt in your code?
So I tried integrating the PreviewSeekBar based on the usage in your readme but i dont see the still frame showing. How do I fix this?
all examples are for exoplayer... is there an example/tutorial on how to use it standalone?
if not, I will need to dig into your code
The PreviewTimeBar class makes a call to getDefaultScrubberColor but it seems like that method no longer exists in recent versions of ExoPlayer.
I am trying to implement this seekbar in a rtl mode. Everything works fine but the thumbnail does not align with the seekbar button. The two are inverted: if the seekbar progress is left, the thumbnail is on the right, and vice versa.
Here is what I am using:
previewSeekBar.setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
Any help would be appreciated, thanks!
Dear @rubensousa, thanks for your great lib.
Im using it in my project, I can set color of preview seekbar via style like below:
<item name="played_color">@color/White</item>
<item name="scrubber_color">@color/White</item>
<item name="buffered_color">@color/DeepPink</item>
<item name="unplayed_color">@color/Blue</item>
<item name="ad_marker_color">@color/White</item>
<item name="played_ad_marker_color">@color/Gray</item>
But how can i change color programmatically, pls help.
Thanks in advance.
I have added a listerner with setOnSeekBarChangeListener but it does not seem to work.
It's not implemented yet?
i'm getting stuck when implement resume in last position, can you make enhancement in exoplayermanger in the example?
How do we create the seekpreview thumbnail?
Do we have to screenshot every 5 minutes and join them to make a single image or is there any way to do so?
Error in gradle while importing project. using Android studio 3.1.3
I don't want to use this with any player except for default videoview and i am not able to see the preview in the frame.
For a long movie , when my finger is shaking a bit, time is changed.
it's too sensitive.
Can we make the seek bar less sensitive and jump only when the time different is say 30+ seconds for example?
Hello,
I tried to compare it to its example, but it was not successful.
http://vod.sportstv.com.tr/39028754-454C-40BA-B253-FAF6C7E7B2B8/thumbnails/thumbnail.json
My data returns as json. I have more than one jpg file in json. How can I use them ? Help me please.
@rubensousa :
I'm trying to set it, but it does not find the method.
previewTimeBar = playerView.findViewById (R.id.exo_progress);
previewTimeBar.setPreviewColorTint (R.color.colorPrimary);
@rubensousa : In the xml file, from the following error:
java.lang.NoClassDefFoundError: com/github/rubensousa/previewseekbar/exoplayer/R$dimen
at com.github.rubensousa.previewseekbar.exoplayer.PreviewTimeBar.getThumbOffset(PreviewTimeBar.java:51)
at com.github.rubensousa.previewseekbar.exoplayer.PreviewTimeBarLayout.setupMargins(PreviewTimeBarLayout.java:87)
at com.github.rubensousa.previewseekbar.base.PreviewGeneralLayout.onLayout_Original(PreviewGeneralLayout.java:78)
at com.github.rubensousa.previewseekbar.base.PreviewGeneralLayout.onLayout(PreviewGeneralLayout.java)
at android.view.View.layout(View.java:19623)
at android.view.ViewGroup.layout(ViewGroup.java:6095)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1780)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1546)
at android.view.View.layout(View.java:19623)
at android.view.ViewGroup.layout(ViewGroup.java:6095)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
at android.view.View.layout(View.java:19623)
at android.view.ViewGroup.layout(ViewGroup.java:6095)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:19623)
at android.view.ViewGroup.layout(ViewGroup.java:6095)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
at android.view.View.layout(View.java:19623)
at android.view.ViewGroup.layout(ViewGroup.java:6095)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:346)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:384)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:193)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:547)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$3(RenderTask.java:681)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.github.rubensousa.previewseekbar.exoplayer.R$dimen
at org.jetbrains.android.uipreview.ModuleClassLoader.load(ModuleClassLoader.java:181)
at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:56)
at org.jetbrains.android.uipreview.ModuleClassLoader.findClass(ModuleClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClass(ModuleClassLoader.java:214)
... 30 more
Getting the following error while uisng this library.
Could not find com.github.rubensousa:previewseekbar:3.0.0.
Required by:
project :app
Some api is not supportt for api below 16,I want to use to the device below API 16.do you have some tips?thanks!
What is the size of each thumbnail so that it will fit in the preview, I tried to use this sample https://jwsupport.cdn.prismic.io/jwsupport/f39cd28a5474fcd4d1aee96d20f0452a945890f8_tooltipthumbs-sprite.jpg and it doesn't fit in some scene.
When I run app on device with API 23 everything works nicely but whenever I tried to run app on device with API 19 Its gets crashed.
in logcat showing following error;
java.lang.NoSuchMethodError: com.github.rubensousa.previewseekbar.PreviewSeekBar.getThumbTintList
Kindly provide solution to handle this issue.
Hello Sir ,
I am not able to load correct image from sprite image url. Taking more time foe load multiple image in preview image .
@rubensousa :
Hi, first of all I wanted to congratulate you.
Let's start with the questions:
After creating a new project I have:
from what I understand use glide, so I must also install Glide's addiction, right?
Does this support in the
In Media3, 1.3.0 there is support for Dash Thumbail Imageset as per:
https://dashif-documents.azurewebsites.net/DASH-IF-IOP/pull/341/DASH-IF-IOP.html#codecs-thumbnails
Would it be possible to add the same in this ?
I apply this library and check that it make so many memory:
Before: ~60MB
After: ~315MB
Please help me how to improve the memory for my application
Hi, I have for example 15 big image links with 64 thumbnails inside of each, how can I use this in my case? I see only the thumbnails from the last link I call not the rest!
Is it possible to change the preview frame size? What should be modified in the XML/code?
Thanks!
When I drag to seek, it's not immediate at all. It takes about 1-2 seconds to show the preview (tested on Nexus 5x). How come?
Also not sure what the "local" does.
I'm currently working on a new update
hi ,your library is pretty cool, i want to use it in my own project without EXOPlayer, I've read READ_ME and haven't figured out how to do it ,you said Create a PreviewLoader and pass it to PreviewSeekBarLayout but i don't know where i should load preview to,should i pass PreviewSeekBarLayout instance to PreviewLoaderImpl ? any help is appreciated , thanks in advance
Hello:-) What do you think about migrate library on kotlin?
Video continue play after stop or hide activity
Getting the following error as from exoplayer 2.4.0. i think they have change the control from a seekbar to a timebar ? The code was working well on Exoplayer 2.3.1
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: android.view.InflateException: Binary XML file line #10: Error inflating class com.google.android.exoplayer2.ui.SimpleExoPlayerView
com.github.rubensousa.previewseekbar.PreviewSeekBar cannot be cast to com.google.android.exoplayer2.ui.TimeBar
these might help you
https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/ui/DefaultTimeBar.html
https://google.github.io/ExoPlayer/doc/reference/index.html?com/google/android/exoplayer2/ui/TimeBar.OnScrubListener.html
Any fix plz ?
The project is not updated in Maven Central, it does not contain the "setup" method in PreviewSeekBarLayout
This method setAdBreakTimesMs cannot be override on Exoplayer 2.5.1
there is a new method
@Override
public void setAdGroupTimesMs(@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups, int adGroupCount) {
}
Is it possible to use your PreviewSeekBar with Exoplayer's PlaybackControlView?
Sample code:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout
android:id="@+id/aspect_ratio_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<SurfaceView
android:id="@+id/surface_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true" />
</com.google.android.exoplayer2.ui.AspectRatioFrameLayout>
<com.google.android.exoplayer2.ui.PlaybackControlView
android:id="@+id/player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
When I do seek i am getting callbacks for onScrubStart, onScrubStop, but for onScrubMove i am not getting callback.
I have vtt file that contains info about preview images:
`
01:43:40,000 --> 01:43:50,000
out02.jpg#xywh=292,120,146,60
01:43:50,000 --> 01:44:00,000
out07.jpg#xywh=438,120,146,60
01:44:00,000 --> 01:44:10,000
out03.jpg#xywh=584,120,146,60
01:44:10,000 --> 01:44:20,000
out03.jpg#xywh=730,120,146,60
01:44:20,000 --> 01:44:30,000
out07.jpg#xywh=876,120,146,60
`
ass you see each part of that contains info about preview image and its position.
How can I integrate this vtt file with PreviewSeekBar.
I saw your samples. It seems PreviewSeekBar takes one thumbnail URL to work with, But as you see I have a list of thumbnails in my vtt file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.