为了账号安全,请及时绑定邮箱和手机立即绑定

求大神给我写注释

求大神给我写注释

h_peace 2016-05-30 20:37:04
 mui.previewImage();      var photoFile; var videoFile;  var videoEmptyLi = document.getElementById("videoEmptyLi");  var videoList = document.getElementById("videoList"); window.onload = function(){  mui.plusReady(function(){      photoFile = mui.currentWebview.photoFile;   videoFile = mui.currentWebview.videoFile;   initRecord(recordFile);   initPhoto(photoFile);   initVideo(videoFile);  }); }   function initVideo(paths){    for(var i=0;i<paths.length;i++){   plus.io.resolveLocalFileSystemURL(paths[i],function(entry){    createVideoItem(entry);   },getFileError);   } }  function initPhoto(paths){  if(paths.length>0){   document.getElementById("pempty").style.display = 'none';  }  for(var i=0;i<paths.length;i++){   plus.io.resolveLocalFileSystemURL(paths[i],function(entry){    createPhoto(entry);   },getFileError);   } } var photoList = document.getElementById("photoList") function createPhoto(entry){  var li = document.createElement("li");  li.className = 'mui-table-view-cell mui-media mui-col-xs-4';  li.innerHTML = '<img class="mui-col-xs-12" style="height: 20%;" src="'+entry.fullPath+'" '      +'data-preview-src="" data-preview-group="1">';  photoList.appendChild(li); }  function getFileError(e){  alert(e.message);  }    function createVideoItem( entry ) {  var li = document.createElement("li");  li.className = "ditem";  li.innerHTML = '<span class="iplay"><font class="aname"></font><br/><font class="ainf"></font></span>';  li.setAttribute( "onclick", "playVideo(this);" );  videoList.appendChild(li);  li.querySelector(".aname").innerText = entry.name;  li.querySelector(".ainf").innerText = "...";  li.entry = entry;  updateInformation( li );  videoEmptyLi.style.display = "none"; } var vDiv = document.getElementById("videoView"); var v = document.getElementById("video"); function playVideo(li){  var path = li.entry.fullPath;  v.src = path;  vDiv.style.display = 'block';  v.play(); } function playVideoEnd(){  vDiv.style.display='none'; } function _pause(btn){  if(v.paused){   v.play();   btn.innerText = "暂停";  }else{   v.pause();   btn.innerText = "开始";  } } function _back(){  v.pause();  vDiv.style.display = 'none'; }
查看完整描述

1 回答

?
迷途的马尔斯

TA贡献72条经验 获得超106个赞

你自己写的代码,还要别人来写注释。。。

查看完整回答
1 反对 回复 2016-06-01
  • 1 回答
  • 1 关注
  • 1837 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信