Skip to content

Commit

Permalink
feat(FEC-7330): Enable setting custom track labels by app (#57)
Browse files Browse the repository at this point in the history
removing the label as we override it in videoTrack.js
verified build succeeds in travis, reverting, the build will be fixed after we release a new version.
  • Loading branch information
odedhutzler committed Apr 10, 2018
1 parent 2c4558d commit edd0c79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/hls-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ export default class HlsAdapter extends BaseMediaSourceAdapter {
// Create video tracks
let settings = {
active: this._hls.startLevel === i,
label: hlsVideoTracks[i].name,
bandwidth: hlsVideoTracks[i].bitrate,
width: hlsVideoTracks[i].width,
height: hlsVideoTracks[i].height,
Expand Down
3 changes: 3 additions & 0 deletions test/src/hls-adapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ describe('HlsAdapter Instance - Unit', function () {
}
};
let videoTracks = hlsAdapterInstance._parseVideoTracks(hls_tracks.levels);
player_tracks.videoTracks.forEach(t => {
t._label = t._height + 'p';
});
JSON.parse(JSON.stringify(videoTracks)).should.deep.equal(player_tracks.videoTracks);
});

Expand Down

0 comments on commit edd0c79

Please sign in to comment.