// Stop stops playback. // Has no effect if no media is loaded. func (this *Player) Stop() (err error) { if this.ptr == nil { return syscall.EINVAL } C.libvlc_media_player_stop(this.ptr) return }
// Stop stops playback. // Has no effect if no media is loaded. func (this *Player) Stop() (err error) { if this.ptr == nil { return &VLCError{"Player is nil"} } C.libvlc_media_player_stop(this.ptr) return }
func (p *Player) Stop() error { if p.player == nil { return errors.New("A player must first be initialized") } if !p.IsPlaying() { return nil } C.libvlc_media_player_stop(p.player) return getError() }