Skip to content

Commit

Permalink
Fix relative URIs in HLS manifest
Browse files Browse the repository at this point in the history
For some reason, in some of my testing, the captured "uri" variable
was undefined by the time the Promise was resolved.  Instead, use
"response.uri", which accounts for redirects anyway.

Issue #279

Change-Id: Ibaef99a57dc01a665d095fec4765ac9b32d537ac
  • Loading branch information
joeyparrish committed Mar 30, 2017
1 parent 3dfc61a commit b00bbc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,8 @@ shaka.hls.HlsParser.prototype.createStreamInfo_ =

return this.requestManifest_(uri).then(function(response) {
var playlistData = response.data;
var playlist = this.manifestTextParser_.parsePlaylist(playlistData, uri);
var playlist = this.manifestTextParser_.parsePlaylist(playlistData,
response.uri);
if (playlist.type != shaka.hls.PlaylistType.MEDIA) {
// EXT-X-MEDIA tags should point to media playlists.
throw new shaka.util.Error(
Expand Down

0 comments on commit b00bbc4

Please sign in to comment.