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
9e932b3b
authored
2014-11-06 14:52:11 -0500
by
David LaPalomento
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #183 from videojs/trigger-bandwidth-events
Add a 'bandwidthupdate' event
2 parents
61566277
83237357
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
9e932b3
...
...
@@ -125,7 +125,8 @@ videojs.Hls.prototype.handleSourceOpen = function() {
};
oldMediaPlaylist
=
this
.
playlists
.
media
();
this
.
bandwidth
=
this
.
playlists
.
bandwidth
;
this
.
setBandwidth
(
this
.
playlists
);
selectedPlaylist
=
this
.
selectPlaylist
();
oldBitrate
=
oldMediaPlaylist
.
attributes
&&
oldMediaPlaylist
.
attributes
.
BANDWIDTH
||
0
;
...
...
@@ -464,6 +465,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