蒋洪波

修改画板BUG

@@ -15,3 +15,7 @@ @@ -15,3 +15,7 @@
15 #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 15 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 # public *; 16 # public *;
17 #} 17 #}
  18 +-keep class com.eventhandle.**{*;}
  19 +-keep class com.ntjbase.**{*;}
  20 +-keep class com.videoengine.**{*;}
  21 +-keep class com.voiceengine.**{*;}
@@ -8,6 +8,7 @@ import android.text.Spannable; @@ -8,6 +8,7 @@ import android.text.Spannable;
8 import android.text.TextUtils; 8 import android.text.TextUtils;
9 import android.view.MotionEvent; 9 import android.view.MotionEvent;
10 import android.view.View; 10 import android.view.View;
  11 +import android.widget.LinearLayout;
11 import android.widget.ListView; 12 import android.widget.ListView;
12 13
13 import com.xdy.commonlibrary.core.AppBaseFragment; 14 import com.xdy.commonlibrary.core.AppBaseFragment;
@@ -25,6 +26,7 @@ import com.xdy.home.widget.chat.KJChatKeyboard; @@ -25,6 +26,7 @@ import com.xdy.home.widget.chat.KJChatKeyboard;
25 import com.xdy.home.widget.chat.OnOperationListener; 26 import com.xdy.home.widget.chat.OnOperationListener;
26 import com.xdy.home.widget.emoji.DisplayRules; 27 import com.xdy.home.widget.emoji.DisplayRules;
27 import com.xdy.util.LogUtil; 28 import com.xdy.util.LogUtil;
  29 +import com.xdy.util.ResUtil;
28 30
29 import org.kymjs.kjframe.ui.ViewInject; 31 import org.kymjs.kjframe.ui.ViewInject;
30 import org.kymjs.kjframe.utils.KJLoger; 32 import org.kymjs.kjframe.utils.KJLoger;
@@ -68,6 +70,11 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live @@ -68,6 +70,11 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live
68 } 70 }
69 71
70 @Override 72 @Override
  73 + public void onActivityCreated(Bundle savedInstanceState) {
  74 + super.onActivityCreated(savedInstanceState);
  75 + }
  76 +
  77 + @Override
71 protected void setupFragmentComponent(AppComponent appComponent) { 78 protected void setupFragmentComponent(AppComponent appComponent) {
72 Bundle arguments = getArguments(); 79 Bundle arguments = getArguments();
73 replay = arguments.getBoolean("replay"); 80 replay = arguments.getBoolean("replay");
@@ -76,13 +83,13 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live @@ -76,13 +83,13 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live
76 @Override 83 @Override
77 protected void initView(View v, Bundle savedInstanceState) { 84 protected void initView(View v, Bundle savedInstanceState) {
78 this.mContext = getActivity(); 85 this.mContext = getActivity();
79 -  
80 box = (KJChatKeyboard) v.findViewById(R.id.chat_msg_input_box); 86 box = (KJChatKeyboard) v.findViewById(R.id.chat_msg_input_box);
81 mRealListView = (ListView) v.findViewById(R.id.chat_listview); 87 mRealListView = (ListView) v.findViewById(R.id.chat_listview);
82 mRealListView.setSelector(android.R.color.transparent); 88 mRealListView.setSelector(android.R.color.transparent);
83 initMessageInputToolBox(); 89 initMessageInputToolBox();
84 } 90 }
85 91
  92 +
86 private void initMessageInputToolBox() { 93 private void initMessageInputToolBox() {
87 box.setToolBoxIsClick(replay); 94 box.setToolBoxIsClick(replay);
88 box.setOnOperationListener(new OnOperationListener() { 95 box.setOnOperationListener(new OnOperationListener() {
@@ -107,7 +114,7 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live @@ -107,7 +114,7 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live
107 114
108 @Override 115 @Override
109 public void selectedEmoji(String emoji) { 116 public void selectedEmoji(String emoji) {
110 - if (!TextUtils.isEmpty(emoji)){ 117 + if (!TextUtils.isEmpty(emoji)) {
111 int start = box.getEditTextBox().getSelectionStart(); 118 int start = box.getEditTextBox().getSelectionStart();
112 CharSequence content = box.getEditTextBox().getText().insert(start, emoji); 119 CharSequence content = box.getEditTextBox().getText().insert(start, emoji);
113 box.getEditTextBox().setText(content); 120 box.getEditTextBox().setText(content);
@@ -209,7 +216,7 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live @@ -209,7 +216,7 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live
209 if (entity.fromNodeId.equals(AccountUtils.getUser().getNodeId().toString())) { 216 if (entity.fromNodeId.equals(AccountUtils.getUser().getNodeId().toString())) {
210 message = new Message(Message.MSG_TYPE_TEXT, Message.MSG_STATE_SUCCESS, entity.fromRole, 217 message = new Message(Message.MSG_TYPE_TEXT, Message.MSG_STATE_SUCCESS, entity.fromRole,
211 entity.fromName, "", "", 218 entity.fromName, "", "",
212 - "", entity.message, true, true, replay?null:new Date()); 219 + "", entity.message, true, true, replay ? null : new Date());
213 datas.add(message); 220 datas.add(message);
214 adapter.refresh(datas); 221 adapter.refresh(datas);
215 mRealListView.setSelection(adapter.getCount() - 1); 222 mRealListView.setSelection(adapter.getCount() - 1);
@@ -217,7 +224,7 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live @@ -217,7 +224,7 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live
217 LogUtil.i("返回的聊天内容===" + entity.message); 224 LogUtil.i("返回的聊天内容===" + entity.message);
218 message = new Message(Message.MSG_TYPE_TEXT, Message.MSG_STATE_SUCCESS, entity.fromRole, "", 225 message = new Message(Message.MSG_TYPE_TEXT, Message.MSG_STATE_SUCCESS, entity.fromRole, "",
219 "", entity.fromName, "", entity.message, false, 226 "", entity.fromName, "", entity.message, false,
220 - true, replay?null:new Date()); 227 + true, replay ? null : new Date());
221 datas.add(message); 228 datas.add(message);
222 adapter.refresh(datas); 229 adapter.refresh(datas);
223 mRealListView.setSelection(adapter.getCount() - 1); 230 mRealListView.setSelection(adapter.getCount() - 1);
@@ -228,8 +235,8 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live @@ -228,8 +235,8 @@ public class ChatFragment extends AppBaseFragment<LivePresenter> implements Live
228 } 235 }
229 236
230 @Override 237 @Override
231 - public void clearChatHistory(){  
232 - if (adapter!=null){ 238 + public void clearChatHistory() {
  239 + if (adapter != null) {
233 datas.clear(); 240 datas.clear();
234 adapter.refresh(datas); 241 adapter.refresh(datas);
235 } 242 }
@@ -41,21 +41,26 @@ public class DocFragment extends AppBaseFragment<LivePresenter> implements LiveC @@ -41,21 +41,26 @@ public class DocFragment extends AppBaseFragment<LivePresenter> implements LiveC
41 41
42 int winWidth; 42 int winWidth;
43 int winHeight; 43 int winHeight;
44 - CanvasView mCanvasView; 44 + private CanvasView mCanvasView;
45 private UpdateDoc mUpdateDoc; 45 private UpdateDoc mUpdateDoc;
  46 + private boolean replay;
46 47
47 public void setPresenter(LivePresenter presenter) { 48 public void setPresenter(LivePresenter presenter) {
48 mPresenter = presenter; 49 mPresenter = presenter;
49 } 50 }
50 51
51 - public static DocFragment newInstance() { 52 + public static DocFragment newInstance(boolean replay) {
52 DocFragment docFragment = new DocFragment(); 53 DocFragment docFragment = new DocFragment();
  54 + Bundle bundle = new Bundle();
  55 + bundle.putBoolean("replay", replay);
  56 + docFragment.setArguments(bundle);
53 return docFragment; 57 return docFragment;
54 } 58 }
55 59
56 @Override 60 @Override
57 protected void setupFragmentComponent(AppComponent appComponent) { 61 protected void setupFragmentComponent(AppComponent appComponent) {
58 - 62 + Bundle arguments = getArguments();
  63 + replay = arguments.getBoolean("replay");
59 } 64 }
60 65
61 @Override 66 @Override
@@ -63,7 +68,9 @@ public class DocFragment extends AppBaseFragment<LivePresenter> implements LiveC @@ -63,7 +68,9 @@ public class DocFragment extends AppBaseFragment<LivePresenter> implements LiveC
63 DisplayMetrics metric = new DisplayMetrics(); 68 DisplayMetrics metric = new DisplayMetrics();
64 getWindowWith(metric); 69 getWindowWith(metric);
65 mCanvasView = (CanvasView) v.findViewById(R.id.cv); 70 mCanvasView = (CanvasView) v.findViewById(R.id.cv);
66 - 71 + if (replay) {
  72 + mCanvasView.setZOrderMediaOverlay(true);
  73 + }
67 //展示没有文档图片 74 //展示没有文档图片
68 docUrlTransformBitmap(null); 75 docUrlTransformBitmap(null);
69 } 76 }
@@ -115,7 +122,9 @@ public class DocFragment extends AppBaseFragment<LivePresenter> implements LiveC @@ -115,7 +122,9 @@ public class DocFragment extends AppBaseFragment<LivePresenter> implements LiveC
115 } 122 }
116 123
117 if (entity.annotaionItems != null) { 124 if (entity.annotaionItems != null) {
118 - mCanvasView.drawLine(entity.annotaionItems); 125 + if (mCanvasView != null) {
  126 + mCanvasView.drawLine(entity.annotaionItems);
  127 + }
119 } 128 }
120 } 129 }
121 } 130 }
@@ -13,7 +13,6 @@ import android.view.MotionEvent; @@ -13,7 +13,6 @@ import android.view.MotionEvent;
13 import android.view.SurfaceView; 13 import android.view.SurfaceView;
14 import android.view.View; 14 import android.view.View;
15 import android.view.ViewGroup; 15 import android.view.ViewGroup;
16 -import android.view.ViewParent;  
17 import android.webkit.ConsoleMessage; 16 import android.webkit.ConsoleMessage;
18 import android.webkit.JavascriptInterface; 17 import android.webkit.JavascriptInterface;
19 import android.webkit.WebChromeClient; 18 import android.webkit.WebChromeClient;
@@ -27,6 +26,7 @@ import android.widget.SeekBar; @@ -27,6 +26,7 @@ import android.widget.SeekBar;
27 import android.widget.TextView; 26 import android.widget.TextView;
28 27
29 import com.flyco.tablayout.SlidingTabLayout; 28 import com.flyco.tablayout.SlidingTabLayout;
  29 +import com.flyco.tablayout.listener.OnTabSelectListener;
30 import com.pili.pldroid.player.AVOptions; 30 import com.pili.pldroid.player.AVOptions;
31 import com.pili.pldroid.player.PLMediaPlayer; 31 import com.pili.pldroid.player.PLMediaPlayer;
32 import com.pili.pldroid.player.widget.PLVideoTextureView; 32 import com.pili.pldroid.player.widget.PLVideoTextureView;
@@ -159,7 +159,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -159,7 +159,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
159 159
160 mClassName = (TextView) v.findViewById(R.id.tv_classname); 160 mClassName = (TextView) v.findViewById(R.id.tv_classname);
161 mMediaContainer = (FrameLayout) v.findViewById(R.id.fl_media); 161 mMediaContainer = (FrameLayout) v.findViewById(R.id.fl_media);
162 - mMeadiaContrillerRight = (RelativeLayout) v.findViewById(R.id.rl_meadia_contriller_right); 162 + mMediaControllerRight = (RelativeLayout) v.findViewById(R.id.rl_meadia_contriller_right);
163 mPauseButton = (ImageButton) v.findViewById(R.id.iv_operation_play); 163 mPauseButton = (ImageButton) v.findViewById(R.id.iv_operation_play);
164 mPauseContainer = (RelativeLayout) v.findViewById(R.id.rl_operation_play); 164 mPauseContainer = (RelativeLayout) v.findViewById(R.id.rl_operation_play);
165 mEndTime = (TextView) v.findViewById(R.id.tv_end_time); 165 mEndTime = (TextView) v.findViewById(R.id.tv_end_time);
@@ -192,7 +192,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -192,7 +192,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
192 mPresenter.pauseAndStart(!pause); 192 mPresenter.pauseAndStart(!pause);
193 } 193 }
194 }); 194 });
195 - mMeadiaContrillerRight.setOnTouchListener(new View.OnTouchListener() { 195 + mMediaControllerRight.setOnTouchListener(new View.OnTouchListener() {
196 @Override 196 @Override
197 public boolean onTouch(View v, MotionEvent event) { 197 public boolean onTouch(View v, MotionEvent event) {
198 if (mPauseContainer != null) { 198 if (mPauseContainer != null) {
@@ -219,6 +219,21 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -219,6 +219,21 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
219 mAdapter = new HomeAdapter(getChildFragmentManager(), mFragments); 219 mAdapter = new HomeAdapter(getChildFragmentManager(), mFragments);
220 viewPager.setAdapter(mAdapter); 220 viewPager.setAdapter(mAdapter);
221 slidingTab.setViewPager(viewPager, titles); 221 slidingTab.setViewPager(viewPager, titles);
  222 + slidingTab.setOnTabSelectListener(new OnTabSelectListener() {
  223 + @Override
  224 + public void onTabSelect(int position) {
  225 + if (1 == position && replay) {
  226 + //为了避免回访时切换界面出现桌面 暂时先这样写了
  227 + showMediaContainer(TIME_OUT);
  228 + }
  229 + }
  230 +
  231 + @Override
  232 + public void onTabReselect(int position) {
  233 +
  234 + }
  235 + });
  236 +
222 } 237 }
223 } 238 }
224 239
@@ -298,7 +313,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -298,7 +313,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
298 // codec=AVOptions.MEDIA_CODEC_SW_DECODE, 软解 313 // codec=AVOptions.MEDIA_CODEC_SW_DECODE, 软解
299 // codec=AVOptions.MEDIA_CODEC_AUTO, 硬解优先,失败后自动切换到软解 314 // codec=AVOptions.MEDIA_CODEC_AUTO, 硬解优先,失败后自动切换到软解
300 // 默认值是:MEDIA_CODEC_SW_DECODE 315 // 默认值是:MEDIA_CODEC_SW_DECODE
301 - options.setInteger(AVOptions.KEY_MEDIACODEC, AVOptions.MEDIA_CODEC_HW_DECODE); 316 + options.setInteger(AVOptions.KEY_MEDIACODEC, AVOptions.MEDIA_CODEC_AUTO);
302 317
303 // 准备超时时间,包括创建资源、建立连接、请求码流等,单位是 ms 318 // 准备超时时间,包括创建资源、建立连接、请求码流等,单位是 ms
304 // 默认值是:无 319 // 默认值是:无
@@ -328,12 +343,12 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -328,12 +343,12 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
328 options.setInteger(AVOptions.KEY_MAX_CACHE_BUFFER_DURATION, 300); 343 options.setInteger(AVOptions.KEY_MAX_CACHE_BUFFER_DURATION, 300);
329 // 是否自动启动播放,如果设置为 1,则在调用 `prepareAsync` 或者 `setVideoPath` 之后自动启动播放,无需调用 `start()` 344 // 是否自动启动播放,如果设置为 1,则在调用 `prepareAsync` 或者 `setVideoPath` 之后自动启动播放,无需调用 `start()`
330 // 默认值是:1 345 // 默认值是:1
331 - options.setInteger(AVOptions.KEY_START_ON_PREPARED, 1); 346 + options.setInteger(AVOptions.KEY_START_ON_PREPARED, 0);
332 347
333 // 播放前最大探测流的字节数,单位是 byte 348 // 播放前最大探测流的字节数,单位是 byte
334 // 默认值是:128 * 1024 349 // 默认值是:128 * 1024
335 options.setInteger(AVOptions.KEY_PROBESIZE, 128 * 1024); 350 options.setInteger(AVOptions.KEY_PROBESIZE, 128 * 1024);
336 - options.setInteger(AVOptions.KEY_BUFFER_TIME, 100); 351 + options.setInteger(AVOptions.KEY_BUFFER_TIME, 300);
337 352
338 // 请在开始播放之前配置 353 // 请在开始播放之前配置
339 mVideoView.setAVOptions(options); 354 mVideoView.setAVOptions(options);
@@ -349,7 +364,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -349,7 +364,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
349 364
350 String doc = ResUtil.get().getString(R.string.home_doc); 365 String doc = ResUtil.get().getString(R.string.home_doc);
351 String chat = ResUtil.get().getString(R.string.home_chat); 366 String chat = ResUtil.get().getString(R.string.home_chat);
352 - docFragment = DocFragment.newInstance(); 367 + docFragment = DocFragment.newInstance(replay);
353 docFragment.setTitle(doc); 368 docFragment.setTitle(doc);
354 369
355 chatFragment = ChatFragment.newInstance(replay); 370 chatFragment = ChatFragment.newInstance(replay);
@@ -416,18 +431,6 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -416,18 +431,6 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
416 } 431 }
417 432
418 @Override 433 @Override
419 - public void addSurfaceView(SurfaceView surfaceview, boolean show) {  
420 - if (show) {  
421 - ViewParent parent = surfaceview.getParent();  
422 - if (parent == null) {  
423 - videoContainer.addView(surfaceview);  
424 - }  
425 - } else {  
426 - videoContainer.removeView(surfaceview);  
427 - }  
428 - }  
429 -  
430 - @Override  
431 public void playAudio(VideoEntity rtmpUrl) { 434 public void playAudio(VideoEntity rtmpUrl) {
432 initPic.setImageResource(R.mipmap.audio_mode); 435 initPic.setImageResource(R.mipmap.audio_mode);
433 initPic.setVisibility(View.VISIBLE); 436 initPic.setVisibility(View.VISIBLE);
@@ -441,12 +444,10 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -441,12 +444,10 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
441 } 444 }
442 445
443 mVideoView.setVideoPath(!replay ? rtmpUrl.getRtmpUrl() : rtmpUrl.getReplay()); 446 mVideoView.setVideoPath(!replay ? rtmpUrl.getRtmpUrl() : rtmpUrl.getReplay());
444 - mVideoView.start();  
445 - if (replay) {  
446 - mVideoView.seekTo(rtmpUrl.getSeek()); 447 + if (replay && rtmpUrl.getSeek() > 0) {
  448 + mVideoView.seekTo(rtmpUrl.getSeek() * 1000);
447 } 449 }
448 -  
449 - 450 + mVideoView.start();
450 } 451 }
451 } 452 }
452 453
@@ -468,7 +469,6 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -468,7 +469,6 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
468 initPic.setImageResource(R.mipmap.no_video); 469 initPic.setImageResource(R.mipmap.no_video);
469 initPic.setVisibility(View.VISIBLE); 470 initPic.setVisibility(View.VISIBLE);
470 if (!replay) { 471 if (!replay) {
471 -// addSurfaceView(surfaceView, false);  
472 mPresenter.close(); 472 mPresenter.close();
473 } else { 473 } else {
474 if (mPresenter.isVideoMode() && mVideoView != null) 474 if (mPresenter.isVideoMode() && mVideoView != null)
@@ -483,17 +483,15 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -483,17 +483,15 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
483 operationIcon.setImageResource(R.mipmap.video_close); 483 operationIcon.setImageResource(R.mipmap.video_close);
484 if (!replay) { 484 if (!replay) {
485 mPresenter.start(!replay ? rtmpUrl.getRtmpUrl() : rtmpUrl.getReplay()); 485 mPresenter.start(!replay ? rtmpUrl.getRtmpUrl() : rtmpUrl.getReplay());
486 -// SurfaceView surfaceView = mPresenter.getsSurfaceView();  
487 -// addSurfaceView(surfaceView, true);  
488 } else { 486 } else {
489 if (mVideoView.isPlaying()) { 487 if (mVideoView.isPlaying()) {
490 mVideoView.stopPlayback(); 488 mVideoView.stopPlayback();
491 } 489 }
492 mVideoView.setVideoPath(!replay ? rtmpUrl.getRtmpUrl() : rtmpUrl.getReplay()); 490 mVideoView.setVideoPath(!replay ? rtmpUrl.getRtmpUrl() : rtmpUrl.getReplay());
  491 + if (replay && rtmpUrl.getSeek() > 0) {
  492 + mVideoView.seekTo(rtmpUrl.getSeek() * 1000);
  493 + }
493 mVideoView.start(); 494 mVideoView.start();
494 -  
495 - if (replay)  
496 - mVideoView.seekTo(rtmpUrl.getSeek());  
497 } 495 }
498 } 496 }
499 497
@@ -632,8 +630,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live @@ -632,8 +630,7 @@ public class LiveFragment extends AppBaseFragment<LivePresenter> implements Live
632 private TextView mEndTime, mCurrentTime; 630 private TextView mEndTime, mCurrentTime;
633 private boolean mShowing; 631 private boolean mShowing;
634 private boolean mDragging; 632 private boolean mDragging;
635 - private RelativeLayout mMeadiaContrillerRight;  
636 - 633 + private RelativeLayout mMediaControllerRight;
637 634
638 @SuppressLint("HandlerLeak") 635 @SuppressLint("HandlerLeak")
639 private Handler mHandler = new Handler() { 636 private Handler mHandler = new Handler() {
@@ -92,13 +92,6 @@ public interface LiveContract { @@ -92,13 +92,6 @@ public interface LiveContract {
92 void showOperation(boolean b); 92 void showOperation(boolean b);
93 93
94 /** 94 /**
95 - * 添加surfaceview  
96 - * @param surfaceview  
97 - * @param show  
98 - */  
99 - void addSurfaceView(SurfaceView surfaceview, boolean show);  
100 -  
101 - /**  
102 * 刷新按钮 95 * 刷新按钮
103 */ 96 */
104 void updatePausePlay(); 97 void updatePausePlay();
@@ -312,8 +312,8 @@ public class LivePresenter extends BasePresenter<LiveContract.Model, LiveContrac @@ -312,8 +312,8 @@ public class LivePresenter extends BasePresenter<LiveContract.Model, LiveContrac
312 case Constants.RECORD_SEEK: 312 case Constants.RECORD_SEEK:
313 isOver = false; 313 isOver = false;
314 pause = false; 314 pause = false;
315 - int keyFrameSeek = jsonObject.optInt("keyFrameSeekTime");  
316 - mRootView.seek(keyFrameSeek); 315 +// int keyFrameSeek = jsonObject.optInt("keyFrameSeekTime");
  316 +// mRootView.seek(keyFrameSeek);
317 break; 317 break;
318 case Constants.RECORD_STOP: 318 case Constants.RECORD_STOP:
319 pause = true; 319 pause = true;
@@ -787,6 +787,7 @@ public class LivePresenter extends BasePresenter<LiveContract.Model, LiveContrac @@ -787,6 +787,7 @@ public class LivePresenter extends BasePresenter<LiveContract.Model, LiveContrac
787 787
788 public void seekRecordPlay(long b) { 788 public void seekRecordPlay(long b) {
789 chatView.clearChatHistory(); 789 chatView.clearChatHistory();
  790 + docView.clear();
790 mModel.seekRecordPlayback(b); 791 mModel.seekRecordPlayback(b);
791 } 792 }
792 793
@@ -59,6 +59,10 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -59,6 +59,10 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
59 private int screenWidth; 59 private int screenWidth;
60 private int currentTop; 60 private int currentTop;
61 private boolean adjust; 61 private boolean adjust;
  62 + /**
  63 + * 图片在拖动后的偏移量
  64 + */
  65 + private int currentOffsetY;
62 66
63 private void initRect() { 67 private void initRect() {
64 mCurrentMaxScale = Math.max( 68 mCurrentMaxScale = Math.max(
@@ -172,6 +176,11 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -172,6 +176,11 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
172 } 176 }
173 177
174 public void setBitmap(Bitmap b, boolean adjust) { 178 public void setBitmap(Bitmap b, boolean adjust) {
  179 + //重置数据
  180 + finalHeight = 0;
  181 + finalWidth = 0;
  182 + currentTop = 0;
  183 + currentOffsetY = 0;
175 this.adjust = adjust; 184 this.adjust = adjust;
176 if (b == null) { 185 if (b == null) {
177 return; 186 return;
@@ -182,8 +191,8 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -182,8 +191,8 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
182 || mImageWidth != mBitmap.getWidth()) { 191 || mImageWidth != mBitmap.getWidth()) {
183 mImageWidth = mBitmap.getWidth(); 192 mImageWidth = mBitmap.getWidth();
184 mImageHeight = mBitmap.getHeight(); 193 mImageHeight = mBitmap.getHeight();
185 - calcRect();  
186 } 194 }
  195 + calcRect();
187 drawSurface(); 196 drawSurface();
188 } 197 }
189 } 198 }
@@ -200,7 +209,10 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -200,7 +209,10 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
200 mCenterX -= offsetX; 209 mCenterX -= offsetX;
201 mCenterY -= offsetY; 210 mCenterY -= offsetY;
202 211
  212 +
203 if (adjust) { 213 if (adjust) {
  214 +
  215 +
204 if (finalHeight > mSurfaceHeight) { 216 if (finalHeight > mSurfaceHeight) {
205 int tempTop = mRectDes.top + offsetY; 217 int tempTop = mRectDes.top + offsetY;
206 218
@@ -244,7 +256,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -244,7 +256,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
244 } 256 }
245 257
246 private void adjustPath(int offsetY) { 258 private void adjustPath(int offsetY) {
247 - 259 + currentOffsetY += offsetY;
248 pathLists.clear(); 260 pathLists.clear();
249 historyPointer = 0; 261 historyPointer = 0;
250 //提取原始坐标点 262 //提取原始坐标点
@@ -327,6 +339,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -327,6 +339,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
327 synchronized (CanvasView.class) { 339 synchronized (CanvasView.class) {
328 mSurfaceHeight = height; 340 mSurfaceHeight = height;
329 mSurfaceWidth = width; 341 mSurfaceWidth = width;
  342 + currentOffsetY = 0;
330 calcRect(); 343 calcRect();
331 344
332 operatePoints.clear(); 345 operatePoints.clear();
@@ -436,7 +449,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -436,7 +449,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
436 this.setOnTouchListener(this); 449 this.setOnTouchListener(this);
437 // 设置背景为透明 否则是黑色 450 // 设置背景为透明 否则是黑色
438 this.setZOrderOnTop(true); 451 this.setZOrderOnTop(true);
439 - this.setZOrderMediaOverlay(true); 452 + // this.setZOrderMediaOverlay(true);
440 this.getHolder().setFormat(PixelFormat.TRANSLUCENT); 453 this.getHolder().setFormat(PixelFormat.TRANSLUCENT);
441 454
442 // this.pathLists.add(new Path()); 455 // this.pathLists.add(new Path());
@@ -513,6 +526,25 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -513,6 +526,25 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
513 int color = Color.parseColor(annotation.color); 526 int color = Color.parseColor(annotation.color);
514 setPaintFillColor(color); 527 setPaintFillColor(color);
515 copyArr(pointXies); 528 copyArr(pointXies);
  529 +// adjustPath(mRectDes.top);
  530 +
  531 +// for (int j = 0; j < pointXies.size(); j++) {
  532 +// PointGroupEntity pointGroupEntity = pointXies.get(j);
  533 +// Path path = this.getCurrentPath();
  534 +// float w2 = pointGroupEntity.w;
  535 +// float h2 = pointGroupEntity.h + (FLOAT_TYPE * mRectDes.top) / (FLOAT_TYPE * finalWidth) * 100f;
  536 +// pointGroupEntity.h = h2;
  537 +// path.lineTo(w2 / 100 * finalWidth, h2 / 100 * finalWidth);
  538 +// }
  539 +
  540 +
  541 + for (PointGroupEntity pointXy : pointXies) {
  542 + float w = pointXy.w;
  543 + float h = pointXy.h + (FLOAT_TYPE * currentOffsetY) / (FLOAT_TYPE * finalWidth) * 100f;
  544 + pointXy.h =h;
  545 + }
  546 +
  547 + //操作一下這個點
516 operatePoints.add(pointXies); 548 operatePoints.add(pointXies);
517 pathLists.add(createPath(pointXies.get(0).w / 100 * finalWidth, pointXies.get(0).h / 100 * finalWidth + currentTop)); 549 pathLists.add(createPath(pointXies.get(0).w / 100 * finalWidth, pointXies.get(0).h / 100 * finalWidth + currentTop));
518 paintLists.add(this.createPaint(color)); 550 paintLists.add(this.createPaint(color));
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent" 3 android:layout_width="match_parent"
4 android:layout_height="match_parent" 4 android:layout_height="match_parent"
  5 + android:id="@+id/ll_chat_fragment_parent"
5 android:background="@color/COLOR_EBEBEB" 6 android:background="@color/COLOR_EBEBEB"
6 android:orientation="vertical"> 7 android:orientation="vertical">
7 8
@@ -13,13 +13,13 @@ @@ -13,13 +13,13 @@
13 style="@style/home_site_input_style" 13 style="@style/home_site_input_style"
14 android:layout_marginTop="@dimen/ui_DIMEN_20.0PX"> 14 android:layout_marginTop="@dimen/ui_DIMEN_20.0PX">
15 15
16 - <!-- 709902904 472732494 --> 16 + <!-- 709902904 472732494 2067973545-->
17 <android.support.v7.widget.AppCompatEditText 17 <android.support.v7.widget.AppCompatEditText
18 android:id="@+id/acet_classid" 18 android:id="@+id/acet_classid"
19 style="@style/ui_match_wrap" 19 style="@style/ui_match_wrap"
20 android:hint="@string/home_classid_hint" 20 android:hint="@string/home_classid_hint"
21 android:inputType="number" 21 android:inputType="number"
22 - android:text="472732494"/> 22 + android:text="2067973545"/>
23 </android.support.design.widget.TextInputLayout> 23 </android.support.design.widget.TextInputLayout>
24 24
25 <android.support.design.widget.TextInputLayout 25 <android.support.design.widget.TextInputLayout
@@ -356,4 +356,9 @@ public static java.lang.String TABLENAME; @@ -356,4 +356,9 @@ public static java.lang.String TABLENAME;
356 -keep class com.pili.pldroid.player.** { *; } 356 -keep class com.pili.pldroid.player.** { *; }
357 -keep class tv.danmaku.ijk.media.player.** {*;} 357 -keep class tv.danmaku.ijk.media.player.** {*;}
358 358
359 --keep class com.daniulive.smartplayer.**{*;}  
  359 +-keep class com.daniulive.smartplayer.**{*;}
  360 +
  361 +-keep class com.eventhandle.**{*;}
  362 +-keep class com.ntjbase.**{*;}
  363 +-keep class com.videoengine.**{*;}
  364 +-keep class com.voiceengine.**{*;}
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:android="http://schemas.android.com/apk/res/android"
4 xmlns:tools="http://schemas.android.com/tools" 4 xmlns:tools="http://schemas.android.com/tools"
5 android:layout_width="match_parent" 5 android:layout_width="match_parent"
  6 + android:background="@color/home_background"
6 android:layout_height="match_parent" 7 android:layout_height="match_parent"
7 tools:context="com.xdy.componentpractice.MainActivity"> 8 tools:context="com.xdy.componentpractice.MainActivity">
8 9