implement pause and seek
This commit is contained in:
@@ -39,6 +39,15 @@ impl<'a> PlayerWorker<'a>{
|
||||
}
|
||||
pub fn send(&mut self,ins:TimedInstruction<Instruction,SessionTime>){
|
||||
match ins.instruction{
|
||||
Instruction::SessionControl(SessionControlInstruction::SetPaused(paused))=>{
|
||||
self.playback_head.set_paused(ins.time,paused);
|
||||
},
|
||||
Instruction::SessionControl(SessionControlInstruction::SkipForward)=>{
|
||||
self.playback_head.seek_forward(SessionTime::from_secs(5));
|
||||
},
|
||||
Instruction::SessionControl(SessionControlInstruction::SkipBack)=>{
|
||||
self.playback_head.seek_backward(SessionTime::from_secs(5));
|
||||
},
|
||||
Instruction::SessionControl(session_control_instruction)=>{},
|
||||
Instruction::Render=>if let Some(bot)=&self.bot{
|
||||
self.playback_head.advance_time(bot,ins.time);
|
||||
|
||||
Reference in New Issue
Block a user