apps/camera/js/filmstrip.js
// a video poster image, remove the filmstrip item of its video file.
a video poster image, remove the filmstrip item of its video file.
a video poster image remove the filmstrip item of its video file .
function deleteItem(filename) {
    var deletedFileName;
    if (filename.indexOf('VID') != -1 &&
        filename.lastIndexOf('.jpg') === filename.length - 4) {
      deletedFileName = filename.replace('.jpg', '.3gp');
    } else {
      deletedFileName = filename;
    }
    for (var n = 0; n < items.length; n++) {
      if (items[n].filename === deletedFileName) {
        var item = items[n];
        items.splice(n, 1);
        filmstrip.removeChild(item.element);
        URL.revokeObjectURL(item.element.src);
        item.element.src = '';
        break;
      }
    }
    for (var i = n; i < items.length; i++) {
      items[i].element.dataset.index = i;
    }
  }
function deleteItem ( filename ) { var deletedFileName ; if ( filename . indexOf ( 'VID' ) != - 1 && filename . lastIndexOf ( '.jpg' ) === filename . length - 4 ) { deletedFileName = filename . replace ( '.jpg' , '.3gp' ) ; } else { deletedFileName = filename ; } for ( var n = 0 ; n < items . length ; n ++ ) { if ( items [ n ] . filename === deletedFileName ) { var item = items [ n ] ; items . splice ( n , 1 ) ; filmstrip . removeChild ( item . element ) ; URL . revokeObjectURL ( item . element . src ) ; item . element . src = '' ; break ; } } for ( var i = n ; i < items . length ; i ++ ) { items [ i ] . element . dataset . index = i ; } }
a video poster image, remove the filmstrip item of its video file.
a video poster image remove the filmstrip item of its video file .
// Check whether filename is a video poster image or not. If filename // contains 'VID' and ends with '.jpg', consider it a video poster // image and get the video filename by changing '.jpg' to '.3gp' // Remove the item in filmstrip // Remove the item from the array of items // Remove the thumbnail image from the filmstrip // Renumber the item elements after the removed one