Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bisohns/mplayer
A library to allow playing media files (remote and local) from your gocode
https://github.com/bisohns/mplayer
Last synced: 28 days ago
JSON representation
A library to allow playing media files (remote and local) from your gocode
- Host: GitHub
- URL: https://github.com/bisohns/mplayer
- Owner: bisohns
- License: mit
- Created: 2020-03-22T19:46:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-30T19:25:11.000Z (over 4 years ago)
- Last Synced: 2023-07-10T06:39:12.490Z (over 1 year ago)
- Language: Go
- Size: 10.7 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mplayer
A library to allow playing media files (remote and local) from your gocode## Install
```
go get github.com/bisoncorps/mplayer
```## What is mplayer
mplayer is just a means to allow for playing media files from golang. It allows for streaming online media
files and local media files as well. It hopes to incorporate functionalities that support using any known
media player. Currently only browser is supported but other players are currently being considered. It supports- In Browser Playing, MPV and VLC
- playing local files
- streaming online resource## Usage
```go
package mainimport (
"log"
"github.com/bisoncorps/mplayer"
)func main() {
p, err := mplayer.GetPlayer("browser")
if err != nil {
log.Fatal(err)
}
// urls can be remote too
p.SetURL("/home/manasseh/Videos/Jumanji.mp4")
p.SetTitle("Jumanji MP4")
p.Play()
}
```## TODO
- [x] Add other players (mpv, vlc)
- [ ] Add subtitle options