Search code examples
video-streaminghtml5-videomedia-sourceadaptive-bitrate

Which of these values can be detected in Media Source Extensions


I am trying to detect following information about the stream in Media Source Extensions

  • Audio/Video Bitrate
  • Bandwidth
  • IP address of the stream
  • Stream information like format

I have been reading the documentations but I could not find any direct references to these. Is it possible to extract these information?


Solution

    • Bandwidth: you have to infer it from the client, measuring how long it takes to download packets of known size (you can get the size from the headers as well) as do some simple math.
    • Audio/Video Bitrate & Stream information like format: sounds easier to get on the server and send this information, if that's possible for you.

    IP: ie client IP? it's in the request header and there are a number of SO questions about it.