LibVlc in Go program

This forum is about all development around libVLC.
KenSv
New Cone
New Cone
Posts: 1
Joined: 17 Apr 2020 15:13

LibVlc in Go program

Postby KenSv » 17 Apr 2020 15:27

I wrote simple IPTV player in GoLang using LibVlc. The program catches keyboard events raised in main application (terminal window).
When the player works in fullscreen mode keyboard events are not raised. Is there any method to catch such events without creation parental OS window?
I need cross platform desicion if it possible. Is OS registered global hotkeys only way for solve the problem?

Code: Select all

func (p *VlcPlayer) Run() { go Input() for { select { case command := <-p.Cmd:
Used library: https://github.com/adrg/libvlc-go/blob/master/v3/examples/player.go - as sample player

https://github.com/eiannone/keyboard - for catching input events

Code: Select all

func Input() { err := keyboard.Open() if err != nil { panic(err) } defer keyboard.Close() fmt.Println("Press ESC to quit")

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: LibVlc in Go program

Postby Rémi Denis-Courmont » 17 Apr 2020 15:54

No. That would not be portable.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 15 guests