Can't Able to Get Video Tracks from Avurlasset for Hls Videos(.M3U8 Format) for Avplayer

AVPlayerItem with hls url can't step forward/backward

If your player's item doesn't support stepping backward/forward you can simply use
seek method of AVPlayer for this purpose e.g.:

// Step forward for 1 sec
player.seek(to: CMTime(seconds: player.currentTime().seconds + 1, preferredTimescale: CMTimeScale(NSEC_PER_SEC)))

AVMutableComposition goes silent every once in a while

For future AVMutableComposition lovers, I found the solution. You needed to add a boolean to your asset options, like so:

let asset = AVURLAsset(url: audioURL, options: [AVURLAssetPreferPreciseDurationAndTimingKey: true])


Related Topics



Leave a reply



Submit