Example #1
0
// 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
}
Example #2
0
// 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
}
Example #3
0
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()
}