vtt_codecs.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. export const parsedManifest = {
  2. allowCache: true,
  3. discontinuityStarts: [],
  4. segments: [],
  5. timelineStarts: [{
  6. start: 0,
  7. timeline: 0
  8. }],
  9. endList: true,
  10. mediaGroups: {
  11. 'AUDIO': {
  12. audio: {
  13. 'en (main)': {
  14. language: 'en',
  15. autoselect: true,
  16. default: true,
  17. playlists: [
  18. {
  19. attributes: {
  20. 'NAME': '63000',
  21. 'BANDWIDTH': 63000,
  22. 'CODECS': 'mp4a.40.2',
  23. 'PROGRAM-ID': 1
  24. },
  25. uri: '',
  26. endList: true,
  27. timeline: 0,
  28. resolvedUri: 'https://www.example.com/base',
  29. targetDuration: 1.984,
  30. segments: [
  31. {
  32. uri: '63000/0.m4f',
  33. timeline: 0,
  34. duration: 1.984,
  35. resolvedUri: 'https://www.example.com/63000/0.m4f',
  36. map: {
  37. uri: '63000/init.m4f',
  38. resolvedUri: 'https://www.example.com/63000/init.m4f'
  39. },
  40. number: 0,
  41. presentationTime: 0
  42. },
  43. {
  44. uri: '63000/1.m4f',
  45. timeline: 0,
  46. duration: 1.984,
  47. resolvedUri: 'https://www.example.com/63000/1.m4f',
  48. map: {
  49. uri: '63000/init.m4f',
  50. resolvedUri: 'https://www.example.com/63000/init.m4f'
  51. },
  52. number: 1,
  53. presentationTime: 1.984
  54. },
  55. {
  56. uri: '63000/2.m4f',
  57. timeline: 0,
  58. duration: 1.984,
  59. resolvedUri: 'https://www.example.com/63000/2.m4f',
  60. map: {
  61. uri: '63000/init.m4f',
  62. resolvedUri: 'https://www.example.com/63000/init.m4f'
  63. },
  64. number: 2,
  65. presentationTime: 3.968
  66. },
  67. {
  68. uri: '63000/3.m4f',
  69. timeline: 0,
  70. duration: 0.04800000000000004,
  71. resolvedUri: 'https://www.example.com/63000/3.m4f',
  72. map: {
  73. uri: '63000/init.m4f',
  74. resolvedUri: 'https://www.example.com/63000/init.m4f'
  75. },
  76. number: 3,
  77. presentationTime: 5.952
  78. }
  79. ],
  80. mediaSequence: 0,
  81. discontinuitySequence: 0,
  82. discontinuityStarts: [],
  83. timelineStarts: [{
  84. start: 0,
  85. timeline: 0
  86. }],
  87. contentProtection: {
  88. 'com.widevine.alpha': {
  89. attributes: {
  90. schemeIdUri: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'
  91. },
  92. pssh: new Uint8Array([181, 235, 45])
  93. },
  94. 'mp4protection': {
  95. attributes: {
  96. 'cenc:default_KID': 'aaa',
  97. 'schemeIdUri': 'urn:mpeg:dash:mp4protection:2011',
  98. 'value': 'cenc'
  99. }
  100. }
  101. }
  102. },
  103. {
  104. attributes: {
  105. 'NAME': '125000',
  106. 'BANDWIDTH': 125000,
  107. 'CODECS': 'mp4a.40.2',
  108. 'PROGRAM-ID': 1
  109. },
  110. uri: '',
  111. endList: true,
  112. timeline: 0,
  113. resolvedUri: 'https://www.example.com/base',
  114. targetDuration: 1.984,
  115. segments: [
  116. {
  117. uri: '125000/0.m4f',
  118. timeline: 0,
  119. duration: 1.984,
  120. resolvedUri: 'https://www.example.com/125000/0.m4f',
  121. map: {
  122. uri: '125000/init.m4f',
  123. resolvedUri: 'https://www.example.com/125000/init.m4f'
  124. },
  125. number: 0,
  126. presentationTime: 0
  127. },
  128. {
  129. uri: '125000/1.m4f',
  130. timeline: 0,
  131. duration: 1.984,
  132. resolvedUri: 'https://www.example.com/125000/1.m4f',
  133. map: {
  134. uri: '125000/init.m4f',
  135. resolvedUri: 'https://www.example.com/125000/init.m4f'
  136. },
  137. number: 1,
  138. presentationTime: 1.984
  139. },
  140. {
  141. uri: '125000/2.m4f',
  142. timeline: 0,
  143. duration: 1.984,
  144. resolvedUri: 'https://www.example.com/125000/2.m4f',
  145. map: {
  146. uri: '125000/init.m4f',
  147. resolvedUri: 'https://www.example.com/125000/init.m4f'
  148. },
  149. number: 2,
  150. presentationTime: 3.968
  151. },
  152. {
  153. uri: '125000/3.m4f',
  154. timeline: 0,
  155. duration: 0.04800000000000004,
  156. resolvedUri: 'https://www.example.com/125000/3.m4f',
  157. map: {
  158. uri: '125000/init.m4f',
  159. resolvedUri: 'https://www.example.com/125000/init.m4f'
  160. },
  161. number: 3,
  162. presentationTime: 5.952
  163. }
  164. ],
  165. mediaSequence: 0,
  166. discontinuitySequence: 0,
  167. discontinuityStarts: [],
  168. timelineStarts: [{
  169. start: 0,
  170. timeline: 0
  171. }],
  172. contentProtection: {
  173. 'com.widevine.alpha': {
  174. attributes: {
  175. schemeIdUri: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'
  176. },
  177. pssh: new Uint8Array([181, 235, 45])
  178. },
  179. 'mp4protection': {
  180. attributes: {
  181. 'cenc:default_KID': 'aaa',
  182. 'schemeIdUri': 'urn:mpeg:dash:mp4protection:2011',
  183. 'value': 'cenc'
  184. }
  185. }
  186. }
  187. }
  188. ],
  189. uri: ''
  190. },
  191. 'es': {
  192. language: 'es',
  193. autoselect: true,
  194. default: false,
  195. playlists: [
  196. {
  197. attributes: {
  198. 'NAME': '63000',
  199. 'BANDWIDTH': 63000,
  200. 'CODECS': 'mp4a.40.2',
  201. 'PROGRAM-ID': 1
  202. },
  203. uri: '',
  204. endList: true,
  205. timeline: 0,
  206. resolvedUri: 'https://www.example.com/base',
  207. targetDuration: 1.984,
  208. segments: [
  209. {
  210. uri: '63000/es/0.m4f',
  211. timeline: 0,
  212. duration: 1.984,
  213. resolvedUri: 'https://www.example.com/63000/es/0.m4f',
  214. map: {
  215. uri: '63000/es/init.m4f',
  216. resolvedUri: 'https://www.example.com/63000/es/init.m4f'
  217. },
  218. number: 0,
  219. presentationTime: 0
  220. },
  221. {
  222. uri: '63000/es/1.m4f',
  223. timeline: 0,
  224. duration: 1.984,
  225. resolvedUri: 'https://www.example.com/63000/es/1.m4f',
  226. map: {
  227. uri: '63000/es/init.m4f',
  228. resolvedUri: 'https://www.example.com/63000/es/init.m4f'
  229. },
  230. number: 1,
  231. presentationTime: 1.984
  232. },
  233. {
  234. uri: '63000/es/2.m4f',
  235. timeline: 0,
  236. duration: 1.984,
  237. resolvedUri: 'https://www.example.com/63000/es/2.m4f',
  238. map: {
  239. uri: '63000/es/init.m4f',
  240. resolvedUri: 'https://www.example.com/63000/es/init.m4f'
  241. },
  242. number: 2,
  243. presentationTime: 3.968
  244. },
  245. {
  246. uri: '63000/es/3.m4f',
  247. timeline: 0,
  248. duration: 0.04800000000000004,
  249. resolvedUri: 'https://www.example.com/63000/es/3.m4f',
  250. map: {
  251. uri: '63000/es/init.m4f',
  252. resolvedUri: 'https://www.example.com/63000/es/init.m4f'
  253. },
  254. number: 3,
  255. presentationTime: 5.952
  256. }
  257. ],
  258. mediaSequence: 0,
  259. discontinuitySequence: 0,
  260. discontinuityStarts: [],
  261. timelineStarts: [{
  262. start: 0,
  263. timeline: 0
  264. }],
  265. contentProtection: {
  266. 'com.widevine.alpha': {
  267. attributes: {
  268. schemeIdUri: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'
  269. },
  270. pssh: new Uint8Array([181, 235, 45])
  271. },
  272. 'mp4protection': {
  273. attributes: {
  274. 'cenc:default_KID': 'aaa',
  275. 'schemeIdUri': 'urn:mpeg:dash:mp4protection:2011',
  276. 'value': 'cenc'
  277. }
  278. }
  279. }
  280. },
  281. {
  282. attributes: {
  283. 'NAME': '125000',
  284. 'BANDWIDTH': 125000,
  285. 'CODECS': 'mp4a.40.2',
  286. 'PROGRAM-ID': 1
  287. },
  288. uri: '',
  289. endList: true,
  290. timeline: 0,
  291. resolvedUri: 'https://www.example.com/base',
  292. targetDuration: 1.984,
  293. segments: [
  294. {
  295. uri: '125000/es/0.m4f',
  296. timeline: 0,
  297. duration: 1.984,
  298. resolvedUri: 'https://www.example.com/125000/es/0.m4f',
  299. map: {
  300. uri: '125000/es/init.m4f',
  301. resolvedUri: 'https://www.example.com/125000/es/init.m4f'
  302. },
  303. number: 0,
  304. presentationTime: 0
  305. },
  306. {
  307. uri: '125000/es/1.m4f',
  308. timeline: 0,
  309. duration: 1.984,
  310. resolvedUri: 'https://www.example.com/125000/es/1.m4f',
  311. map: {
  312. uri: '125000/es/init.m4f',
  313. resolvedUri: 'https://www.example.com/125000/es/init.m4f'
  314. },
  315. number: 1,
  316. presentationTime: 1.984
  317. },
  318. {
  319. uri: '125000/es/2.m4f',
  320. timeline: 0,
  321. duration: 1.984,
  322. resolvedUri: 'https://www.example.com/125000/es/2.m4f',
  323. map: {
  324. uri: '125000/es/init.m4f',
  325. resolvedUri: 'https://www.example.com/125000/es/init.m4f'
  326. },
  327. number: 2,
  328. presentationTime: 3.968
  329. },
  330. {
  331. uri: '125000/es/3.m4f',
  332. timeline: 0,
  333. duration: 0.04800000000000004,
  334. resolvedUri: 'https://www.example.com/125000/es/3.m4f',
  335. map: {
  336. uri: '125000/es/init.m4f',
  337. resolvedUri: 'https://www.example.com/125000/es/init.m4f'
  338. },
  339. number: 3,
  340. presentationTime: 5.952
  341. }
  342. ],
  343. mediaSequence: 0,
  344. discontinuitySequence: 0,
  345. discontinuityStarts: [],
  346. timelineStarts: [{
  347. start: 0,
  348. timeline: 0
  349. }],
  350. contentProtection: {
  351. 'com.widevine.alpha': {
  352. attributes: {
  353. schemeIdUri: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'
  354. },
  355. pssh: new Uint8Array([181, 235, 45])
  356. },
  357. 'mp4protection': {
  358. attributes: {
  359. 'cenc:default_KID': 'aaa',
  360. 'schemeIdUri': 'urn:mpeg:dash:mp4protection:2011',
  361. 'value': 'cenc'
  362. }
  363. }
  364. }
  365. }
  366. ],
  367. uri: ''
  368. }
  369. }
  370. },
  371. 'VIDEO': {},
  372. 'CLOSED-CAPTIONS': {},
  373. 'SUBTITLES': {
  374. subs: {
  375. en: {
  376. language: 'en',
  377. default: false,
  378. autoselect: false,
  379. playlists: [
  380. {
  381. attributes: {
  382. 'NAME': 'en',
  383. 'BANDWIDTH': 256,
  384. 'PROGRAM-ID': 1,
  385. 'CODECS': 'stpp.ttml.im1t'
  386. },
  387. uri: '',
  388. endList: true,
  389. timeline: 0,
  390. resolvedUri: 'https://example.com/en.dash',
  391. targetDuration: 6,
  392. segments: [
  393. {
  394. uri: 'https://example.com/en.dash',
  395. timeline: 0,
  396. resolvedUri: 'https://example.com/en.dash',
  397. duration: 6,
  398. number: 0
  399. }
  400. ],
  401. mediaSequence: 0,
  402. discontinuitySequence: 0,
  403. discontinuityStarts: [],
  404. timelineStarts: [{
  405. start: 0,
  406. timeline: 0
  407. }]
  408. }
  409. ],
  410. uri: ''
  411. },
  412. es: {
  413. language: 'es',
  414. default: false,
  415. autoselect: false,
  416. playlists: [
  417. {
  418. attributes: {
  419. 'NAME': 'es',
  420. 'BANDWIDTH': 256,
  421. 'PROGRAM-ID': 1
  422. },
  423. uri: '',
  424. endList: true,
  425. timeline: 0,
  426. resolvedUri: 'https://example.com/es.vtt',
  427. targetDuration: 6,
  428. segments: [
  429. {
  430. uri: 'https://example.com/es.vtt',
  431. timeline: 0,
  432. resolvedUri: 'https://example.com/es.vtt',
  433. duration: 6,
  434. number: 0
  435. }
  436. ],
  437. mediaSequence: 0,
  438. discontinuitySequence: 0,
  439. discontinuityStarts: [],
  440. timelineStarts: [{
  441. start: 0,
  442. timeline: 0
  443. }]
  444. }
  445. ],
  446. uri: ''
  447. }
  448. }
  449. }
  450. },
  451. uri: '',
  452. duration: 6,
  453. playlists: [
  454. {
  455. attributes: {
  456. 'AUDIO': 'audio',
  457. 'BANDWIDTH': 449000,
  458. 'CODECS': 'avc1.420015',
  459. 'FRAME-RATE': 23.976,
  460. 'NAME': '482',
  461. 'PROGRAM-ID': 1,
  462. 'RESOLUTION': {
  463. height: 270,
  464. width: 482
  465. },
  466. 'SUBTITLES': 'subs'
  467. },
  468. uri: '',
  469. endList: true,
  470. timeline: 0,
  471. resolvedUri: 'https://www.example.com/base',
  472. targetDuration: 1.9185833333333333,
  473. segments: [
  474. {
  475. uri: '482/0.m4f',
  476. timeline: 0,
  477. duration: 1.9185833333333333,
  478. resolvedUri: 'https://www.example.com/482/0.m4f',
  479. map: {
  480. uri: '482/init.m4f',
  481. resolvedUri: 'https://www.example.com/482/init.m4f'
  482. },
  483. number: 0,
  484. presentationTime: 0
  485. },
  486. {
  487. uri: '482/1.m4f',
  488. timeline: 0,
  489. duration: 1.9185833333333333,
  490. resolvedUri: 'https://www.example.com/482/1.m4f',
  491. map: {
  492. uri: '482/init.m4f',
  493. resolvedUri: 'https://www.example.com/482/init.m4f'
  494. },
  495. number: 1,
  496. presentationTime: 1.9185833333333333
  497. },
  498. {
  499. uri: '482/2.m4f',
  500. timeline: 0,
  501. duration: 1.9185833333333333,
  502. resolvedUri: 'https://www.example.com/482/2.m4f',
  503. map: {
  504. uri: '482/init.m4f',
  505. resolvedUri: 'https://www.example.com/482/init.m4f'
  506. },
  507. number: 2,
  508. presentationTime: 3.8371666666666666
  509. },
  510. {
  511. uri: '482/3.m4f',
  512. timeline: 0,
  513. duration: 0.24425000000000008,
  514. resolvedUri: 'https://www.example.com/482/3.m4f',
  515. map: {
  516. uri: '482/init.m4f',
  517. resolvedUri: 'https://www.example.com/482/init.m4f'
  518. },
  519. number: 3,
  520. presentationTime: 5.75575
  521. }
  522. ],
  523. mediaSequence: 0,
  524. discontinuitySequence: 0,
  525. discontinuityStarts: [],
  526. timelineStarts: [{
  527. start: 0,
  528. timeline: 0
  529. }],
  530. contentProtection: {
  531. 'com.widevine.alpha': {
  532. attributes: {
  533. schemeIdUri: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'
  534. },
  535. pssh: new Uint8Array([181, 235, 45])
  536. },
  537. 'mp4protection': {
  538. attributes: {
  539. 'cenc:default_KID': 'aaa',
  540. 'schemeIdUri': 'urn:mpeg:dash:mp4protection:2011',
  541. 'value': 'cenc'
  542. }
  543. }
  544. }
  545. },
  546. {
  547. attributes: {
  548. 'AUDIO': 'audio',
  549. 'BANDWIDTH': 3971000,
  550. 'CODECS': 'avc1.64001e',
  551. 'FRAME-RATE': 23.976,
  552. 'NAME': '720',
  553. 'PROGRAM-ID': 1,
  554. 'RESOLUTION': {
  555. height: 404,
  556. width: 720
  557. },
  558. 'SUBTITLES': 'subs'
  559. },
  560. uri: '',
  561. endList: true,
  562. timeline: 0,
  563. resolvedUri: 'https://www.example.com/base',
  564. targetDuration: 1.9185833333333333,
  565. segments: [
  566. {
  567. uri: '720/0.m4f',
  568. timeline: 0,
  569. duration: 1.9185833333333333,
  570. resolvedUri: 'https://www.example.com/720/0.m4f',
  571. map: {
  572. uri: '720/init.m4f',
  573. resolvedUri: 'https://www.example.com/720/init.m4f'
  574. },
  575. number: 0,
  576. presentationTime: 0
  577. },
  578. {
  579. uri: '720/1.m4f',
  580. timeline: 0,
  581. duration: 1.9185833333333333,
  582. resolvedUri: 'https://www.example.com/720/1.m4f',
  583. map: {
  584. uri: '720/init.m4f',
  585. resolvedUri: 'https://www.example.com/720/init.m4f'
  586. },
  587. number: 1,
  588. presentationTime: 1.9185833333333333
  589. },
  590. {
  591. uri: '720/2.m4f',
  592. timeline: 0,
  593. duration: 1.9185833333333333,
  594. resolvedUri: 'https://www.example.com/720/2.m4f',
  595. map: {
  596. uri: '720/init.m4f',
  597. resolvedUri: 'https://www.example.com/720/init.m4f'
  598. },
  599. number: 2,
  600. presentationTime: 3.8371666666666666
  601. },
  602. {
  603. uri: '720/3.m4f',
  604. timeline: 0,
  605. duration: 0.24425000000000008,
  606. resolvedUri: 'https://www.example.com/720/3.m4f',
  607. map: {
  608. uri: '720/init.m4f',
  609. resolvedUri: 'https://www.example.com/720/init.m4f'
  610. },
  611. number: 3,
  612. presentationTime: 5.75575
  613. }
  614. ],
  615. mediaSequence: 0,
  616. discontinuitySequence: 0,
  617. discontinuityStarts: [],
  618. timelineStarts: [{
  619. start: 0,
  620. timeline: 0
  621. }],
  622. contentProtection: {
  623. 'com.widevine.alpha': {
  624. attributes: {
  625. schemeIdUri: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'
  626. },
  627. pssh: new Uint8Array([181, 235, 45])
  628. },
  629. 'mp4protection': {
  630. attributes: {
  631. 'cenc:default_KID': 'aaa',
  632. 'schemeIdUri': 'urn:mpeg:dash:mp4protection:2011',
  633. 'value': 'cenc'
  634. }
  635. }
  636. }
  637. }
  638. ]
  639. };