AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://OvenMediaEngine.com/ome
GNU Affero General Public License v3.0
2.53k stars 1.06k forks source link

A way to know when a manifest is available and playable #305

Closed Reilaen closed 3 years ago

Reilaen commented 3 years ago

I stream to OME via RTMP from my program and send a signal to my player that the stream started and it should load and play the manifest of the started stream.

My problem is that when i let my player load right after the stream starts the manifest isn't available.

I tried to use the API's current stream statistic to let the player load when the statistics returns a status of 200. That solved atleast trying to access a file that didn't exist yet. But i found out, that the manifest is empty at that point.

So for my purpose it would be nice to have some way to know when a manifest is available and playable.

dimiden commented 3 years ago

@Reilaen If you make a HTTP request while DASH/HLS segment is being created, 202 Accepted will be responsed. When OvenPlayer receives 202 status code, it retries the request so that the user can wait until manifest is created.

This is a non-standard one, so I will improve it if there is a better way.

Reilaen commented 3 years ago

Thank you for your reply, that is a good tip. I use VideoJS, but i will lookout for that 202 and use a retry to solve the issue.