|
|
|
@ -101,8 +101,8 @@ public class WebViewActivity extends BaseActivity { |
|
|
|
static final int TYPE_GO_SAVESCREEN = 300;//导视通知跳转屏保
|
|
|
|
static final int TYPE_HINT_PASSWORD = 3;//隐藏密码输入框
|
|
|
|
static final int TYPE_START_SERVER = 4;//重新启动web服务
|
|
|
|
//static String HtmlUrl = "http://127.0.0.1:8080/index.html";//webServer服务地址 http://192.168.1.218:5173/
|
|
|
|
static String HtmlUrl = "http://192.168.1.196:5173/"; |
|
|
|
static String HtmlUrl = "http://127.0.0.1:8080/index.html";//webServer服务地址 http://192.168.1.218:5173/
|
|
|
|
//static String HtmlUrl = "http://192.168.1.196:5173/";
|
|
|
|
int time = 0; |
|
|
|
private VideoView currentVideo; |
|
|
|
private SocketClient localSocketClient; |
|
|
|
@ -368,15 +368,11 @@ public class WebViewActivity extends BaseActivity { |
|
|
|
|
|
|
|
//切换视频状态
|
|
|
|
private void changeVideoAfter(){ |
|
|
|
try{ |
|
|
|
if("".equals(videoAfter)){ //新状态正常
|
|
|
|
changeVideo("back"); |
|
|
|
}else{ //新状态彩蛋
|
|
|
|
changeVideo("to"); |
|
|
|
} |
|
|
|
}catch (Exception e){ |
|
|
|
LoggerUtil.e("ERROR: ",e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//切换视频
|
|
|
|
@ -384,21 +380,48 @@ public class WebViewActivity extends BaseActivity { |
|
|
|
LoggerUtil.e("changeVideo", type); |
|
|
|
VideoView nextVideo; |
|
|
|
currentVideo.clearAnimation(); |
|
|
|
if("bg".equals(type.trim())){ |
|
|
|
if(currentVideo == binding.bgVideo){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = binding.bgVideo; |
|
|
|
}else if("answer".equals(type.trim())){ |
|
|
|
if(currentVideo == binding.speekVideo){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = binding.speekVideo; |
|
|
|
}else{ |
|
|
|
if(currentVideo == binding.helloVideo){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = binding.helloVideo; |
|
|
|
switch(type.trim()){ |
|
|
|
case "back" : |
|
|
|
if(currentVideo == binding.backVideo){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = binding.backVideo; |
|
|
|
break; |
|
|
|
case "to" : |
|
|
|
if(currentVideo == binding.toVideo){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = binding.toVideo; |
|
|
|
break; |
|
|
|
case "bg" : |
|
|
|
if(currentVideo == binding.bgVideo && "".equals(videoAfter)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
if(currentVideo == binding.bgVideo1 && "1".equals(videoAfter)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = "".equals(videoAfter) ? binding.bgVideo : binding.bgVideo1; |
|
|
|
break; |
|
|
|
case "answer" : |
|
|
|
if(currentVideo == binding.speekVideo && "".equals(videoAfter)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
if(currentVideo == binding.speekVideo1 && "1".equals(videoAfter)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = "".equals(videoAfter) ? binding.speekVideo : binding.speekVideo1; |
|
|
|
break; |
|
|
|
case "hello" : |
|
|
|
if(currentVideo == binding.helloVideo && "".equals(videoAfter)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
if(currentVideo == binding.helloVideo1 && "1".equals(videoAfter)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
nextVideo = "".equals(videoAfter) ? binding.helloVideo : binding.helloVideo1; |
|
|
|
break; |
|
|
|
default: |
|
|
|
nextVideo = "".equals(videoAfter) ? binding.bgVideo : binding.bgVideo1; |
|
|
|
} |
|
|
|
|
|
|
|
// 新视频淡入动画
|
|
|
|
|