Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
huangxinbao
/
Android_Sdk
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
huangxinbao
2017-05-19 20:10:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
445a252d89df9a309afaefe7fe75ec32ec759650
445a252d
1 parent
3b2ce008
Restore the backstage playback without video
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
15 行增加
和
12 行删除
MyApplication/xdy/src/main/java/com/mang/xdy/core/XdySdk.java
MyApplication/xuedianyun/src/main/java/com/mang/xuedianyun/android/activity/VideoPlayActivity.java
MyApplication/xuedianyun/src/main/res/layout/activity_main.xml
MyApplication/xuedianyun/src/main/res/layout/activity_video_play.xml
release/xuedianyun201705191.apk → release/xuedianyun_201705193.apk
MyApplication/xdy/src/main/java/com/mang/xdy/core/XdySdk.java
查看文件 @
445a252
...
...
@@ -54,7 +54,7 @@ public class XdySdk implements SubjectListener {
public
static
String
TAG
=
"xdysdk"
;
/*当前播放视频的id*/
private
String
currentPlayId
=
""
;
private
static
String
currentPlayId
=
""
;
/*缓存管理*/
private
static
ACache
aCache
;
private
SurfaceView
mSurfaceView_Publish
;
...
...
@@ -371,7 +371,7 @@ public class XdySdk implements SubjectListener {
mXdyPublisher
.
publisher
(
video_url
,
mSurfaceView_Publish
,
new
EventHande_Publish
());
// PlayerUtils.setPublishSendSuccessVideo(aCache.getAsString(Constants.GET_VIDEO_PUBLISH_PATH));
//// TODO: 2017/4/13 大牛连接成功回调没有监听到 暂时在这告知后台,(后续加上网路判断,摄像头判断)
setPublishSendSuccessVideo
(
video_url
);
setPublishSendSuccessVideo
(
video_url
);
}
else
{
mMsgManage
.
getPublishVideoPathError
();
}
...
...
@@ -581,6 +581,7 @@ public class XdySdk implements SubjectListener {
isCurrentVideoHost
=
false
;
isCurrentAudioHost
=
false
;
onPublisherStop
();
currentPlayId
=
""
;
}
/**
...
...
@@ -675,7 +676,7 @@ public class XdySdk implements SubjectListener {
break
;
case
EVENTID
.
EVENT_DANIULIVE_ERC_PLAYER_STOP
:
Log
.
i
(
TAG
,
"关闭。。"
);
notifyObserver
(
"play_stop"
,
currentPlayId
+
""
);
//
notifyObserver("play_stop",currentPlayId+"");
break
;
case
EVENTID
.
EVENT_DANIULIVE_ERC_PLAYER_RESOLUTION_INFO
:
Log
.
e
(
TAG
,
"分辨率信息: width: "
+
param1
+
", height: "
+
param2
);
...
...
MyApplication/xuedianyun/src/main/java/com/mang/xuedianyun/android/activity/VideoPlayActivity.java
查看文件 @
445a252
...
...
@@ -130,7 +130,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
private
LoginDialog
mLoginDialog
;
private
ProgressDialog
mProgressDialog
;
private
String
playVideoOrAudioId
=
""
;
private
String
playVideoOrAudioId
=
""
;
//播放视频模式还是音频模式
private
boolean
isPlayVideoMode
=
true
;
/*推流视频模式还是音频模式*/
...
...
@@ -189,7 +189,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
seek
=
jsonObject
.
optLong
(
"recordPlaybackMaxTime"
);
className
=
jsonObject
.
optString
(
"className"
);
classType
=
jsonObject
.
optInt
(
"classType"
);
XdyLogUtil
.
i
(
"课堂类型"
,
""
+
classType
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
...
...
@@ -224,7 +223,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
//停止播放
case
Constants
.
AUDIO_STOP
:
//停止播放
playVideoOrAudioId
=
""
;
stopPlay
(
responseEntity
.
getParam
());
break
;
case
Constants
.
PLAY_SUCCESS
:
...
...
@@ -516,7 +514,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
// if (!checkPermissionVideo()) {
// return;
// }
playVideoOrAudioId
=
response
;
DisplayMetrics
dm
=
new
DisplayMetrics
();
getWindowManager
().
getDefaultDisplay
().
getMetrics
(
dm
);
int
widthPixels
=
dm
.
widthPixels
;
...
...
@@ -550,12 +548,13 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
// XdyLogUtil.e("surface 设置后的高度的高度计算:", surfaceviewPlayVideo.getWidth() + "高:" + surfaceviewPlayVideo.getHeight());
//
// }
xdySdk
.
api
(
"playVideo"
,
response
+
""
,
surfaceviewPlayVideo
,
VideoPlayActivity
.
this
);
xdySdk
.
api
(
Constants
.
PLAY_VIDEO
,
response
+
""
,
surfaceviewPlayVideo
,
VideoPlayActivity
.
this
);
// img_playVideo_novideo.setVisibility(View.GONE);
if
(
isTablet
(
this
))
{
setTabletTeacherCover
(
true
,
false
);
}
else
{
img_playVideo_novideo
.
setImageResource
(
R
.
mipmap
.
no_video
);
// img_playVideo_novideo.setVisibility(View.GONE);
}
//// TODO: 2017/5/18 tihsi
// ToastUtil.showToastshort(getResources().getString(R.string.home_msg_play_video_init), VideoPlayActivity.this);
...
...
@@ -730,6 +729,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
protected
void
onPause
()
{
super
.
onPause
();
xdySdk
.
onPlayStop
(
playVideoOrAudioId
);
// xdySdk.onPlayDestroy();
if
(
isPlayVideoMode
)
{
stopVideo
();
}
else
{
...
...
@@ -744,6 +744,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
@Override
protected
void
onResume
()
{
super
.
onResume
();
XdyLogUtil
.
e
(
"cuowu"
,
""
+
isPlayVideoMode
+
playVideoOrAudioId
);
if
(
isPlayVideoMode
)
{
if
(!
TextUtils
.
isEmpty
(
playVideoOrAudioId
))
playVideo
(
playVideoOrAudioId
);
...
...
@@ -778,7 +779,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
if
(!
replay
)
{
xdySdk
.
removeAll
();
}
// playVideoOrAudioId="";
mmHandler
.
removeCallbacksAndMessages
(
null
);
mHandler
.
removeCallbacksAndMessages
(
null
);
this
.
finish
();
...
...
@@ -828,6 +829,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
VideoOrAudioStopEntity
entity
=
JsonUtil
.
parseJsonToBean
(
response
,
VideoOrAudioStopEntity
.
class
);
if
(
entity
!=
null
)
{
if
(
xdySdk
.
onPlayStop
(
entity
.
getMediaId
()
+
""
))
{
playVideoOrAudioId
=
""
;
if
(
isTablet
(
this
)){
setTabletTeacherCover
(
true
,
false
);
}
else
{
...
...
MyApplication/xuedianyun/src/main/res/layout/activity_main.xml
查看文件 @
445a252
...
...
@@ -44,7 +44,7 @@
style=
"@style/home_input_edit_style"
android:hint=
"classId"
android:inputType=
"number"
android:text=
"
700798979
"
/>
android:text=
"
1823431320
"
/>
<View
style=
"@style/ui_divider_line_horizontal"
...
...
MyApplication/xuedianyun/src/main/res/layout/activity_video_play.xml
查看文件 @
445a252
...
...
@@ -23,8 +23,8 @@
/>
<ImageView
android:id=
"@+id/img_playVideo_novideo"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:scaleType=
"fitXY"
android:background=
"@mipmap/no_video"
/>
...
...
release/xuedianyun
201705191
.apk → release/xuedianyun
_201705193
.apk
查看文件 @
445a252
This file is too large to display.
请
注册
或
登录
后发表评论