There are a few pieces of code that we still need to create and edit in order to tie everything together. Let's get started.
First, we need to modify our factories. First, edit www/js/app/factories/noteFactory.js
as shown in the following code:
noteFactory.createNote = function ( noteType ) { switch ( noteType.toUpperCase().trim() ) { … case noteFactory.VIDEONOTE: return new VideoNote(); … } } noteFactory.createAssociatedMediaFileName = function (noteType, uid) { … switch (noteType.toUpperCase().trim()) { … case noteFactory.VIDEONOTE: extension = { "ios": "mov", "android": "3gp" }; newFileName = "movie"; break; … }
Next, edit www/js/app/factories/noteViewFactory.js
:
noteViewFactory.createNoteEditView = function ( noteType ) { switch ( noteType.toUpperCase().trim() ) { … case noteFactory.VIDEONOTE: return...