正在显示
5 个修改的文件
包含
13 行增加
和
10 行删除
@@ -54,7 +54,7 @@ public class XdySdk implements SubjectListener { | @@ -54,7 +54,7 @@ public class XdySdk implements SubjectListener { | ||
54 | 54 | ||
55 | public static String TAG="xdysdk"; | 55 | public static String TAG="xdysdk"; |
56 | /*当前播放视频的id*/ | 56 | /*当前播放视频的id*/ |
57 | - private String currentPlayId=""; | 57 | + private static String currentPlayId=""; |
58 | /*缓存管理*/ | 58 | /*缓存管理*/ |
59 | private static ACache aCache; | 59 | private static ACache aCache; |
60 | private SurfaceView mSurfaceView_Publish; | 60 | private SurfaceView mSurfaceView_Publish; |
@@ -581,6 +581,7 @@ public class XdySdk implements SubjectListener { | @@ -581,6 +581,7 @@ public class XdySdk implements SubjectListener { | ||
581 | isCurrentVideoHost=false; | 581 | isCurrentVideoHost=false; |
582 | isCurrentAudioHost=false; | 582 | isCurrentAudioHost=false; |
583 | onPublisherStop(); | 583 | onPublisherStop(); |
584 | + currentPlayId=""; | ||
584 | } | 585 | } |
585 | 586 | ||
586 | /** | 587 | /** |
@@ -675,7 +676,7 @@ public class XdySdk implements SubjectListener { | @@ -675,7 +676,7 @@ public class XdySdk implements SubjectListener { | ||
675 | break; | 676 | break; |
676 | case EVENTID.EVENT_DANIULIVE_ERC_PLAYER_STOP: | 677 | case EVENTID.EVENT_DANIULIVE_ERC_PLAYER_STOP: |
677 | Log.i(TAG, "关闭。。"); | 678 | Log.i(TAG, "关闭。。"); |
678 | - notifyObserver("play_stop",currentPlayId+""); | 679 | +// notifyObserver("play_stop",currentPlayId+""); |
679 | break; | 680 | break; |
680 | case EVENTID.EVENT_DANIULIVE_ERC_PLAYER_RESOLUTION_INFO: | 681 | case EVENTID.EVENT_DANIULIVE_ERC_PLAYER_RESOLUTION_INFO: |
681 | Log.e(TAG, "分辨率信息: width: " + param1 + ", height: " + param2); | 682 | Log.e(TAG, "分辨率信息: width: " + param1 + ", height: " + param2); |
@@ -189,7 +189,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -189,7 +189,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
189 | seek = jsonObject.optLong("recordPlaybackMaxTime"); | 189 | seek = jsonObject.optLong("recordPlaybackMaxTime"); |
190 | className = jsonObject.optString("className"); | 190 | className = jsonObject.optString("className"); |
191 | classType = jsonObject.optInt("classType"); | 191 | classType = jsonObject.optInt("classType"); |
192 | - XdyLogUtil.i("课堂类型", "" + classType); | ||
193 | 192 | ||
194 | } catch (JSONException e) { | 193 | } catch (JSONException e) { |
195 | e.printStackTrace(); | 194 | e.printStackTrace(); |
@@ -224,7 +223,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -224,7 +223,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
224 | //停止播放 | 223 | //停止播放 |
225 | case Constants.AUDIO_STOP: | 224 | case Constants.AUDIO_STOP: |
226 | //停止播放 | 225 | //停止播放 |
227 | - playVideoOrAudioId = ""; | ||
228 | stopPlay(responseEntity.getParam()); | 226 | stopPlay(responseEntity.getParam()); |
229 | break; | 227 | break; |
230 | case Constants.PLAY_SUCCESS: | 228 | case Constants.PLAY_SUCCESS: |
@@ -516,7 +514,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -516,7 +514,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
516 | // if (!checkPermissionVideo()) { | 514 | // if (!checkPermissionVideo()) { |
517 | // return; | 515 | // return; |
518 | // } | 516 | // } |
519 | - | 517 | + playVideoOrAudioId=response; |
520 | DisplayMetrics dm = new DisplayMetrics(); | 518 | DisplayMetrics dm = new DisplayMetrics(); |
521 | getWindowManager().getDefaultDisplay().getMetrics(dm); | 519 | getWindowManager().getDefaultDisplay().getMetrics(dm); |
522 | int widthPixels = dm.widthPixels; | 520 | int widthPixels = dm.widthPixels; |
@@ -550,12 +548,13 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -550,12 +548,13 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
550 | // XdyLogUtil.e("surface 设置后的高度的高度计算:", surfaceviewPlayVideo.getWidth() + "高:" + surfaceviewPlayVideo.getHeight()); | 548 | // XdyLogUtil.e("surface 设置后的高度的高度计算:", surfaceviewPlayVideo.getWidth() + "高:" + surfaceviewPlayVideo.getHeight()); |
551 | // | 549 | // |
552 | // } | 550 | // } |
553 | - xdySdk.api("playVideo", response + "", surfaceviewPlayVideo, VideoPlayActivity.this); | 551 | + xdySdk.api(Constants.PLAY_VIDEO, response + "", surfaceviewPlayVideo, VideoPlayActivity.this); |
554 | // img_playVideo_novideo.setVisibility(View.GONE); | 552 | // img_playVideo_novideo.setVisibility(View.GONE); |
555 | if(isTablet(this)) { | 553 | if(isTablet(this)) { |
556 | setTabletTeacherCover(true,false); | 554 | setTabletTeacherCover(true,false); |
557 | }else { | 555 | }else { |
558 | img_playVideo_novideo.setImageResource(R.mipmap.no_video); | 556 | img_playVideo_novideo.setImageResource(R.mipmap.no_video); |
557 | +// img_playVideo_novideo.setVisibility(View.GONE); | ||
559 | } | 558 | } |
560 | //// TODO: 2017/5/18 tihsi | 559 | //// TODO: 2017/5/18 tihsi |
561 | // ToastUtil.showToastshort(getResources().getString(R.string.home_msg_play_video_init), VideoPlayActivity.this); | 560 | // ToastUtil.showToastshort(getResources().getString(R.string.home_msg_play_video_init), VideoPlayActivity.this); |
@@ -730,6 +729,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -730,6 +729,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
730 | protected void onPause() { | 729 | protected void onPause() { |
731 | super.onPause(); | 730 | super.onPause(); |
732 | xdySdk.onPlayStop(playVideoOrAudioId); | 731 | xdySdk.onPlayStop(playVideoOrAudioId); |
732 | +// xdySdk.onPlayDestroy(); | ||
733 | if (isPlayVideoMode) { | 733 | if (isPlayVideoMode) { |
734 | stopVideo(); | 734 | stopVideo(); |
735 | } else { | 735 | } else { |
@@ -744,6 +744,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -744,6 +744,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
744 | @Override | 744 | @Override |
745 | protected void onResume() { | 745 | protected void onResume() { |
746 | super.onResume(); | 746 | super.onResume(); |
747 | + XdyLogUtil.e("cuowu",""+isPlayVideoMode+playVideoOrAudioId); | ||
747 | if (isPlayVideoMode) { | 748 | if (isPlayVideoMode) { |
748 | if (!TextUtils.isEmpty(playVideoOrAudioId)) | 749 | if (!TextUtils.isEmpty(playVideoOrAudioId)) |
749 | playVideo(playVideoOrAudioId); | 750 | playVideo(playVideoOrAudioId); |
@@ -778,7 +779,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -778,7 +779,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
778 | if (!replay) { | 779 | if (!replay) { |
779 | xdySdk.removeAll(); | 780 | xdySdk.removeAll(); |
780 | } | 781 | } |
781 | - | 782 | +// playVideoOrAudioId=""; |
782 | mmHandler.removeCallbacksAndMessages(null); | 783 | mmHandler.removeCallbacksAndMessages(null); |
783 | mHandler.removeCallbacksAndMessages(null); | 784 | mHandler.removeCallbacksAndMessages(null); |
784 | this.finish(); | 785 | this.finish(); |
@@ -828,6 +829,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | @@ -828,6 +829,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe | ||
828 | VideoOrAudioStopEntity entity = JsonUtil.parseJsonToBean(response, VideoOrAudioStopEntity.class); | 829 | VideoOrAudioStopEntity entity = JsonUtil.parseJsonToBean(response, VideoOrAudioStopEntity.class); |
829 | if (entity != null) { | 830 | if (entity != null) { |
830 | if (xdySdk.onPlayStop(entity.getMediaId() + "")) { | 831 | if (xdySdk.onPlayStop(entity.getMediaId() + "")) { |
832 | + playVideoOrAudioId = ""; | ||
831 | if(isTablet(this)){ | 833 | if(isTablet(this)){ |
832 | setTabletTeacherCover(true,false); | 834 | setTabletTeacherCover(true,false); |
833 | }else { | 835 | }else { |
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | style="@style/home_input_edit_style" | 44 | style="@style/home_input_edit_style" |
45 | android:hint="classId" | 45 | android:hint="classId" |
46 | android:inputType="number" | 46 | android:inputType="number" |
47 | - android:text="700798979"/> | 47 | + android:text="1823431320"/> |
48 | 48 | ||
49 | <View | 49 | <View |
50 | style="@style/ui_divider_line_horizontal" | 50 | style="@style/ui_divider_line_horizontal" |
@@ -23,8 +23,8 @@ | @@ -23,8 +23,8 @@ | ||
23 | /> | 23 | /> |
24 | <ImageView | 24 | <ImageView |
25 | android:id="@+id/img_playVideo_novideo" | 25 | android:id="@+id/img_playVideo_novideo" |
26 | - android:layout_width="match_parent" | ||
27 | - android:layout_height="match_parent" | 26 | + android:layout_width="20dp" |
27 | + android:layout_height="20dp" | ||
28 | android:scaleType="fitXY" | 28 | android:scaleType="fitXY" |
29 | android:background="@mipmap/no_video" | 29 | android:background="@mipmap/no_video" |
30 | /> | 30 | /> |
This file is too large to display.
-
请 注册 或 登录 后发表评论