Source: lib/util/error.js

  1. /**
  2. * @license
  3. * Copyright 2016 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. goog.provide('shaka.util.Error');
  18. /**
  19. * Creates a new Error.
  20. *
  21. * @param {shaka.util.Error.Severity} severity
  22. * @param {shaka.util.Error.Category} category
  23. * @param {shaka.util.Error.Code} code
  24. * @param {...*} var_args
  25. *
  26. * @constructor
  27. * @struct
  28. * @export
  29. * @extends {Error}
  30. */
  31. shaka.util.Error = function(severity, category, code, var_args) {
  32. this.severity = severity;
  33. this.category = category;
  34. this.code = code;
  35. this.data = Array.prototype.slice.call(arguments, 3);
  36. this.handled = false;
  37. // This improves formatting of Errors in failure messages in the tests.
  38. if (!COMPILED) {
  39. var categoryName = 'UNKNOWN';
  40. var codeName = 'UNKNOWN';
  41. for (var k in shaka.util.Error.Category) {
  42. if (shaka.util.Error.Category[k] == this.category)
  43. categoryName = k;
  44. }
  45. for (var k in shaka.util.Error.Code) {
  46. if (shaka.util.Error.Code[k] == this.code)
  47. codeName = k;
  48. }
  49. /**
  50. * A human-readable version of the category and code.
  51. * <i>(Only available in uncompiled mode.)</i>
  52. *
  53. * @const {string}
  54. * @exportDoc
  55. */
  56. this.message = 'Shaka Error ' + categoryName + '.' + codeName +
  57. ' (' + this.data.toString() + ')';
  58. try {
  59. throw new Error(this.message);
  60. } catch (e) {
  61. /**
  62. * A stack-trace showing where the error occurred.
  63. * <i>(Only available in uncompiled mode.)</i>
  64. *
  65. * @const {string}
  66. * @exportDoc
  67. */
  68. this.stack = e.stack;
  69. }
  70. }
  71. };
  72. /**
  73. * @type {shaka.util.Error.Severity}
  74. * @expose
  75. */
  76. shaka.util.Error.prototype.severity;
  77. /**
  78. * @const {shaka.util.Error.Category}
  79. * @expose
  80. */
  81. shaka.util.Error.prototype.category;
  82. /**
  83. * @const {shaka.util.Error.Code}
  84. * @expose
  85. */
  86. shaka.util.Error.prototype.code;
  87. /**
  88. * @const {!Array.<*>}
  89. * @expose
  90. */
  91. shaka.util.Error.prototype.data;
  92. /**
  93. * @type {boolean}
  94. * @expose
  95. */
  96. shaka.util.Error.prototype.handled;
  97. /**
  98. * @return {string}
  99. * @override
  100. */
  101. shaka.util.Error.prototype.toString = function() {
  102. return 'shaka.util.Error ' + JSON.stringify(this, null, ' ');
  103. };
  104. /**
  105. * @enum {number}
  106. * @export
  107. */
  108. shaka.util.Error.Severity = {
  109. /**
  110. * An error occurred, but the Player is attempting to recover from the error.
  111. *
  112. * If the Player cannot ultimately recover, it still may not throw a CRITICAL
  113. * error. For example, retrying for a media segment will never result in
  114. * a CRITICAL error (the Player will just retry forever).
  115. */
  116. 'RECOVERABLE': 1,
  117. /**
  118. * A critical error that the library cannot recover from. These usually cause
  119. * the Player to stop loading or updating. A new manifest must be loaded
  120. * to reset the library.
  121. */
  122. 'CRITICAL': 2
  123. };
  124. /**
  125. * @enum {number}
  126. * @export
  127. */
  128. shaka.util.Error.Category = {
  129. /** Errors from the network stack. */
  130. 'NETWORK': 1,
  131. /** Errors parsing text streams. */
  132. 'TEXT': 2,
  133. /** Errors parsing or processing audio or video streams. */
  134. 'MEDIA': 3,
  135. /** Errors parsing the Manifest. */
  136. 'MANIFEST': 4,
  137. /** Errors related to streaming. */
  138. 'STREAMING': 5,
  139. /** Errors related to DRM. */
  140. 'DRM': 6,
  141. /** Miscellaneous errors from the player. */
  142. 'PLAYER': 7,
  143. /** Errors related to cast. */
  144. 'CAST': 8,
  145. /** Errors in the database storage (offline). */
  146. 'STORAGE': 9
  147. };
  148. /**
  149. * @enum {number}
  150. * @export
  151. */
  152. shaka.util.Error.Code = {
  153. /**
  154. * A network request was made using an unsupported URI scheme.
  155. * <br> error.data[0] is the URI.
  156. */
  157. 'UNSUPPORTED_SCHEME': 1000,
  158. /**
  159. * An HTTP network request returned an HTTP status that indicated a failure.
  160. * <br> error.data[0] is the URI.
  161. * <br> error.data[1] is the status code.
  162. * <br> error.data[2] is the response text, or null if the response could not
  163. * be interpretted as text.
  164. * <br> error.data[3] is the map of response headers.
  165. */
  166. 'BAD_HTTP_STATUS': 1001,
  167. /**
  168. * An HTTP network request failed with an error, but not from the server.
  169. * <br> error.data[0] is the URI.
  170. */
  171. 'HTTP_ERROR': 1002,
  172. /**
  173. * A network request timed out.
  174. * <br> error.data[0] is the URI.
  175. */
  176. 'TIMEOUT': 1003,
  177. /**
  178. * A network request was made with a malformed data URI.
  179. * <br> error.data[0] is the URI.
  180. */
  181. 'MALFORMED_DATA_URI': 1004,
  182. /**
  183. * A network request was made with a data URI using an unknown encoding.
  184. * <br> error.data[0] is the URI.
  185. */
  186. 'UNKNOWN_DATA_URI_ENCODING': 1005,
  187. /**
  188. * A request filter threw an error.
  189. * <br> error.data[0] is the original error.
  190. */
  191. 'REQUEST_FILTER_ERROR': 1006,
  192. /**
  193. * A response filter threw an error.
  194. * <br> error.data[0] is the original error.
  195. */
  196. 'RESPONSE_FILTER_ERROR': 1007,
  197. /** The text parser failed to parse a text stream due to an invalid header. */
  198. 'INVALID_TEXT_HEADER': 2000,
  199. /** The text parser failed to parse a text stream due to an invalid cue. */
  200. 'INVALID_TEXT_CUE': 2001,
  201. // RETIRED: 'INVALID_TEXT_SETTINGS': 2002,
  202. /**
  203. * Was unable to detect the encoding of the response text. Suggest adding
  204. * byte-order-markings to the response data.
  205. */
  206. 'UNABLE_TO_DETECT_ENCODING': 2003,
  207. /** The response data contains invalid Unicode character encoding. */
  208. 'BAD_ENCODING': 2004,
  209. /**
  210. * The XML parser failed to parse an xml stream, or the XML lacks mandatory
  211. * elements for TTML.
  212. * <br> error.data[0] is the URI associated with the XML.
  213. */
  214. 'INVALID_XML': 2005,
  215. // RETIRED: 'INVALID_TTML': 2006,
  216. /**
  217. * MP4 segment does not contain TTML.
  218. */
  219. 'INVALID_MP4_TTML': 2007,
  220. /**
  221. * MP4 segment does not contain VTT.
  222. */
  223. 'INVALID_MP4_VTT': 2008,
  224. /**
  225. * Some component tried to read past the end of a buffer. The segment index,
  226. * init segment, or PSSH may be malformed.
  227. */
  228. 'BUFFER_READ_OUT_OF_BOUNDS': 3000,
  229. /**
  230. * Some component tried to parse an integer that was too large to fit in a
  231. * JavaScript number without rounding error. JavaScript can only natively
  232. * represent integers up to 53 bits.
  233. */
  234. 'JS_INTEGER_OVERFLOW': 3001,
  235. /**
  236. * The EBML parser used to parse the WebM container encountered an integer,
  237. * ID, or other field larger than the maximum supported by the parser.
  238. */
  239. 'EBML_OVERFLOW': 3002,
  240. /**
  241. * The EBML parser used to parse the WebM container encountered a floating-
  242. * point field of a size not supported by the parser.
  243. */
  244. 'EBML_BAD_FLOATING_POINT_SIZE': 3003,
  245. /**
  246. * The MP4 SIDX parser found the wrong box type.
  247. * Either the segment index range is incorrect or the data is corrupt.
  248. */
  249. 'MP4_SIDX_WRONG_BOX_TYPE': 3004,
  250. /**
  251. * The MP4 SIDX parser encountered an invalid timescale.
  252. * The segment index data may be corrupt.
  253. */
  254. 'MP4_SIDX_INVALID_TIMESCALE': 3005,
  255. /** The MP4 SIDX parser encountered a type of SIDX that is not supported. */
  256. 'MP4_SIDX_TYPE_NOT_SUPPORTED': 3006,
  257. /**
  258. * The WebM Cues parser was unable to locate the Cues element.
  259. * The segment index data may be corrupt.
  260. */
  261. 'WEBM_CUES_ELEMENT_MISSING': 3007,
  262. /**
  263. * The WebM header parser was unable to locate the Ebml element.
  264. * The init segment data may be corrupt.
  265. */
  266. 'WEBM_EBML_HEADER_ELEMENT_MISSING': 3008,
  267. /**
  268. * The WebM header parser was unable to locate the Segment element.
  269. * The init segment data may be corrupt.
  270. */
  271. 'WEBM_SEGMENT_ELEMENT_MISSING': 3009,
  272. /**
  273. * The WebM header parser was unable to locate the Info element.
  274. * The init segment data may be corrupt.
  275. */
  276. 'WEBM_INFO_ELEMENT_MISSING': 3010,
  277. /**
  278. * The WebM header parser was unable to locate the Duration element.
  279. * The init segment data may be corrupt or may have been incorrectly encoded.
  280. * Shaka requires a duration in WebM DASH content.
  281. */
  282. 'WEBM_DURATION_ELEMENT_MISSING': 3011,
  283. /**
  284. * The WebM Cues parser was unable to locate the Cue Track Positions element.
  285. * The segment index data may be corrupt.
  286. */
  287. 'WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING': 3012,
  288. /**
  289. * The WebM Cues parser was unable to locate the Cue Time element.
  290. * The segment index data may be corrupt.
  291. */
  292. 'WEBM_CUE_TIME_ELEMENT_MISSING': 3013,
  293. /**
  294. * A MediaSource operation failed.
  295. * <br> error.data[0] is a MediaError code from the video element.
  296. */
  297. 'MEDIA_SOURCE_OPERATION_FAILED': 3014,
  298. /**
  299. * A MediaSource operation threw an exception.
  300. * <br> error.data[0] is the exception that was thrown.
  301. */
  302. 'MEDIA_SOURCE_OPERATION_THREW': 3015,
  303. /**
  304. * The video element reported an error.
  305. * <br> error.data[0] is a MediaError code from the video element.
  306. * <br> On Edge & IE, error.data[1] is a Microsoft extended error code in hex.
  307. * <br> On Chrome, error.data[2] is a string with details on the error.
  308. */
  309. 'VIDEO_ERROR': 3016,
  310. /**
  311. * A MediaSource operation threw QuotaExceededError and recovery failed. The
  312. * content cannot be played correctly because the segments are too large for
  313. * the browser/platform. This may occur when attempting to play very high
  314. * quality, very high bitrate content on low-end devices.
  315. * <br> error.data[0] is the type of content which caused the error.
  316. */
  317. 'QUOTA_EXCEEDED_ERROR': 3017,
  318. /**
  319. * The Player was unable to guess the manifest type based on file extension
  320. * or MIME type. To fix, try one of the following:
  321. * <br><ul>
  322. * <li>Rename the manifest so that the URI ends in a well-known extension.
  323. * <li>Configure the server to send a recognizable Content-Type header.
  324. * <li>Configure the server to accept a HEAD request for the manifest.
  325. * </ul>
  326. * <br> error.data[0] is the manifest URI.
  327. */
  328. 'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
  329. /** The DASH Manifest contained invalid XML markup. */
  330. 'DASH_INVALID_XML': 4001,
  331. /**
  332. * The DASH Manifest contained a Representation with insufficient segment
  333. * information.
  334. */
  335. 'DASH_NO_SEGMENT_INFO': 4002,
  336. /** The DASH Manifest contained an AdaptationSet with no Representations. */
  337. 'DASH_EMPTY_ADAPTATION_SET': 4003,
  338. /** The DASH Manifest contained an Period with no AdaptationSets. */
  339. 'DASH_EMPTY_PERIOD': 4004,
  340. /**
  341. * The DASH Manifest does not specify an init segment with a WebM container.
  342. */
  343. 'DASH_WEBM_MISSING_INIT': 4005,
  344. /** The DASH Manifest contained an unsupported container format. */
  345. 'DASH_UNSUPPORTED_CONTAINER': 4006,
  346. /** The embedded PSSH data has invalid encoding. */
  347. 'DASH_PSSH_BAD_ENCODING': 4007,
  348. /**
  349. * There is an AdaptationSet whose Representations do not have any common
  350. * key-systems.
  351. */
  352. 'DASH_NO_COMMON_KEY_SYSTEM': 4008,
  353. /** Having multiple key IDs per Representation is not supported. */
  354. 'DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED': 4009,
  355. /** The DASH Manifest specifies conflicting key IDs. */
  356. 'DASH_CONFLICTING_KEY_IDS': 4010,
  357. /**
  358. * The manifest contains a period with no playable streams.
  359. * Either the period was originally empty, or the streams within cannot be
  360. * played on this browser or platform.
  361. */
  362. 'UNPLAYABLE_PERIOD': 4011,
  363. /**
  364. * There exist some streams that could be decoded, but restrictions imposed
  365. * by the application or the key system prevent us from playing. This may
  366. * happen under the following conditions:
  367. * <ul>
  368. * <li>The application has given restrictions to the Player that restrict
  369. * at least one content type completely (e.g. no playable audio).
  370. * <li>The key system has imposed output restrictions that cannot be met
  371. * (such as HDCP) and there are no unrestricted alternatives.
  372. * </ul>
  373. */
  374. 'RESTRICTIONS_CANNOT_BE_MET': 4012,
  375. // RETIRED: 'INTERNAL_ERROR_KEY_STATUS': 4013,
  376. /**
  377. * No valid periods were found in the manifest. Please check that your
  378. * manifest is correct and free of typos.
  379. */
  380. 'NO_PERIODS': 4014,
  381. /**
  382. * HLS playlist doesn't start with a mandory #EXTM3U tag.
  383. */
  384. 'HLS_PLAYLIST_HEADER_MISSING': 4015,
  385. /**
  386. * HLS tag has an invalid name that doesn't start with '#EXT'
  387. */
  388. 'INVALID_HLS_TAG': 4016,
  389. /**
  390. * HLS playlist has both Master and Media/Segment tags.
  391. */
  392. 'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
  393. /**
  394. * A Representation has an id that is the same as another Representation in
  395. * the same Period. This makes manifest updates impossible since we cannot
  396. * map the updated Representation to the old one.
  397. */
  398. 'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
  399. // RETIRED: 'HLS_MEDIA_INIT_SECTION_INFO_MISSING': 4019,
  400. /**
  401. * HLS manifest has several #EXT-X-MAP tags. We can only
  402. * support one at the moment.
  403. */
  404. 'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
  405. /**
  406. * HLS parser was unable to guess mime type of a stream.
  407. * <br> error.data[0] is the stream file's extension.
  408. */
  409. 'HLS_COULD_NOT_GUESS_MIME_TYPE': 4021,
  410. /**
  411. * No Master Playlist has been provided. Master playlist provides
  412. * vital information about the streams (like codecs) that is
  413. * required for MediaSource. We don't support directly providing
  414. * a Media Playlist.
  415. */
  416. 'HLS_MASTER_PLAYLIST_NOT_PROVIDED': 4022,
  417. /**
  418. * One of the required attributes was not provided.
  419. * HLS manifest is invalid.
  420. * <br> error.data[0] is the missing attribute's name.
  421. */
  422. 'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
  423. /**
  424. * One of the required tags was not provided.
  425. * HLS manifest is invalid.
  426. * <br> error.data[0] is the missing tag's name.
  427. */
  428. 'HLS_REQUIRED_TAG_MISSING': 4024,
  429. /**
  430. * HLS parser was unable to guess codecs of a stream.
  431. * <br> error.data[0] is the list of all codecs for the variant.
  432. */
  433. 'HLS_COULD_NOT_GUESS_CODECS': 4025,
  434. /**
  435. * HLS parser has encountered encrypted content with unsupported
  436. * KEYFORMAT attributes.
  437. */
  438. 'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
  439. /**
  440. * The manifest parser only supports xlink links with
  441. * xlink:actuate="onLoad".
  442. */
  443. 'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
  444. /**
  445. * The manifest parser has hit its depth limit on
  446. * xlink link chains.
  447. */
  448. 'DASH_XLINK_DEPTH_LIMIT': 4028,
  449. /**
  450. * HLS parser encountered a live playlist.
  451. */
  452. 'HLS_LIVE_CONTENT_NOT_SUPPORTED': 4029,
  453. // RETIRED: 'INCONSISTENT_BUFFER_STATE': 5000,
  454. // RETIRED: 'INVALID_SEGMENT_INDEX': 5001,
  455. // RETIRED: 'SEGMENT_DOES_NOT_EXIST': 5002,
  456. // RETIRED: 'CANNOT_SATISFY_BYTE_LIMIT': 5003,
  457. // RETIRED: 'BAD_SEGMENT': 5004,
  458. /**
  459. * The StreamingEngine called onChooseStreams() but the callback receiver
  460. * did not return the correct number or type of Streams.
  461. *
  462. * This can happen when there is multi-Period content where one Period is
  463. * video+audio and another is video-only or audio-only. We don't support this
  464. * case because it is incompatible with MSE. When the browser reaches the
  465. * transition, it will pause, waiting for the audio stream.
  466. */
  467. 'INVALID_STREAMS_CHOSEN': 5005,
  468. /**
  469. * The manifest indicated protected content, but the manifest parser was
  470. * unable to determine what key systems should be used.
  471. */
  472. 'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
  473. /**
  474. * None of the requested key system configurations are available. This may
  475. * happen under the following conditions:
  476. * <ul>
  477. * <li> The key system is not supported.
  478. * <li> The key system does not support the features requested (e.g.
  479. * persistent state).
  480. * <li> A user prompt was shown and the user denied access.
  481. * <li> The key system is not available from unsecure contexts. (ie.
  482. requires HTTPS) See https://goo.gl/EEhZqT.
  483. * </ul>
  484. */
  485. 'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
  486. /**
  487. * The browser found one of the requested key systems, but it failed to
  488. * create an instance of the CDM for some unknown reason.
  489. * <br> error.data[0] is an error message string from the browser.
  490. */
  491. 'FAILED_TO_CREATE_CDM': 6002,
  492. /**
  493. * The browser found one of the requested key systems and created an instance
  494. * of the CDM, but it failed to attach the CDM to the video for some unknown
  495. * reason.
  496. * <br> error.data[0] is an error message string from the browser.
  497. */
  498. 'FAILED_TO_ATTACH_TO_VIDEO': 6003,
  499. /**
  500. * The CDM rejected the server certificate supplied by the application.
  501. * The certificate may be malformed or in an unsupported format.
  502. * <br> error.data[0] is an error message string from the browser.
  503. */
  504. 'INVALID_SERVER_CERTIFICATE': 6004,
  505. /**
  506. * The CDM refused to create a session for some unknown reason.
  507. * <br> error.data[0] is an error message string from the browser.
  508. */
  509. 'FAILED_TO_CREATE_SESSION': 6005,
  510. /**
  511. * The CDM was unable to generate a license request for the init data it was
  512. * given. The init data may be malformed or in an unsupported format.
  513. * <br> error.data[0] is an error message string from the browser.
  514. */
  515. 'FAILED_TO_GENERATE_LICENSE_REQUEST': 6006,
  516. /**
  517. * The license request failed. This could be a timeout, a network failure, or
  518. * a rejection by the server.
  519. * <br> error.data[0] is a shaka.util.Error from the networking engine.
  520. */
  521. 'LICENSE_REQUEST_FAILED': 6007,
  522. /**
  523. * The license response was rejected by the CDM. The server's response may be
  524. * invalid or malformed for this CDM.
  525. * <br> error.data[0] is an error message string from the browser.
  526. */
  527. 'LICENSE_RESPONSE_REJECTED': 6008,
  528. // RETIRED: 'NO_LICENSE_SERVER_SPECIFIED': 6009,
  529. /**
  530. * The manifest does not specify any DRM info, but the content is encrypted.
  531. * Either the manifest or the manifest parser are broken.
  532. */
  533. 'ENCRYPTED_CONTENT_WITHOUT_DRM_INFO': 6010,
  534. // RETIRED: 'WRONG_KEYS': 6011,
  535. /**
  536. * No license server was given for the key system signaled by the manifest.
  537. * A license server URI is required for every key system.
  538. */
  539. 'NO_LICENSE_SERVER_GIVEN': 6012,
  540. /**
  541. * A required offline session was removed. The content is not playable.
  542. */
  543. 'OFFLINE_SESSION_REMOVED': 6013,
  544. /**
  545. * The license has expired. This is triggered when playback is stalled on a
  546. * 'waitingforkeys' event and there are any expired keys in the key status map
  547. * of any active session.
  548. */
  549. 'EXPIRED': 6014,
  550. /**
  551. * The call to Player.load() was interrupted by a call to Player.unload()
  552. * or another call to Player.load().
  553. */
  554. 'LOAD_INTERRUPTED': 7000,
  555. /**
  556. * The Cast API is unavailable. This may be because of one of the following:
  557. * - The browser may not have Cast support
  558. * - The browser may be missing a necessary Cast extension
  559. * - The Cast sender library may not be loaded in your app
  560. */
  561. 'CAST_API_UNAVAILABLE': 8000,
  562. /**
  563. * No cast receivers are available at this time.
  564. */
  565. 'NO_CAST_RECEIVERS': 8001,
  566. /**
  567. * The library is already casting.
  568. */
  569. 'ALREADY_CASTING': 8002,
  570. /**
  571. * A Cast SDK error that we did not explicitly plan for has occurred.
  572. * Check data[0] and refer to the Cast SDK documentation for details.
  573. * <br> error.data[0] is an error object from the Cast SDK.
  574. */
  575. 'UNEXPECTED_CAST_ERROR': 8003,
  576. /**
  577. * The cast operation was canceled by the user.
  578. * <br> error.data[0] is an error object from the Cast SDK.
  579. */
  580. 'CAST_CANCELED_BY_USER': 8004,
  581. /**
  582. * The cast connection timed out.
  583. * <br> error.data[0] is an error object from the Cast SDK.
  584. */
  585. 'CAST_CONNECTION_TIMED_OUT': 8005,
  586. /**
  587. * The requested receiver app ID does not exist or is unavailable.
  588. * Check the requested app ID for typos.
  589. * <br> error.data[0] is an error object from the Cast SDK.
  590. */
  591. 'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
  592. /**
  593. * Offline storage is not supported on this browser; it is required for
  594. * offline support.
  595. */
  596. 'STORAGE_NOT_SUPPORTED': 9000,
  597. /**
  598. * An unknown error occurred in the IndexedDB.
  599. * <br> On Firefox, one common source for UnknownError calls is reverting
  600. * Firefox to an old version. This makes the indexedDB storage inaccessible
  601. * for older versions. The only way to fix this is to delete the storage
  602. * data in your profile. See https://goo.gl/eKVPPe.
  603. * <br> error.data[0] is the error object.
  604. */
  605. 'INDEXED_DB_ERROR': 9001,
  606. /**
  607. * The operation was aborted. For example, by a call to destroy().
  608. */
  609. 'OPERATION_ABORTED': 9002,
  610. /**
  611. * The specified item was not found in the IndexedDB.
  612. * <br> error.data[0] is the offline URI.
  613. */
  614. 'REQUESTED_ITEM_NOT_FOUND': 9003,
  615. /**
  616. * A network request was made with a malformed offline URI.
  617. * <br> error.data[0] is the URI.
  618. */
  619. 'MALFORMED_OFFLINE_URI': 9004,
  620. /**
  621. * The specified content is live or in-progress.
  622. * Live and in-progress streams cannot be stored offline.
  623. * <br> error.data[0] is the URI.
  624. */
  625. 'CANNOT_STORE_LIVE_OFFLINE': 9005,
  626. /**
  627. * There is already a store operation in-progress, wait until it completes
  628. * before starting another.
  629. */
  630. 'STORE_ALREADY_IN_PROGRESS': 9006,
  631. /**
  632. * The specified manifest is encrypted but does not specify any init data.
  633. * Without init data specified in the manifest, the content will not be
  634. * playable offline.
  635. * <br> error.data[0] is the URI.
  636. */
  637. 'NO_INIT_DATA_FOR_OFFLINE': 9007,
  638. /**
  639. * shaka.offline.Storage was constructed with a Player proxy instead of a
  640. * local player instance. To fix this, use Player directly with Storage
  641. * instead of the results of CastProxy.prototype.getPlayer().
  642. */
  643. 'LOCAL_PLAYER_INSTANCE_REQUIRED': 9008,
  644. /**
  645. * When the manifest contains no period playable streams, it means the
  646. * manifest is unsupported by the browser.
  647. */
  648. 'CONTENT_UNSUPPORTED_BY_BROWSER': 9009
  649. };