![](https://secure.gravatar.com/avatar/2f5ef2cfee8f7bc525ee75eec7953893?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
Ad insertion causes buffering
We're using ID3 tags to trigger client side ad insertion via VAST/DFP. The ads are mid roll video ads that we insert into a live HLS stream. We are seeing some unexpected buffering both before and after an ad plays as follows. This is happening with JWplayer 7 in Chrome.
1: Just before the ad starts playing a spinning wheel appears on the screen for a split second. This is surprising because the player is holding 30 seconds of HLS segments so it should just keep rendering it until the video ad has been loaded. Why the spinning wheel?
2: Once the ad is completed and the live stream resumes we see more buffering. I used the browser dev tools to capture the packet flow, and a condensed version is included below. As you can see JWplayer continues to retrieve the chunk list while the ad is playing, so it’s well positioned to resume loading media segments once the ad is complete. But instead of resuming it abandons and starts over by requesting the play list. Why?
4:24:59 PM Get chunklist
4:24:59 PM Get segment 451
4:25:01 PM Ad starts
4:25:05 PM Get chunklist
4:25:11 PM Get chunklist
4:25:17 PM Get chunklist
4:25:20 PM Ad stops
4:25:20 PM Get playlist
4:25:21 PM Get chunklist
4:25:21 PM Get segment 455