示例#1
0
func pauseOrResumeHandler(w http.ResponseWriter, r *http.Request) {
	if !player.IsStop() {
		if err := player.PauseOrResume(); err != nil {
			sendErr(w, err)
			return
		}
	}
	gotoIndex(w, r)
}
示例#2
0
func nextHandler(w http.ResponseWriter, r *http.Request) {
	if !player.IsStop() {
		if err := player.Next(); err != nil {
			sendErr(w, err)
			return
		}
	}
	gotoIndex(w, r)
}