Instantly share code, notes, and snippets.
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save mosaicer/10d58fb4e220bdfcf74fd7b796d52cfc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package jp.cyanoa.ytplayer.models | |
| val itags = arrayListOf( | |
| Itag(5, Container.FLV, Content.AUDIO_VIDEO, 240), | |
| Itag(6, Container.FLV, Content.AUDIO_VIDEO, 270), | |
| Itag(17, Container._3GP, Content.AUDIO_VIDEO, 144), | |
| Itag(18, Container.MP4, Content.AUDIO_VIDEO, 360), | |
| Itag(22, Container.MP4, Content.AUDIO_VIDEO, 720), | |
| Itag(34, Container.FLV, Content.AUDIO_VIDEO, 360), | |
| Itag(35, Container.FLV, Content.AUDIO_VIDEO, 480), | |
| Itag(36, Container._3GP, Content.AUDIO_VIDEO, 180), | |
| Itag(37, Container.MP4, Content.AUDIO_VIDEO, 1080), | |
| Itag(38, Container.MP4, Content.AUDIO_VIDEO, 3072), | |
| Itag(43, Container.WEBM, Content.AUDIO_VIDEO, 360), | |
| Itag(44, Container.WEBM, Content.AUDIO_VIDEO, 480), | |
| Itag(45, Container.WEBM, Content.AUDIO_VIDEO, 720), | |
| Itag(46, Container.WEBM, Content.AUDIO_VIDEO, 1080), | |
| Itag(82, Container.MP4, Content.AUDIO_VIDEO, 360, is3D = true), | |
| Itag(83, Container.MP4, Content.AUDIO_VIDEO, 480, is3D = true), | |
| Itag(84, Container.MP4, Content.AUDIO_VIDEO, 720, is3D = true), | |
| Itag(85, Container.MP4, Content.AUDIO_VIDEO, 1080, is3D = true), | |
| Itag(92, Container.HLS, Content.AUDIO_VIDEO, 240, is3D = true), | |
| Itag(93, Container.HLS, Content.AUDIO_VIDEO, 360, is3D = true), | |
| Itag(94, Container.HLS, Content.AUDIO_VIDEO, 480, is3D = true), | |
| Itag(95, Container.HLS, Content.AUDIO_VIDEO, 720, is3D = true), | |
| Itag(96, Container.HLS, Content.AUDIO_VIDEO, 1080), | |
| Itag(100, Container.WEBM, Content.AUDIO_VIDEO, 360, is3D = true), | |
| Itag(101, Container.WEBM, Content.AUDIO_VIDEO, 480, is3D = true), | |
| Itag(102, Container.WEBM, Content.AUDIO_VIDEO, 720, is3D = true), | |
| Itag(132, Container.HLS, Content.AUDIO_VIDEO, 240), | |
| Itag(151, Container.HLS, Content.AUDIO_VIDEO, 72), | |
| Itag(139, Container.M4A, Content.AUDIO, bitrate = 48000), | |
| Itag(140, Container.M4A, Content.AUDIO, bitrate = 128000), | |
| Itag(141, Container.M4A, Content.AUDIO, bitrate = 256000), | |
| Itag(171, Container.WEBM, Content.AUDIO, bitrate = 128000), | |
| Itag(249, Container.WEBM, Content.AUDIO, bitrate = 50000), | |
| Itag(250, Container.WEBM, Content.AUDIO, bitrate = 70000), | |
| Itag(251, Container.WEBM, Content.AUDIO, bitrate = 160000), | |
| Itag(133, Container.MP4, Content.VIDEO, 240), | |
| Itag(134, Container.MP4, Content.VIDEO, 360), | |
| Itag(135, Container.MP4, Content.VIDEO, 480), | |
| Itag(136, Container.MP4, Content.VIDEO, 720), | |
| Itag(137, Container.MP4, Content.VIDEO, 1080), | |
| Itag(138, Container.MP4, Content.VIDEO, 2160, fps = 60), | |
| Itag(160, Container.MP4, Content.VIDEO, 144), | |
| Itag(167, Container.WEBM, Content.VIDEO, 360), | |
| Itag(168, Container.WEBM, Content.VIDEO, 480), | |
| Itag(169, Container.WEBM, Content.VIDEO, 1080), | |
| Itag(218, Container.WEBM, Content.VIDEO, 480), | |
| Itag(219, Container.WEBM, Content.VIDEO, 144), | |
| Itag(242, Container.WEBM, Content.VIDEO, 240), | |
| Itag(243, Container.WEBM, Content.VIDEO, 360), | |
| Itag(244, Container.WEBM, Content.VIDEO, 480), | |
| Itag(245, Container.WEBM, Content.VIDEO, 480), | |
| Itag(246, Container.WEBM, Content.VIDEO, 480), | |
| Itag(247, Container.WEBM, Content.VIDEO, 720), | |
| Itag(248, Container.WEBM, Content.VIDEO, 1080), | |
| Itag(264, Container.MP4, Content.VIDEO, 1440), | |
| Itag(266, Container.MP4, Content.VIDEO, 2160, fps = 60), | |
| Itag(271, Container.WEBM, Content.VIDEO, 1440), | |
| Itag(272, Container.WEBM, Content.VIDEO, 4320), | |
| Itag(278, Container.WEBM, Content.VIDEO, 144), | |
| Itag(298, Container.MP4, Content.VIDEO, 720, fps = 60), | |
| Itag(299, Container.MP4, Content.VIDEO, 1080, fps = 60), | |
| Itag(302, Container.WEBM, Content.VIDEO, 720, fps = 60), | |
| Itag(303, Container.WEBM, Content.VIDEO, 1080, fps = 60), | |
| Itag(308, Container.WEBM, Content.VIDEO, 1440, fps = 60), | |
| Itag(313, Container.WEBM, Content.VIDEO, 2160), | |
| Itag(315, Container.WEBM, Content.VIDEO, 2160, fps = 60), | |
| Itag(330, Container.WEBM, Content.VIDEO, 144, fps = 60, isHDR = true), | |
| Itag(331, Container.WEBM, Content.VIDEO, 240, fps = 60, isHDR = true), | |
| Itag(332, Container.WEBM, Content.VIDEO, 360, fps = 60, isHDR = true), | |
| Itag(333, Container.WEBM, Content.VIDEO, 480, fps = 60, isHDR = true), | |
| Itag(334, Container.WEBM, Content.VIDEO, 720, fps = 60, isHDR = true), | |
| Itag(335, Container.WEBM, Content.VIDEO, 1080, fps = 60, isHDR = true), | |
| Itag(336, Container.WEBM, Content.VIDEO, 1440, fps = 60, isHDR = true), | |
| Itag(337, Container.WEBM, Content.VIDEO, 2160, fps = 60, isHDR = true), | |
| Itag(394, Container.MP4, Content.VIDEO, 144), | |
| Itag(395, Container.MP4, Content.VIDEO, 240), | |
| Itag(396, Container.MP4, Content.VIDEO, 360), | |
| Itag(397, Container.MP4, Content.VIDEO, 480), | |
| Itag(398, Container.MP4, Content.VIDEO, 720), | |
| Itag(399, Container.MP4, Content.VIDEO, 1080), | |
| Itag(400, Container.MP4, Content.VIDEO, 1440), | |
| Itag(401, Container.MP4, Content.VIDEO, 2160), | |
| Itag(402, Container.MP4, Content.VIDEO, 2880) | |
| ) | |
| data class Itag( | |
| val code: Int, | |
| val container: Container, | |
| val content: Content, | |
| val resolution: Int? = null, | |
| val fps: Int? = null, | |
| val isHDR: Boolean? = null, | |
| val bitrate: Int? = null, | |
| val isVR: Boolean? = null, | |
| val is3D: Boolean? = null | |
| ) | |
| enum class Container { | |
| FLV, | |
| _3GP, | |
| MP4, | |
| WEBM, | |
| HLS, | |
| M4A, | |
| } | |
| enum class Content { | |
| AUDIO_VIDEO, | |
| AUDIO, | |
| VIDEO | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment