Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fa661f2f
authored
2014-11-04 13:30:34 -0500
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add a 'bandwidthupdate' event
1 parent
61566277
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
fa661f2
...
...
@@ -155,6 +155,8 @@ videojs.Hls.prototype.handleSourceOpen = function() {
}
else
{
setupEvents
.
call
(
this
);
}
this
.
trigger
(
'bandwidthupdate'
);
}));
this
.
playlists
.
on
(
'error'
,
videojs
.
bind
(
this
,
function
()
{
...
...
@@ -464,6 +466,8 @@ videojs.Hls.prototype.setBandwidth = function(xhr) {
tech
.
segmentXhrTime
=
xhr
.
roundTripTime
;
tech
.
bandwidth
=
xhr
.
bandwidth
;
tech
.
bytesReceived
+=
xhr
.
bytesReceived
||
0
;
tech
.
trigger
(
'bandwidthupdate'
);
};
videojs
.
Hls
.
prototype
.
loadSegment
=
function
(
segmentUri
,
offset
)
{
...
...
Please
register
or
sign in
to post a comment