Skip to content

Commit

Permalink
TimeAction에 대한 임시 처리
Browse files Browse the repository at this point in the history
현재 TimeAction을 공유하여 Link시 Action이 꼬임
이후 MotionPlayer별 TimeAction이 별도로 적용될수 있도록 수정해야함
  • Loading branch information
muabe committed Mar 23, 2020
1 parent f35c92b commit fb9e85f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions test/src/main/java/com/markjmind/test/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,15 @@ public void onTimeAction() {
clothes_btn.setVisibility(View.VISIBLE);
}
});

player.addTimeAction(10*1000000, new TimeAction.OnTimeActionListener() {
boolean isPhoneAction = false;
@Override
public void onTimeAction() {
Toast.makeText(MainActivity.this, "핸드폰을 클릭해 보세요", Toast.LENGTH_SHORT).show();
phone_link.setVisibility(View.VISIBLE);
if(!isPhoneAction) {
isPhoneAction = true;
Toast.makeText(MainActivity.this, "핸드폰을 클릭해 보세요", Toast.LENGTH_SHORT).show();
phone_link.setVisibility(View.VISIBLE);
}
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public void removeAction(long time){
public void onVideoFrameAboutToBeRendered(long presentationTimeUs, long releaseTimeNs, Format format, @Nullable MediaFormat mediaFormat) {
timeAction.action(preTime, presentationTimeUs);
preTime = presentationTimeUs;
// Log.e("ddd","time save:"+preTime);
}

/**************************************Asset 관련**********************************************/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void removeAction(long time){
}
}
if(remove != null){
Log.e("dddd","!@@!!!!!!!!!!!!!!!!!!!!!!!!#$#$#$#$#$");
infos.remove(remove);
}
}
Expand All @@ -48,6 +47,7 @@ void action(long preTime, long currTime){
if(infos != null) {
for (ActionInfo info : infos) {
if(preTime < info.time && info.time <= currTime){
Log.e("ddd","pre:"+preTime+" curr:"+currTime);
handler.post(info);
}
}
Expand Down

0 comments on commit fb9e85f

Please sign in to comment.