-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add getThumbnail
APIs to Player
and Source
#225
Conversation
getThumbnail
APIs to Player
and Source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍
@ReactMethod | ||
fun getThumbnail(nativeId: NativeId, time: Double, promise: Promise) { | ||
uiManager()?.addUIBlock { | ||
promise.resolve(JsonConverter.fromThumbnail(players[nativeId]?.source?.getThumbnail(time))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Player.getThumbnail
has been deprecated in favour of Source.getThumbnail
on Android. From my perspective I would be in favour of only wrapping Source.getThumbnail
in this PR, but I'm not sure what the state is on iOS, just wanted to point this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zigavehovec I know about the deprecation on Android but I went for providing both as our Source
API is not that rich in the React Native SDK yet. Also we don't support playlist, so only one Source
is available at a time.
Co-authored-by: Žiga Vehovec <[email protected]>
Description
This PR extends the
Player
andSource
APIs to allow fetching thumbnail information.Changes
Introduced:
Player.getThumbnail()
: to fetch thumbnail information for the current sourceSource.getThumbnail()
: to fetch thumbnail information for the given sourceChecklist
CHANGELOG
entry