Skip to content

Commit

Permalink
Merge pull request #3 from masterwok/1.1.16
Browse files Browse the repository at this point in the history
1.1.16
  • Loading branch information
masterwok authored Feb 28, 2019
2 parents adc584a + 458e597 commit 52e752b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ and add the following in the dependent module:

```gradle
dependencies {
implementation 'com.github.masterwok:simple-vlc-player:1.1.15'
implementation 'com.github.masterwok:simple-vlc-player:1.1.16'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ internal class CastPlayerFragment : MediaPlayerServiceFragment()
}

override fun onServiceConnected() {
serviceBinder?.callback = this

startPlayback()
}

Expand Down Expand Up @@ -151,10 +153,12 @@ internal class CastPlayerFragment : MediaPlayerServiceFragment()
}

override fun onPlayerStopped() {
// Intentionally left blank..
serviceBinder?.callback = null
activity?.finish()
}

override fun onPlayerEndReached() {
serviceBinder?.callback = null
activity?.finish()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class MediaPlayerService : InjectableService(), MediaPlayer.Callback, Dialog.Cal
private const val MediaPlayerServiceChannelName = "Media Player Service"
private const val MediaPlayerServiceChannelId = "channel.mediaplayerservice"
private const val SimpleVlcSessionTag = "tag.simplevlcsession"
private const val MediaPlayerServiceNotificationId = 32106
private const val MediaPlayerServiceNotificationId = 1

private fun getPauseAction(context: Context): NotificationCompat.Action {
return NotificationCompat.Action(
Expand Down Expand Up @@ -459,6 +459,10 @@ class MediaPlayerService : InjectableService(), MediaPlayer.Callback, Dialog.Cal
player?.pause()
}

override fun onStop() {
super.onStop()
}

override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean {
val action = mediaButtonEvent.action

Expand Down

0 comments on commit 52e752b

Please sign in to comment.