-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull request for issue #780 - Support for VDMS Streams in demo app #781
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,8 @@ shakaAssets.Encoder = { | |
NIMBLE_STREAMER: 'Nimble Streamer', | ||
AZURE_MEDIA_SERVICES: 'Azure Media Services', | ||
MP4BOX: 'MP4Box', | ||
APPLE: 'Apple' | ||
APPLE: 'Apple', | ||
UPLYNK: 'Verizon Digital Media Services' | ||
}; | ||
|
||
|
||
|
@@ -51,7 +52,8 @@ shakaAssets.Source = { | |
BITCODIN: 'Bitcodin', | ||
NIMBLE_STREAMER: 'Nimble Streamer', | ||
AZURE_MEDIA_SERVICES: 'Azure Media Services', | ||
GPAC: 'GPAC' | ||
GPAC: 'GPAC', | ||
UPLYNK: 'Verizon Digital Media Services' | ||
}; | ||
|
||
|
||
|
@@ -223,6 +225,49 @@ shakaAssets.YouTubeResponseFilter = function(type, response) { | |
}; | ||
|
||
|
||
/** | ||
* A response filter for VDMS Uplynk manifest responses, | ||
* this allows us to get the license prefix that is necessary | ||
* to later generate a proper license response. | ||
* @param {shaka.net.NetworkingEngine.RequestType} type | ||
* @param {shakaExtern.Response} response | ||
* The uplynk_prefix attribute is set on the shakaAssets object | ||
* and is later referenced in the UplynkRequestFilter. | ||
*/ | ||
shakaAssets.UplynkResponseFilter = function(type, response) { | ||
if (type == shaka.net.NetworkingEngine.RequestType.MANIFEST) { | ||
// Parse a custom header that contains a value needed to build a proper | ||
// license server URL | ||
shakaAssets.uplynk_prefix = response.headers['x-uplynk-prefix']; | ||
} | ||
}; | ||
|
||
|
||
/** | ||
* A license request filter for VDMS Uplynk license requests. | ||
* @param {shaka.net.NetworkingEngine.RequestType} type | ||
* @param {shakaExtern.Request} request | ||
* The uplynk_prefix variable is retrieved from the shakaAssets | ||
* object, and requires that the uplynk manifest response filter | ||
* also be set. | ||
*/ | ||
shakaAssets.UplynkRequestFilter = function(type, request) { | ||
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE || | ||
type == shaka.net.NetworkingEngine.RequestType.MANIFEST) { | ||
request.allowCrossSiteCredentials = true; | ||
} | ||
|
||
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) { | ||
// Modify the license request URL based on our cookie | ||
if (request.uris[0].indexOf('wv') !== -1) { | ||
request.uris[0] = shakaAssets.uplynk_prefix.concat('/wv'); | ||
} else if (request.uris[0].indexOf('ck') !== -1) { | ||
request.uris[0] = shakaAssets.uplynk_prefix.concat('/ck'); | ||
} | ||
} | ||
}; | ||
|
||
|
||
/** | ||
* @param {!Node} node | ||
* @return {Array.<shakaExtern.DrmInfo>} | ||
|
@@ -1097,6 +1142,59 @@ shakaAssets.testAssets = [ | |
shakaAssets.Feature.MP4, | ||
shakaAssets.Feature.SEGMENT_TEMPLATE_DURATION | ||
] | ||
}, | ||
// }}} | ||
|
||
// Verizon Digital Media Services (VDMS) assets {{{ | ||
{ | ||
name: 'Big Buck Bunny', | ||
manifestUri: 'https://content.uplynk.com/224ac8717e714b68831997ab6cea4015.mpd', // gjslint: disable=110 | ||
|
||
encoder: shakaAssets.Encoder.UPLYNK, | ||
source: shakaAssets.Source.UPLYNK, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please specify which encoder was used in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done -- Added the "UPLYNK" encoder so I could specify that in these assets. |
||
drm: [ | ||
shakaAssets.KeySystem.WIDEVINE, | ||
shakaAssets.KeySystem.CLEAR_KEY | ||
], | ||
features: [ | ||
shakaAssets.Feature.MP4, | ||
shakaAssets.Feature.SEGMENT_LIST_DURATION, | ||
shakaAssets.Feature.PSSH, | ||
shakaAssets.Feature.HIGH_DEFINITION | ||
], | ||
licenseServers: { | ||
'com.widevine.alpha': 'https://content.uplynk.com/wv', | ||
'org.w3.clearkey': 'https://content.uplynk.com/ck' | ||
}, | ||
requestFilter: shakaAssets.UplynkRequestFilter, | ||
responseFilter: shakaAssets.UplynkResponseFilter | ||
}, | ||
{ | ||
name: 'Sintel - (multiperiod-mix of encrypted and unencrypted)', | ||
//Unencrypted periods interspersed with protected periods | ||
//Requires Chrome 58 | ||
manifestUri: 'https://content.uplynk.com/1eb40d8e64234f5c9879db7045c3d48c.mpd?ad=cleardash&rays=cdefg', // gjslint: disable=110 | ||
|
||
encoder: shakaAssets.Encoder.UPLYNK, | ||
source: shakaAssets.Source.UPLYNK, | ||
drm: [ | ||
shakaAssets.KeySystem.WIDEVINE, | ||
shakaAssets.KeySystem.CLEAR_KEY | ||
], | ||
features: [ | ||
shakaAssets.Feature.MP4, | ||
shakaAssets.Feature.MULTIPLE_LANGUAGES, | ||
shakaAssets.Feature.SEGMENT_LIST_DURATION, | ||
shakaAssets.Feature.PSSH, | ||
shakaAssets.Feature.HIGH_DEFINITION, | ||
shakaAssets.Feature.MULTIPERIOD | ||
], | ||
licenseServers: { | ||
'com.widevine.alpha': 'https://content.uplynk.com/wv', | ||
'org.w3.clearkey': 'https://content.uplynk.com/ck' | ||
}, | ||
requestFilter: shakaAssets.UplynkRequestFilter, | ||
responseFilter: shakaAssets.UplynkResponseFilter | ||
} | ||
// }}} | ||
]; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please enclose these assets in their own group. For example, see line 1038 above, where we start a group for GPAC-sourced assets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done