-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: add method for getting current playback status #4229
base: master
Are you sure you want to change the base?
feat: add method for getting current playback status #4229
Conversation
android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
Outdated
Show resolved
Hide resolved
@@ -40,6 +40,15 @@ export type ReactVideoSourceProperties = { | |||
textTracks?: TextTracks; | |||
}; | |||
|
|||
export type TPlaybackStatus = { |
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.
PlaybackStatus would be enough ?
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.
I think it's better to add the prefix T
before type names, meaning playbackStatus would be a type. Similarly, we can add an I
before interface names
FX: type TSample = {} and interface ISample = {}
WDYT?
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.
As Robert Martin wrote in his "Clean Code" - T, I, Enum, List (and so on) prefixes/suffixes before types, interfaces, enums (and so on) are meaningless.
We are not necessarily need to follow what he writes in his books, but it's better to follow guidelines that are accepted in the project you are working on (for example, as I can see in this project suffixes/prefixes are not used)
# Conflicts: # src/Video.tsx
@seyedmostafahasani |
@YangJonghun |
@seyedmostafahasani if it is deprecated, It is nopt a good idea to use it. |
Same as above comment |
Summary
Add method for getting current playback status.
Motivation
Implement feature request #4226.
Changes
Test plan
Run the sample app, add a button get play status with the use of function
getCurrentPlaybackStatus
.