项目作者: RomanTsarou

项目描述 :
Android music player library
高级语言: Kotlin
项目地址: git://github.com/RomanTsarou/XPlayer.git
创建时间: 2018-08-26T11:16:02Z
项目社区:https://github.com/RomanTsarou/XPlayer

开源协议:Apache License 2.0

下载


XPlayer

forked from googlesamples/android-UniversalMusicPlayer

Release

Android music player library for androidx projects, with simlpe API:

  1. val liveDataPlayerState: LiveData<State>
  2. val liveDataPlayNow: LiveData<Track>
  3. val liveDataPlayList: LiveData<List<Track>>
  4. val trackDuration: Long
  5. val currentPosition: Long
  6. var speed: Float
  7. var playList: List<Track>?
  8. fun play()
  9. fun start(mediaId: String)
  10. fun pause()
  11. fun stop()
  12. fun next()
  13. fun prev()
  14. fun togglePlayPause()
  15. fun seekTo(millis: Long)

Sample use(Kotlin):

  1. Player.init(context)
  2. ...
  3. Player.playList = myPlayList
  4. ...
  5. Player.play()

License

Copyright 2018 Roman Tsarou

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the “License”); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.