最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Detect current bitrate of HTTP Live Streaming in Safari - Stack Overflow

programmeradmin2浏览0评论

When using Apple Live Streaming in Safari, is there any way to detect the current bitrate with Javascript? Alternatively, can I detect which element of the .m3u8 is being played?

I've looked at the HTMLMediaElement Class Reference, but found no clues there. The src property always references the .m3u8 file, so that doesn't help.

When using Apple Live Streaming in Safari, is there any way to detect the current bitrate with Javascript? Alternatively, can I detect which element of the .m3u8 is being played?

I've looked at the HTMLMediaElement Class Reference, but found no clues there. The src property always references the .m3u8 file, so that doesn't help.

Share Improve this question asked Oct 15, 2012 at 11:52 Paul DixonPaul Dixon 301k54 gold badges314 silver badges349 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

It looks like the WHATWG is trying to address that very concern. See their document about HTML5 video metrics here: http://wiki.whatwg/wiki/Video_Metrics

Using the Safari web developer tools, you can see that Webkit has implemented the following properties on the HTMLVideoElement:

  • webkitAudioDecodedByteCount
  • webkitDecodedFrameCount
  • webkitDroppedFrameCount
  • webkitVideoDecodedByteCount

There isn't much documentation out there about these, but I found some sample code that might be helpful.

I'd be very interested to hear if these properties worked for you. Please post your feedback if you gain any insight.

发布评论

评论列表(0)

  1. 暂无评论