Documentation ¶
Index ¶
Constants ¶
View Source
const (
ChunkIdx_Nil = ChunkIdx(-1)
)
View Source
const (
Header_AssetWordSize uint8 = 0x03
)
View Source
const ( // Spotify inserts a custom Ogg packet at the start with custom metadata values, that you would // otherwise expect in Vorbis comments. This packet isn't well-formed and players may balk at it. // Search for "parse_from_ogg" in librespot -- https://github.com/librespot-org/librespot SPOTIFY_OGG_HEADER_SIZE = 0xa7 )
Variables ¶
View Source
var DefaultAudioFormats = []Spotify.AudioFile_Format{ Spotify.AudioFile_OGG_VORBIS_160, }
DefaultAudioFormats is the default audio format for assets if not specified via AssetFormat.
Functions ¶
Types ¶
type AssetFormat ¶
type AssetFormat struct { // Audio formats for the asset in order of preference. // If nil, DefaultAudioFormats is used. AudioFormats []Spotify.AudioFile_Format }
Expresses preferences for the asset data in order of preference.
type ChunkIdx ¶
type ChunkIdx int32 // 0-based index of the chunk in the asset
func ChunkIdxAtOffset ¶
func (ChunkIdx) StartByteOffset ¶
type ChunkStatus ¶
type ChunkStatus int32
type Downloader ¶
type Downloader interface { HandleCmd(cmd byte, data []byte) error // Blocks until the asset is ready to be accessed. PinTrack(uri string, want *AssetFormat) (media.Asset, error) }
func NewDownloader ¶
func NewDownloader(conn connection.PacketStream, client *mercury.Client) Downloader
Click to show internal directories.
Click to hide internal directories.