Skip to content

Commit

Permalink
Merge pull request #17 from tinyboxvk/patch-typo
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
theScrabi authored Jan 20, 2025
2 parents d6769f0 + 463a2f0 commit 34aa916
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Main menu
You can do this by implementing your own [`MediaRepository`](https://teamnewpipe.github.io/NewPlayer/new-player/net.newpipe.newplayer.repository/-media-repository/index.html). More information can be found about thins in the [`MediaRepository code documentation`](https://teamnewpipe.github.io/NewPlayer/new-player/net.newpipe.newplayer.repository/-media-repository/index.html). There is also an [example implementation](https://github.com/TeamNewPipe/NewPlayer/blob/dev/test-app/src/main/java/net/newpipe/newplayer/testapp/TestMediaRepository.kt) of it in the test-app.
7. **Do advanced things**
Like applying caching and prefetching to your media repository using the meta `MediaRepository` implementations, or perform error handling and error recovering. *TOOD: Write the documentation for this*
Like applying caching and prefetching to your media repository using the meta `MediaRepository` implementations, or perform error handling and error recovering. *TODO: Write the documentation for this*
## How does NewPlayer work
Expand Down
4 changes: 2 additions & 2 deletions misc/newplayer_architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions new-player/src/main/java/net/newpipe/newplayer/NewPlayer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ interface NewPlayer {

/**
* Same as ExoPlayer's repeatMode. See [Player.getRepeatMode]
* However, ExoPlayer's repeatMode ist based on an integer, while NewPayer defines it as
* However, ExoPlayer's repeatMode is based on an integer, while NewPayer defines it as
* an enum class.
*/
var repeatMode: RepeatMode
Expand Down Expand Up @@ -182,7 +182,7 @@ interface NewPlayer {
*
* @param item the item of the stream during which playback failed.
* @param mediaItem the [MediaItem] of the stream during which playback failed.
* @param excpetion the exception that occurred in ExoPlayer.
* @param exception the exception that occurred in ExoPlayer.
* @param repository the [MediaRepository] that NewPlayer utilizes.
* @return an implementation of StreamExceptionResponse. This tells NewPlayer how to deal with the exception.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class NewPlayerImpl(
streamSelection.item
)
)
Log.d(TAG, "New avialble tracks: \n" + tracks.joinToString())
Log.d(TAG, "New available tracks: \n" + tracks.joinToString())
tracks
}
}
Expand Down Expand Up @@ -300,7 +300,7 @@ class NewPlayerImpl(
}

else -> {
throw NewPlayerException("Unknwon exception response ${response.javaClass}")
throw NewPlayerException("Unknown exception response ${response.javaClass}")
}
}
}
Expand Down Expand Up @@ -388,7 +388,7 @@ class NewPlayerImpl(
mutableCurrentlyAvailableTracks.update {
val tracks =
TrackUtils.getNonDynamicTracksNonDuplicated(repository.getStreams(item))
Log.d(TAG, "New avialble tracks: \n" + tracks.joinToString())
Log.d(TAG, "New available tracks: \n" + tracks.joinToString())
tracks
}

Expand Down Expand Up @@ -474,7 +474,7 @@ internalPlayStream(mediaSource: MediaSource, playMode: PlayMode) {
private suspend fun replaceCurrentItem(item: String) {
mutableCurrentlyAvailableTracks.update {
val tracks = TrackUtils.getNonDynamicTracksNonDuplicated(repository.getStreams(item))
Log.d(TAG, "New avialble tracks: \n" + tracks.joinToString())
Log.d(TAG, "New available tracks: \n" + tracks.joinToString())
tracks
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fun NewPlayerUI(
@OptIn(UnstableApi::class)
@Preview(device = "spec:width=1080px,height=700px,dpi=440,orientation=landscape")
@Composable
private fun PlayerUIPreviewEmbeded() {
private fun PlayerUIPreviewEmbedded() {
VideoPlayerTheme {
NewPlayerUI(viewModel = NewPlayerViewModelDummy())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ internal fun AudioBottomUI(viewModel: InternalNewPlayerViewModel, uiState: NewPl
Icon(
imageVector = Icons.AutoMirrored.Filled.List,
contentDescription = stringResource(
id = R.string.widget_descriptoin_playlist_item_selection
id = R.string.widget_description_playlist_item_selection
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ internal fun Seeker(
if (segments.isNotEmpty()) {
segments.forEach {
require(it.start in range && it.end in range) {
"segment must lie withing the range: segment: ${it.name} start: ${it.start}, end: ${it.end}, range: ${range}"
"segment must lie within the range: segment: ${it.name} start: ${it.start}, end: ${it.end}, range: ${range}"
}
}
}
Expand All @@ -149,7 +149,7 @@ internal fun Seeker(
if (chapterSegments.isNotEmpty()) {
chapterSegments.forEach {
require(it.start in range) {
"chapter segment must lie withing the range: segment: ${it.name} start: ${it.start} range: ${range}"
"chapter segment must lie within the range: segment: ${it.name} start: ${it.start} range: ${range}"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ internal fun TopUI(
) {
Icon(
imageVector = Icons.AutoMirrored.Filled.List,
contentDescription = stringResource(R.string.widget_descriptoin_playlist_item_selection)
contentDescription = stringResource(R.string.widget_description_playlist_item_selection)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@ internal fun FadedAnimationForSeekFeedback(
mutableStateOf(0)
}

val vissible = if (backwards) {
val visible = if (backwards) {
fastSeekSeconds < 0
} else {
0 < fastSeekSeconds
}

val disapearEmediatly = if (backwards) {
val disappearImmediately = if (backwards) {
0 < fastSeekSeconds
} else {
fastSeekSeconds < 0
}

val valueToDisplay = if(vissible) {
val valueToDisplay = if(visible) {
lastSecondsValue = fastSeekSeconds
fastSeekSeconds
} else {
lastSecondsValue
}

if (!disapearEmediatly) {
if (!disappearImmediately) {
AnimatedVisibility(
visible = vissible,
visible = visible,
enter = fadeIn(animationSpec = tween(SEEK_ANIMATION_FADE_IN)),
exit = fadeOut(
animationSpec = tween(SEEK_ANIMATION_FADE_OUT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ data class NewPlayerUIState(
.setMediaId("0")
.setMediaMetadata(MediaMetadata.Builder()
.setTitle("Superawesome Video")
.setArtist("Yours truely")
.setArtist("Yours truly")
.setArtworkUri(null)
.setDurationMs(4201000L)
.build())
Expand Down Expand Up @@ -290,7 +290,7 @@ data class NewPlayerUIState(
.setMediaId("0")
.setMediaMetadata(MediaMetadata.Builder()
.setTitle("Stream 1")
.setArtist("Yours truely")
.setArtist("Yours truly")
.setArtworkUri(null)
.setDurationMs(4201000L)
.build())
Expand All @@ -300,7 +300,7 @@ data class NewPlayerUIState(
.setMediaId("1")
.setMediaMetadata(MediaMetadata.Builder()
.setTitle("Stream 2")
.setArtist("Yours truely")
.setArtist("Yours truly")
.setArtworkUri(null)
.setDurationMs(3201000L)
.build())
Expand All @@ -310,7 +310,7 @@ data class NewPlayerUIState(
.setMediaId("2")
.setMediaMetadata(MediaMetadata.Builder()
.setTitle("Stream 3")
.setArtist("Yours truely")
.setArtist("Yours truly")
.setArtworkUri(null)
.setDurationMs(2201000L)
.build())
Expand Down
2 changes: 1 addition & 1 deletion new-player/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<string name="widget_description_pause">Pause</string>
<string name="widget_description_toggle_fullscreen">Toggle fullscreen</string>
<string name="widget_description_chapter_selection">Chapter selection</string>
<string name="widget_descriptoin_playlist_item_selection">Playlist item selection</string>
<string name="widget_description_playlist_item_selection">Playlist item selection</string>
<string name="fast_seeking_backward">Fast seeking backward by %d seconds.</string>
<string name="fast_seeking_forward">Fast seeking forward by %d seconds.</string>
<string name="seconds">Seconds</string>
Expand Down

0 comments on commit 34aa916

Please sign in to comment.