Skip to content

Commit

Permalink
Subtitle: separate multiple conversation vertically.
Browse files Browse the repository at this point in the history
- Fix seeking progress
  • Loading branch information
amarullz committed May 30, 2024
1 parent ccd4140 commit 451b7c0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions app/src/main/assets/view/m.css
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,13 @@ c.loader {
display: inline !important;
}

#vtt_subtitle .vtt_obj span:not(:last-child):first-child{
position:fixed;
top:1vw;
left:1vw;
right:1vw;
}

.vtt_style_full_opacity .vtt_obj{
opacity: 1;
}
Expand Down
14 changes: 10 additions & 4 deletions app/src/main/assets/view/m.js
Original file line number Diff line number Diff line change
Expand Up @@ -4876,7 +4876,7 @@ const vtt={
s+=i+';';
var vt=vtt.getobj(o[i]);
if (vt){
v.push(vt);
v.push('<span>'+vt+'</span>');
}
}
else if (p<o[i].ts){
Expand Down Expand Up @@ -6242,8 +6242,9 @@ const pb={
}
else if (c=='seek'){
pb.vid_stat.pos=v<0?0:v;
pb.track_update_pos();
_API.videoSeek(pb.vid_stat.pos);
_API.videoPost('seek',v);
_API.videoPost('seek',pb.vid_stat.pos);
}
else{
_API.videoPost(c,v);
Expand Down Expand Up @@ -8348,12 +8349,17 @@ const pb={
track_keycb:function(g,c){
if (c==KLEFT||c==KRIGHT){
var fw=(_API.last_key_source==1&&c==KLEFT)||(_API.last_key_source!=1&&c==KRIGHT);
var sv=0;
if (fw)
pb.vid_cmd('seek',pb.vid_get_time().position+pb.cfg_data.seekvalue);
sv=pb.vid_get_time().position+pb.cfg_data.seekvalue;
else{
pb.vid_cmd('seek',pb.vid_get_time().position-pb.cfg_data.seekvalue);
sv=pb.vid_get_time().position-pb.cfg_data.seekvalue;
vtt.set('');
}
if (sv<0){
sv=0;
}
pb.vid_cmd('seek',sv);
pb.track_update_pos();
if (!pb.pb.classList.contains('menushow')){
var vi=(fw)?'fast_forward':'fast_rewind';
Expand Down

0 comments on commit 451b7c0

Please sign in to comment.