2021-09-07 17:36:50 +03:00
|
|
|
package rui
|
|
|
|
|
|
|
|
type AudioPlayer interface {
|
|
|
|
MediaPlayer
|
|
|
|
}
|
|
|
|
|
|
|
|
type audioPlayerData struct {
|
|
|
|
mediaPlayerData
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewAudioPlayer create new MediaPlayer object and return it
|
2021-11-04 21:21:42 +03:00
|
|
|
func NewAudioPlayer(session Session, params Params) AudioPlayer {
|
2021-09-07 17:36:50 +03:00
|
|
|
view := new(audioPlayerData)
|
|
|
|
view.Init(session)
|
|
|
|
view.tag = "AudioPlayer"
|
|
|
|
setInitParams(view, params)
|
|
|
|
return view
|
|
|
|
}
|
|
|
|
|
|
|
|
func newAudioPlayer(session Session) View {
|
|
|
|
return NewAudioPlayer(session, nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (player *audioPlayerData) Init(session Session) {
|
|
|
|
player.mediaPlayerData.Init(session)
|
|
|
|
player.tag = "AudioPlayer"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (player *audioPlayerData) htmlTag() string {
|
|
|
|
return "audio"
|
|
|
|
}
|