State Object
The state object contains detailed information about the state of the host OnSong app. This is used to retrieve and update the state.
Parameters
Name | Type | Description | Required |
---|---|---|---|
song | object |
The song that is currently being viewed.
|
Optional |
set | object | The set that is currently being viewed. This is a Set Object. | Optional |
book | string | The name of the currently selected book. If "All Songs" is selected, the value "all" is returned. If "Unbound Songs" is selected, the value "unbound" is returned. | Optional |
position | number | The current scroll position of the current song from 0-100% expressed as a floating point number. | Optional |
section | int | The current section of the song expressed as an integer value. | Optional |
autoScroll | boolean | Determines if autoscroll is currently enabled. | Optional |
Example
{ "set" : { "orderIndex" : 0, "modified" : "2010-06-20T17:14:58-04:00", "user" : "87b7d2eededcd0f408ee4de1bfe8f42b300e47d6", "quantity" : 1, "songs" : [ { "ID" : "welcome_to_onsong", "title" : "Welcome To OnSong", "usefile" : false, "favorite" : 1, "key" : "", "artist" : "OnSong Team" } ], "created" : "1969-12-31T19:00:00-05:00", "ID" : "welcome_to_song", "title" : "Welcome" }, "position" : 0, "section" : 0, "autoScroll" : false, "book" : "all", "song" : { "ID" : "welcome_to_onsong", "title" : "Welcome To OnSong", "usefile" : false, "favorite" : 1, "key" : "", "artist" : "OnSong Team" } }