vtt_codecs.js 18 KB

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