I have a .m3u8 file to stream using Videogular 2 and I want to have a start time that is a few seconds into the video, it works fine with mp4 but not with hls when I use vgAPI seekTime() function
VIEW
<vg-player *ngIf="videoreveal && gameOpen != 'open'" (onPlayerReady)="onPlayerReady($event)">
<video #myMedia
[vgHls]="videoreveal"
id="singleVideo"
type="video/mp4"
crossorigin
poster="assets/imgs/bg_live.png"
playsinline
webkit-playsinline="webkit-playsinline"
autoplay>
</video>
</vg-player>
CONTROLLER
onPlayerReady(api: VgAPI) {
let d = new Date();
let mins = d.getMinutes();
let secs = d.getSeconds();
let startSecs = parseInt(this.startMin) * 60;
let currentSeconds = secs + (mins * 60);
let timeDiff = currentSeconds - startSecs;
//console.log('time start seconds ' + startSecs);
//console.log('time seconds ' + currentSeconds);
//console.log('time delay ' + timeDiff);
if( mins < this.endMins)
{
api.seekTime(timeDiff);
}
}