shaka-player
Advanced tools
Comparing version 2.3.5 to 2.3.6
@@ -331,3 +331,3 @@ #!/usr/bin/env node | ||
name = getIdentifierString(node.expression.left); | ||
assignment = createExternAssignment(node.expression.right); | ||
assignment = createExternAssignment(name, node.expression.right); | ||
break; | ||
@@ -366,7 +366,66 @@ | ||
/** | ||
* @param {ASTNode} node A method node from the abstract syntax tree. | ||
* @return {string} The extern string for this method. | ||
*/ | ||
function createExternMethod(node) { | ||
// Example code: foo.bar = class { | ||
// baz() { ... } | ||
// }; | ||
// Example node: { | ||
// leadingComments: [ ... ], | ||
// static: false, | ||
// key: Identifier, | ||
// value: FunctionExpression, | ||
// } | ||
let comment = getLeadingBlockComment(node); | ||
comment = removeExportAnnotationsFromComment(comment); | ||
const params = getFunctionParameters(node.value); | ||
const id = getIdentifierString(node.key); | ||
let methodString = ' ' + comment + '\n '; | ||
if (node.static) methodString += 'static '; | ||
methodString += id + '(' + params + ') {}'; | ||
return methodString; | ||
} | ||
/** | ||
* @param {string} name The name of the thing we are assigning. | ||
* @param {ASTNode} node An assignment node from the abstract syntax tree. | ||
* @return {string} The assignment part of the extern string for this node. | ||
*/ | ||
function createExternAssignment(node) { | ||
function createExternAssignment(name, node) { | ||
switch (node.type) { | ||
case 'ClassExpression': | ||
// Example code: foo.bar = class bar2 extends foo.baz { /* ... */ }; | ||
// Example node: { | ||
// id: { name: 'bar' }, // or null | ||
// superClass: { type: 'MemberExpression', ... }, // or null | ||
// body: { body: [ ... ] }, | ||
// } | ||
let classString = ' = class '; | ||
if (node.id) { | ||
classString += getIdentifierString(node.id) + ' '; | ||
} | ||
if (node.superClass) { | ||
classString += 'extends ' + getIdentifierString(node.superClass) + ' '; | ||
} | ||
classString += '{\n'; | ||
node.body.body.forEach((member) => { | ||
// Only look at exported members. Constructors are exported implicitly | ||
// when the class is exported. | ||
var comment = getLeadingBlockComment(member); | ||
if (!EXPORT_REGEX.test(comment) && member.key.name != 'constructor') { | ||
return; | ||
} | ||
console.assert(member.type == 'MethodDefinition', | ||
'Unexpected exported member type in exported class!'); | ||
classString += createExternMethod(member) + '\n'; | ||
}); | ||
classString += '}'; | ||
return classString; | ||
case 'FunctionExpression': | ||
@@ -373,0 +432,0 @@ // Example code: foo.square = function(x) { return x * x; }; |
@@ -6,2 +6,2 @@ (function(){var g={}; | ||
else this.shaka=g.shaka; | ||
})(); | ||
}).call(window); |
@@ -230,12 +230,2 @@ // vim: foldmethod=marker:foldmarker={{{,}}} | ||
shakaAssets.UplynkRequestFilter = function(type, request) { | ||
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE || | ||
type == shaka.net.NetworkingEngine.RequestType.MANIFEST) { | ||
// It appears UTCTiming requests are considered MANIFEST type requests | ||
if (request.uris[0].indexOf('servertime') == -1) { | ||
request.allowCrossSiteCredentials = true; | ||
} else { | ||
request.allowCrossSiteCredentials = false; | ||
} | ||
} | ||
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) { | ||
@@ -242,0 +232,0 @@ // Modify the license request URL based on our cookie |
@@ -26,4 +26,4 @@ /* | ||
AESCTR_16_BYTE_IV:"encrypted with AES CTR Mode using a 16 byte IV",AESCTR_8_BYTE_IV:"encrypted with AES CTR Mode using a 8 byte IV",TRICK_MODE:"special trick mode track",XLINK:"xlink",SUBTITLES:"subtitles",CAPTIONS:"captions",SEGMENTED_TEXT:"segmented text",EMBEDDED_TEXT:"embedded text",MULTIPLE_LANGUAGES:"multiple languages",LIVE:"live",WEBM:"WebM",MP4:"mp4",MP2TS:"MPEG-2 TS",TTML:"TTML",WEBVTT:"WebVTT",HIGH_DEFINITION:"high definition",ULTRA_HIGH_DEFINITION:"ultra-high definition",HLS:"HLS"},UplynkResponseFilter:function(a, | ||
b){a==shaka.net.NetworkingEngine.RequestType.MANIFEST&&(shakaAssets.uplynk_prefix=b.headers["x-uplynk-prefix"]?b.headers["x-uplynk-prefix"]:"")},UplynkRequestFilter:function(a,b){if(a==shaka.net.NetworkingEngine.RequestType.LICENSE||a==shaka.net.NetworkingEngine.RequestType.MANIFEST)-1==b.uris[0].indexOf("servertime")?b.allowCrossSiteCredentials=!0:b.allowCrossSiteCredentials=!1;a==shaka.net.NetworkingEngine.RequestType.LICENSE&&(-1!==b.uris[0].indexOf("wv")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/wv"): | ||
-1!==b.uris[0].indexOf("ck")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/ck"):-1!==b.uris[0].indexOf("pr")&&shakaAssets.uplynk_prefix&&(b.uris[0]=shakaAssets.uplynk_prefix.concat("/pr")))}}; | ||
b){a==shaka.net.NetworkingEngine.RequestType.MANIFEST&&(shakaAssets.uplynk_prefix=b.headers["x-uplynk-prefix"]?b.headers["x-uplynk-prefix"]:"")},UplynkRequestFilter:function(a,b){a==shaka.net.NetworkingEngine.RequestType.LICENSE&&(-1!==b.uris[0].indexOf("wv")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/wv"):-1!==b.uris[0].indexOf("ck")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/ck"):-1!==b.uris[0].indexOf("pr")&&shakaAssets.uplynk_prefix&&(b.uris[0]= | ||
shakaAssets.uplynk_prefix.concat("/pr")))}}; | ||
shakaAssets.testAssets=[{name:"Angel One (multicodec, multilingual)",manifestUri:"//storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd",encoder:shakaAssets.Encoder.SHAKA_PACKAGER,source:shakaAssets.Source.SHAKA,drm:[],features:[shakaAssets.Feature.MP4,shakaAssets.Feature.MULTIPLE_LANGUAGES,shakaAssets.Feature.SEGMENT_BASE,shakaAssets.Feature.SUBTITLES,shakaAssets.Feature.WEBM,shakaAssets.Feature.WEBVTT]},{name:"Angel One (multicodec, multilingual, Widevine)",manifestUri:"//storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd", | ||
@@ -30,0 +30,0 @@ encoder:shakaAssets.Encoder.SHAKA_PACKAGER,source:shakaAssets.Source.SHAKA,drm:[shakaAssets.KeySystem.WIDEVINE],features:[shakaAssets.Feature.MP4,shakaAssets.Feature.MULTIPLE_LANGUAGES,shakaAssets.Feature.SEGMENT_BASE,shakaAssets.Feature.SUBTITLES,shakaAssets.Feature.WEBM,shakaAssets.Feature.WEBVTT],licenseServers:{"com.widevine.alpha":"//cwip-shaka-proxy.appspot.com/no_auth"}},{name:"Angel One (multicodec, multilingual, ClearKey server)",manifestUri:"//storage.googleapis.com/shaka-demo-assets/angel-one-clearkey/dash.mpd", |
@@ -26,4 +26,4 @@ /* | ||
AESCTR_16_BYTE_IV:"encrypted with AES CTR Mode using a 16 byte IV",AESCTR_8_BYTE_IV:"encrypted with AES CTR Mode using a 8 byte IV",TRICK_MODE:"special trick mode track",XLINK:"xlink",SUBTITLES:"subtitles",CAPTIONS:"captions",SEGMENTED_TEXT:"segmented text",EMBEDDED_TEXT:"embedded text",MULTIPLE_LANGUAGES:"multiple languages",LIVE:"live",WEBM:"WebM",MP4:"mp4",MP2TS:"MPEG-2 TS",TTML:"TTML",WEBVTT:"WebVTT",HIGH_DEFINITION:"high definition",ULTRA_HIGH_DEFINITION:"ultra-high definition",HLS:"HLS"},UplynkResponseFilter:function(a, | ||
b){a==shaka.net.NetworkingEngine.RequestType.MANIFEST&&(shakaAssets.uplynk_prefix=b.headers["x-uplynk-prefix"]?b.headers["x-uplynk-prefix"]:"")},UplynkRequestFilter:function(a,b){if(a==shaka.net.NetworkingEngine.RequestType.LICENSE||a==shaka.net.NetworkingEngine.RequestType.MANIFEST)-1==b.uris[0].indexOf("servertime")?b.allowCrossSiteCredentials=!0:b.allowCrossSiteCredentials=!1;a==shaka.net.NetworkingEngine.RequestType.LICENSE&&(-1!==b.uris[0].indexOf("wv")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/wv"): | ||
-1!==b.uris[0].indexOf("ck")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/ck"):-1!==b.uris[0].indexOf("pr")&&shakaAssets.uplynk_prefix&&(b.uris[0]=shakaAssets.uplynk_prefix.concat("/pr")))}}; | ||
b){a==shaka.net.NetworkingEngine.RequestType.MANIFEST&&(shakaAssets.uplynk_prefix=b.headers["x-uplynk-prefix"]?b.headers["x-uplynk-prefix"]:"")},UplynkRequestFilter:function(a,b){a==shaka.net.NetworkingEngine.RequestType.LICENSE&&(-1!==b.uris[0].indexOf("wv")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/wv"):-1!==b.uris[0].indexOf("ck")&&shakaAssets.uplynk_prefix?b.uris[0]=shakaAssets.uplynk_prefix.concat("/ck"):-1!==b.uris[0].indexOf("pr")&&shakaAssets.uplynk_prefix&&(b.uris[0]= | ||
shakaAssets.uplynk_prefix.concat("/pr")))}}; | ||
shakaAssets.testAssets=[{name:"Angel One (multicodec, multilingual)",manifestUri:"//storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd",encoder:shakaAssets.Encoder.SHAKA_PACKAGER,source:shakaAssets.Source.SHAKA,drm:[],features:[shakaAssets.Feature.MP4,shakaAssets.Feature.MULTIPLE_LANGUAGES,shakaAssets.Feature.SEGMENT_BASE,shakaAssets.Feature.SUBTITLES,shakaAssets.Feature.WEBM,shakaAssets.Feature.WEBVTT]},{name:"Angel One (multicodec, multilingual, Widevine)",manifestUri:"//storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd", | ||
@@ -30,0 +30,0 @@ encoder:shakaAssets.Encoder.SHAKA_PACKAGER,source:shakaAssets.Source.SHAKA,drm:[shakaAssets.KeySystem.WIDEVINE],features:[shakaAssets.Feature.MP4,shakaAssets.Feature.MULTIPLE_LANGUAGES,shakaAssets.Feature.SEGMENT_BASE,shakaAssets.Feature.SUBTITLES,shakaAssets.Feature.WEBM,shakaAssets.Feature.WEBVTT],licenseServers:{"com.widevine.alpha":"//cwip-shaka-proxy.appspot.com/no_auth"}},{name:"Angel One (multicodec, multilingual, ClearKey server)",manifestUri:"//storage.googleapis.com/shaka-demo-assets/angel-one-clearkey/dash.mpd", |
@@ -498,5 +498,5 @@ /** | ||
shaka.net.NetworkingEngine.PluginPriority = { | ||
FALLBACK: 1, | ||
PREFERRED: 2, | ||
APPLICATION: 3 | ||
'FALLBACK': 1, | ||
'PREFERRED': 2, | ||
'APPLICATION': 3 | ||
}; | ||
@@ -503,0 +503,0 @@ /** |
@@ -498,5 +498,5 @@ /** | ||
shaka.net.NetworkingEngine.PluginPriority = { | ||
FALLBACK: 1, | ||
PREFERRED: 2, | ||
APPLICATION: 3 | ||
'FALLBACK': 1, | ||
'PREFERRED': 2, | ||
'APPLICATION': 3 | ||
}; | ||
@@ -503,0 +503,0 @@ /** |
@@ -0,1 +1,21 @@ | ||
/** | ||
* @license | ||
* JSDoc 3 is free software, licensed under the Apache License, Version 2.0 (the | ||
* "License"). Commercial and non-commercial use are permitted in compliance | ||
* with the License. | ||
* | ||
* Copyright (c) 2011-present Michael Mathews <micmath@gmail.com> and the | ||
* [contributors to JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors). | ||
* All rights reserved. | ||
* | ||
* You may obtain a copy of the License at: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
/** | ||
* @fileoverview The publication code for the JSDoc template. | ||
* | ||
* Forked by Shaka Player team from the default template in JSDoc. | ||
*/ | ||
'use strict'; | ||
@@ -2,0 +22,0 @@ |
@@ -1,2 +0,21 @@ | ||
/*global document */ | ||
/** | ||
* @license | ||
* JSDoc 3 is free software, licensed under the Apache License, Version 2.0 (the | ||
* "License"). Commercial and non-commercial use are permitted in compliance | ||
* with the License. | ||
* | ||
* Copyright (c) 2011-present Michael Mathews <micmath@gmail.com> and the | ||
* [contributors to JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors). | ||
* All rights reserved. | ||
* | ||
* You may obtain a copy of the License at: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
/** | ||
* @fileoverview Adds line numbers to source code in the docs. | ||
* | ||
* Part of the default template in JSDoc. | ||
*/ | ||
(function() { | ||
@@ -3,0 +22,0 @@ var source = document.getElementsByClassName('prettyprint source linenums'); |
@@ -0,2 +1,22 @@ | ||
/** | ||
* @license | ||
* Google Code Prettify | ||
* Copyright (c) 2006 Google Inc. | ||
* | ||
* The source code for Google Code Prettify is available at: | ||
* https://code.google.com/p/google-code-prettify/ | ||
* | ||
* Google Code Prettify is distributed under the Apache License 2.0. | ||
* | ||
* You may obtain a copy of the License at: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
/** | ||
* @fileoverview A compiled fork of prettify, forked by JSDoc. | ||
* | ||
* Part of the default template in JSDoc. | ||
*/ | ||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", | ||
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); |
@@ -0,1 +1,21 @@ | ||
/** | ||
* @license | ||
* Google Code Prettify | ||
* Copyright (c) 2006 Google Inc. | ||
* | ||
* The source code for Google Code Prettify is available at: | ||
* https://code.google.com/p/google-code-prettify/ | ||
* | ||
* Google Code Prettify is distributed under the Apache License 2.0. | ||
* | ||
* You may obtain a copy of the License at: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
/** | ||
* @fileoverview A compiled fork of prettify, forked by JSDoc. | ||
* | ||
* Part of the default template in JSDoc. | ||
*/ | ||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; | ||
@@ -2,0 +22,0 @@ (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= |
@@ -0,1 +1,25 @@ | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* @fileoverview Code to show and hide classes in the docs based on their | ||
* access: private, public, or exported. | ||
* | ||
* Written and maintained by Shaka Player team. | ||
*/ | ||
function onShowChange() { | ||
@@ -2,0 +26,0 @@ var value = document.getElementById('show').value; |
@@ -51,2 +51,5 @@ /** | ||
shaka.hls.ManifestTextParser.prototype.parsePlaylist = function(data, uri) { | ||
const MEDIA_PLAYLIST_TAGS = shaka.hls.ManifestTextParser.MEDIA_PLAYLIST_TAGS; | ||
const SEGMENT_TAGS = shaka.hls.ManifestTextParser.SEGMENT_TAGS; | ||
// Get the input as a string. Normalize newlines to \n. | ||
@@ -68,6 +71,23 @@ var str = shaka.util.StringUtils.fromUTF8(data); | ||
// First, look for media playlist tags, so that we know what the playlist | ||
// type really is before we start parsing. | ||
for (let i = 1; i < lines.length; i++) { | ||
// Ignore comments. | ||
if (!shaka.hls.Utils.isComment(lines[i])) { | ||
let tag = this.parseTag_(lines[i]); | ||
// These tags won't actually be used, so don't increment the global id. | ||
this.globalId_ -= 1; | ||
if (MEDIA_PLAYLIST_TAGS.indexOf(tag.name) >= 0) { | ||
playlistType = shaka.hls.PlaylistType.MEDIA; | ||
break; | ||
} else if (tag.name == 'EXT-X-STREAM-INF') { | ||
i += 1; | ||
} | ||
} | ||
} | ||
/** {Array.<shaka.hls.Tag>} */ | ||
var tags = []; | ||
var i = 1; | ||
while (i < lines.length) { | ||
let tags = []; | ||
for (let i = 1; i < lines.length;) { | ||
// Skip comments | ||
@@ -79,9 +99,4 @@ if (shaka.hls.Utils.isComment(lines[i])) { | ||
var tag = this.parseTag_(lines[i]); | ||
if (shaka.hls.ManifestTextParser.MEDIA_PLAYLIST_TAGS | ||
.indexOf(tag.name) >= 0) { | ||
playlistType = shaka.hls.PlaylistType.MEDIA; | ||
} else if (shaka.hls.ManifestTextParser.SEGMENT_TAGS | ||
.indexOf(tag.name) >= 0) { | ||
let tag = this.parseTag_(lines[i]); | ||
if (SEGMENT_TAGS.indexOf(tag.name) >= 0) { | ||
if (playlistType != shaka.hls.PlaylistType.MEDIA) { | ||
@@ -130,4 +145,4 @@ // Only media playlist should contain segment tags | ||
/** @type {!Array.<shaka.hls.Tag>} */ | ||
var segmentTags = []; | ||
lines.forEach(function(line) { | ||
let segmentTags = []; | ||
lines.forEach((line) => { | ||
if (/^(#EXT)/.test(line)) { | ||
@@ -151,3 +166,3 @@ var tag = this.parseTag_(line); | ||
} | ||
}.bind(this)); | ||
}); | ||
return segments; | ||
@@ -192,3 +207,4 @@ }; | ||
shaka.util.Error.Category.MANIFEST, | ||
shaka.util.Error.Code.INVALID_HLS_TAG); | ||
shaka.util.Error.Code.INVALID_HLS_TAG, | ||
word); | ||
} | ||
@@ -195,0 +211,0 @@ var name = blocks[1]; |
@@ -85,5 +85,5 @@ /** | ||
shaka.net.NetworkingEngine.PluginPriority = { | ||
FALLBACK: 1, | ||
PREFERRED: 2, | ||
APPLICATION: 3 | ||
'FALLBACK': 1, | ||
'PREFERRED': 2, | ||
'APPLICATION': 3 | ||
}; | ||
@@ -90,0 +90,0 @@ |
@@ -469,2 +469,3 @@ /** | ||
* HLS tag has an invalid name that doesn't start with '#EXT' | ||
* <br> error.data[0] is the invalid tag. | ||
*/ | ||
@@ -471,0 +472,0 @@ 'INVALID_HLS_TAG': 4016, |
{ | ||
"name": "shaka-player", | ||
"description": "DASH/EME video player library", | ||
"version": "2.3.5", | ||
"version": "2.3.6", | ||
"homepage": "https://github.com/google/shaka-player", | ||
@@ -6,0 +6,0 @@ "author": "Google", |
@@ -33,3 +33,3 @@ /** | ||
// This Master playlist is invalid cause it contains a segment tag. | ||
// All segmnent information should be in a Media playlist. | ||
// All segment information should be in a Media playlist. | ||
verifyError('#EXTM3U\n' + | ||
@@ -212,4 +212,5 @@ '#EXT-X-MEDIA:TYPE=AUDIO\n' + | ||
shaka.util.Error.Category.MANIFEST, | ||
shaka.util.Error.Code.INVALID_HLS_TAG); | ||
var text = shaka.util.StringUtils.toUTF8('#EXTM3U\ninvalid tag'); | ||
shaka.util.Error.Code.INVALID_HLS_TAG, | ||
'invalid tag'); | ||
let text = shaka.util.StringUtils.toUTF8('#EXTM3U\ninvalid tag'); | ||
try { | ||
@@ -265,2 +266,29 @@ parser.parsePlaylist(text, /* uri */ ''); | ||
it('handles manifests with a segment tag before a playlist tag', () => { | ||
verifyPlaylist( | ||
{ | ||
type: shaka.hls.PlaylistType.MEDIA, | ||
tags: [ | ||
new shaka.hls.Tag(/* id */ 2, 'EXT-X-TARGETDURATION', [], '6') | ||
], | ||
segments: [ | ||
new shaka.hls.Segment('https://test/test.mp4', | ||
[ | ||
new shaka.hls.Tag(/* id */ 1, 'EXT-X-KEY', | ||
[ | ||
new shaka.hls.Attribute('METHOD', 'AES-128'), | ||
new shaka.hls.Attribute('URI', 'http://key.com'), | ||
new shaka.hls.Attribute('IV', '123') | ||
]), | ||
new shaka.hls.Tag(/* id */ 3, 'EXTINF', [], '5.99467') | ||
]) | ||
] | ||
}, | ||
'#EXTM3U\n' + | ||
'#EXT-X-KEY:METHOD="AES-128",URI="http://key.com",IV="123"\n' + | ||
'#EXT-X-TARGETDURATION:6\n' + | ||
'#EXTINF:5.99467\n' + | ||
'https://test/test.mp4\n'); | ||
}); | ||
it('tracks playlist URI', function() { | ||
@@ -267,0 +295,0 @@ verifyPlaylist( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24595970
87600