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
1fcab4ef
authored
10 years ago
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Make sure that segments attribute exists.
1 parent
173a40ec
master
...
3.6.0-bf-0
v3.6.0
v3.6.0.bf-0
v3.6.0-bf.0
v3.6.0-bf-0
v3.5.3
v3.5.2
v3.5.1
v3.5.0
v3.4.0
v3.3.0
v3.2.0
v3.1.0
v3.0.5
v3.0.4
v3.0.3
v3.0.2
v3.0.1
v3.0.0
v2.2.0
v2.1.1
v2.1.0
v2.0.1
v2.0.0
v1.3.11
v1.3.10
v1.3.9
v1.3.8
v1.3.7
v1.3.6
v1.3.5
v1.3.4
v1.3.3
v1.3.1
v1.3.0
v1.2.2
v1.2.1
v1.2.0
v1.1.0
v1.0.1-0
v0.17.6
v0.17.5
v0.17.4
v0.17.3
v0.17.2
v0.17.0
v0.16.0
v0.15.0
v0.14.0
v0.13.1
v0.13.0
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.4
v0.10.3
v0.10.2
v0.10.1
v0.10.0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
1fcab4e
...
...
@@ -127,9 +127,11 @@ videojs.Hls.prototype.handleSourceOpen = function() {
oldMediaPlaylist
=
this
.
playlists
.
media
();
this
.
bandwidth
=
this
.
playlists
.
bandwidth
;
selectedPlaylist
=
this
.
selectPlaylist
();
newBitrate
=
selectedPlaylist
.
attributes
&&
selectedPlaylist
.
attributes
.
BANDWIDTH
;
segmentDuration
=
oldMediaPlaylist
.
segments
[
this
.
mediaIndex
].
duration
||
oldMediaPlaylist
.
targetDuration
;
newBitrate
=
selectedPlaylist
.
attributes
&&
selectedPlaylist
.
attributes
.
BANDWIDTH
;
segmentDuration
=
oldMediaPlaylist
.
segments
&&
oldMediaPlaylist
.
segments
[
this
.
mediaIndex
].
duration
||
oldMediaPlaylist
.
targetDuration
;
segmentDlTime
=
(
segmentDuration
*
newBitrate
)
/
this
.
bandwidth
;
...
...
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment