As you can check here https://hyperaud.io/lab/pbr-test/ with any browser except Safari you can modify plabackRate without video playing interruptions.
In Safari seems every time you modify playbackrate video is rebuferring (making a 0.5 seconds pause)
I would change video.playbackRate every 50ms to show a ramped slow motion or progressive slow motion of the video.
This javascript code does the job, but, unfortunately is not working in Safari (iOS or MacOS)
var rint=null;
function iniramp(){
//pt is the central time point where make the ramped slow motion
var sr=pt-1.5,er=pt+1.5;
if(sr<0)sr=0;
//et is end time of video
if(er>et)er=et;
video.currentTime=sr;
video.playbackRate=0.98;
rint=setInterval(function(){doramp(sr,er)},50);
if (video.paused) video.play();
}
function doramp(sr,er){
var p,step=0.02,pbr=video.playbackRate,minrate=0.25,ct=parseFloat(video.currentTime);
if (pbr<0.5)step=0.01;
if (ct<pt){
p=pbr-step;
if(p<minrate)p=minrate;
} else {
p=pbr+step;
if(p>1)p=1;
if (ct>er){endramp();iniramp();return false;}
}
video.playbackRate=p;
}
Any ideas for Safari?