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
b6ede3ac
authored
2016-06-02 10:31:07 -0400
by
Brandon Casey
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix all linter errors in master (#721)
1 parent
b2a22fde
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
package.json
src/playlist-loader.js
src/segment-loader.js
test/ranges.test.js
test/segment-loader.test.js
package.json
View file @
b6ede3a
...
...
@@ -69,8 +69,7 @@
"scripts"
,
"utils"
,
"test/test-manifests.js"
,
"test/test-expected.js"
,
"src/playlist-loader.js"
"test/test-expected.js"
]
},
"files"
:
[
...
...
src/playlist-loader.js
View file @
b6ede3a
...
...
@@ -448,6 +448,7 @@ const PlaylistLoader = function(srcUrl, hls, withCredentials) {
for
(
let
groupKey
in
loader
.
master
.
mediaGroups
.
AUDIO
)
{
for
(
let
labelKey
in
loader
.
master
.
mediaGroups
.
AUDIO
[
groupKey
])
{
let
alternateAudio
=
loader
.
master
.
mediaGroups
.
AUDIO
[
groupKey
][
labelKey
];
if
(
alternateAudio
.
uri
)
{
alternateAudio
.
resolvedUri
=
resolveUrl
(
loader
.
master
.
uri
,
alternateAudio
.
uri
);
...
...
src/segment-loader.js
View file @
b6ede3a
...
...
@@ -486,7 +486,8 @@ export default class SegmentLoader extends videojs.EventTarget {
// Increment the timeCorrection_ variable to push the fetcher forward
// in time and hopefully skip any gaps or flaws in our understanding
// of the media
let
correctionApplied
=
this
.
incrementTimeCorrection_
(
this
.
playlist_
.
targetDuration
/
2
,
1
);
let
correctionApplied
=
this
.
incrementTimeCorrection_
(
this
.
playlist_
.
targetDuration
/
2
,
1
);
if
(
correctionApplied
&&
!
this
.
paused
())
{
this
.
fillBuffer_
();
...
...
test/ranges.test.js
View file @
b6ede3a
...
...
@@ -108,8 +108,8 @@ QUnit.test('calculates the percent buffered for segments in the simple case', fu
QUnit
.
equal
(
percentBuffered
,
40
,
'calculated the buffered amount correctly'
);
});
QUnit
.
test
(
'consider the buffer before currentTime to be filled if the
segement begins at
'
+
'or before the currentTime'
,
function
()
{
QUnit
.
test
(
'consider the buffer before currentTime to be filled if the '
+
'
segement begins at
or before the currentTime'
,
function
()
{
let
segmentStart
=
10
;
let
segmentDuration
=
10
;
let
currentTime
=
15
;
...
...
@@ -197,7 +197,8 @@ QUnit.test('calculates the percent buffered as 0 for segments that do not overla
QUnit
.
equal
(
percentBuffered
,
0
,
'calculated the buffered amount correctly'
);
});
QUnit
.
test
(
'calculates the percent buffered for segments that end before currentTime'
,
function
()
{
QUnit
.
test
(
'calculates the percent buffered for segments '
+
'that end before currentTime'
,
function
()
{
let
segmentStart
=
10
;
let
segmentDuration
=
10
;
let
currentTime
=
19.6
;
...
...
test/segment-loader.test.js
View file @
b6ede3a
...
...
@@ -3,7 +3,11 @@ import SegmentLoader from '../src/segment-loader';
import
videojs
from
'video.js'
;
import
xhrFactory
from
'../src/xhr'
;
import
Config
from
'../src/config'
;
import
{
playlistWithDuration
,
useFakeEnvironment
,
useFakeMediaSource
}
from
'./test-helpers.js'
;
import
{
playlistWithDuration
,
useFakeEnvironment
,
useFakeMediaSource
}
from
'./test-helpers.js'
;
let
currentTime
;
let
mediaSource
;
...
...
Please
register
or
sign in
to post a comment