Touchkit-powered Client-side Audio-Project

I’m planning on making a touckit application (my first touchkit one. so i don’t know that much about the add-on) .
What it will roughly do:
In the app or in a desktop version of it you can upload audiofiles or link them (for example from soundcloud by using their API). The content of these files will be stored in the server. For example in a DataBase BLOB field. The user can then start the mobile/Touchkit version of this app, download/transfer all the audio to the client side so that when the user goes offline he can still play the audio. Not planning to have the audio stored in the phone, just available at runtime.

The upload/linking (in short: the desktop-) part should not really be a problem.

I now have some question on the touckit part:
To achieve the download/transfer to the client-side i had the idea on creating a custom component which has 2 states:
State 1: component shows a download button which triggers the audio to be collected on the server side and then either transfered using a AbstractComponentState class or a RPC and then stored in a client-side array variable.
State 2: Component shows some kind of Music Player interface (maybe using
gwt-sound
) which only operates on the client-side so that it works with a touchkit app which is offline.

  1. Is this way theoretically possible or/and is there maybe even a better way?
  2. What type should be used to transfer the audio to the client? maybe byte array?
  3. Is there anything special i have to keep in mind when making the custom component so that it works in a offline touchkit app?

I’m really interested to hear from anyone on that topic.

Thanks in advance,
Marius

I read a bit more and also tried out a bit more about the Touchkit Offline Mode and how you can build your own gwt client side app when the network is down (or goOffline() is called).

That’s why i can now answer a few question regarding 3.:
Seems like i need to make 2 components because the Online-UI and the Offline-“UI” don’t share components and data like i expected:
1: Vaadin Integrated GWT component:
Transfers the Files/byte arrays/streams/… to the cient-side and then stores them in for example a
Html5Storage
.
2. GWT client-side Component:
Loads the data from the Storage and plays them (probably using some gwt or Javascript sound library)