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
8ad068fe
authored
2015-04-16 14:52:59 -0400
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update tests and add one checks for exact match
1 parent
229bae7e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
src/videojs-hls.js
test/videojs-hls_test.js
src/videojs-hls.js
View file @
8ad068f
...
...
@@ -427,7 +427,6 @@ videojs.Hls.prototype.selectPlaylist = function () {
i
=
sortedPlaylists
.
length
,
variant
,
oldvariant
,
ret
,
bandwidthBestVariant
,
resolutionPlusOne
,
resolutionBestVariant
;
...
...
test/videojs-hls_test.js
View file @
8ad068f
...
...
@@ -813,8 +813,8 @@ test('selects the correct rendition by player dimensions', function() {
playlist
=
player
.
hls
.
selectPlaylist
();
deepEqual
(
playlist
.
attributes
.
RESOLUTION
,
{
width
:
396
,
height
:
224
},
'should return the correct resolution by player dimensions'
);
equal
(
playlist
.
attributes
.
BANDWIDTH
,
440
000
,
'should have the expected bandwidth in case of multiple'
);
deepEqual
(
playlist
.
attributes
.
RESOLUTION
,
{
width
:
960
,
height
:
540
},
'should return the correct resolution by player dimensions'
);
equal
(
playlist
.
attributes
.
BANDWIDTH
,
1928
000
,
'should have the expected bandwidth in case of multiple'
);
player
.
width
(
1920
);
player
.
height
(
1080
);
...
...
@@ -825,6 +825,13 @@ test('selects the correct rendition by player dimensions', function() {
deepEqual
(
playlist
.
attributes
.
RESOLUTION
,
{
width
:
960
,
height
:
540
},
'should return the correct resolution by player dimensions'
);
equal
(
playlist
.
attributes
.
BANDWIDTH
,
1928000
,
'should have the expected bandwidth in case of multiple'
);
player
.
width
(
396
);
player
.
height
(
224
);
playlist
=
player
.
hls
.
selectPlaylist
();
deepEqual
(
playlist
.
attributes
.
RESOLUTION
,
{
width
:
396
,
height
:
224
},
'should return the correct resolution by player dimensions, if exact match'
);
equal
(
playlist
.
attributes
.
BANDWIDTH
,
440000
,
'should have the expected bandwidth in case of multiple, if exact match'
);
});
...
...
Please
register
or
sign in
to post a comment