The Mega App model contains only one JavaScript object that represents the voice and photo memo data, as shown in the following code snippet:
var MemoItem = function(memoItem) { this.id = memoItem.id || "Memo_" + (new Date()).getTime(); this.title = memoItem.title || ""; this.desc = memoItem.desc || ""; this.type = memoItem.type || "voice"; this.location = memoItem.location || ""; this.mtime = memoItem.mtime || ""; };
The MemoItem
object contains the following attributes:
id
: This represents thememo
ID (its default value is unique as it includes a numeric value of the current time in milliseconds)type
: This represents the memo type, and it can be"voice"
or"photo"
(its default value is"voice"
)location
: This represents the location of the media (audio or photo) file in the device's filesystem
We mainly...