Analytics
Analytics
classClass responsible for managing the listening analytics inside the application.
IndexedDB is used under the hood. Checkout the Database
class for further information. There’s a table for each
service (i.e. soundcloud, youtube, local).
The data are stored as JSON objects with an id
and
playback_count
field. For instance:
{id: '/path/to/file.mp3', playback_count: 5}
Increases the playback count value of a record inside the database.
Parameters
record
Media The concerned record.Returns Promise
Stores a brand new entry in the analytics database.
Parameters
record
Media The record to add.Returns Promise