react-native-theoplayer 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (545) hide show
  1. package/CHANGELOG.md +49 -13
  2. package/README.md +16 -2
  3. package/android/src/main/java/com/theoplayer/media/MediaNotificationBuilder.kt +5 -0
  4. package/android/src/main/java/com/theoplayer/media/MediaPlaybackService.kt +31 -8
  5. package/ios/contentprotection/THEOplayerRCTProxyContentProtectionIntegration.swift +19 -29
  6. package/lib/commonjs/api/cast/Chromecast.js.map +1 -1
  7. package/lib/commonjs/index.js +0 -12
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/module/api/cast/Chromecast.js.map +1 -1
  10. package/lib/module/index.js +0 -1
  11. package/lib/module/index.js.map +1 -1
  12. package/lib/typescript/api/cast/Chromecast.d.ts +1 -1
  13. package/lib/typescript/index.d.ts +0 -1
  14. package/package.json +2 -8
  15. package/react-native-theoplayer.podspec +1 -1
  16. package/src/api/cast/Chromecast.ts +1 -1
  17. package/src/index.tsx +0 -1
  18. package/lib/commonjs/ui/THEOplayerDefaultUi.js +0 -82
  19. package/lib/commonjs/ui/THEOplayerDefaultUi.js.map +0 -1
  20. package/lib/commonjs/ui/THEOplayerTheme.js +0 -48
  21. package/lib/commonjs/ui/THEOplayerTheme.js.map +0 -1
  22. package/lib/commonjs/ui/barrel.js +0 -39
  23. package/lib/commonjs/ui/barrel.js.map +0 -1
  24. package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +0 -99
  25. package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +0 -1
  26. package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js +0 -35
  27. package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js.map +0 -1
  28. package/lib/commonjs/ui/components/activityindicator/barrel.js +0 -28
  29. package/lib/commonjs/ui/components/activityindicator/barrel.js.map +0 -1
  30. package/lib/commonjs/ui/components/barrel.js +0 -105
  31. package/lib/commonjs/ui/components/barrel.js.map +0 -1
  32. package/lib/commonjs/ui/components/button/AirplayButton.js +0 -81
  33. package/lib/commonjs/ui/components/button/AirplayButton.js.map +0 -1
  34. package/lib/commonjs/ui/components/button/ChromecastButton.js +0 -66
  35. package/lib/commonjs/ui/components/button/ChromecastButton.js.map +0 -1
  36. package/lib/commonjs/ui/components/button/ChromecastButton.web.js +0 -82
  37. package/lib/commonjs/ui/components/button/ChromecastButton.web.js.map +0 -1
  38. package/lib/commonjs/ui/components/button/FullscreenButton.js +0 -72
  39. package/lib/commonjs/ui/components/button/FullscreenButton.js.map +0 -1
  40. package/lib/commonjs/ui/components/button/MuteButton.js +0 -66
  41. package/lib/commonjs/ui/components/button/MuteButton.js.map +0 -1
  42. package/lib/commonjs/ui/components/button/PipButton.js +0 -72
  43. package/lib/commonjs/ui/components/button/PipButton.js.map +0 -1
  44. package/lib/commonjs/ui/components/button/PlayButton.js +0 -113
  45. package/lib/commonjs/ui/components/button/PlayButton.js.map +0 -1
  46. package/lib/commonjs/ui/components/button/SkipButton.js +0 -122
  47. package/lib/commonjs/ui/components/button/SkipButton.js.map +0 -1
  48. package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js +0 -82
  49. package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js.map +0 -1
  50. package/lib/commonjs/ui/components/button/barrel.js +0 -105
  51. package/lib/commonjs/ui/components/button/barrel.js.map +0 -1
  52. package/lib/commonjs/ui/components/button/svg/AirplaySvg.js +0 -22
  53. package/lib/commonjs/ui/components/button/svg/AirplaySvg.js.map +0 -1
  54. package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js +0 -22
  55. package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js.map +0 -1
  56. package/lib/commonjs/ui/components/button/svg/BackSvg.js +0 -22
  57. package/lib/commonjs/ui/components/button/svg/BackSvg.js.map +0 -1
  58. package/lib/commonjs/ui/components/button/svg/BackwardSvg.js +0 -22
  59. package/lib/commonjs/ui/components/button/svg/BackwardSvg.js.map +0 -1
  60. package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js +0 -22
  61. package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js.map +0 -1
  62. package/lib/commonjs/ui/components/button/svg/ErrorSvg.js +0 -22
  63. package/lib/commonjs/ui/components/button/svg/ErrorSvg.js.map +0 -1
  64. package/lib/commonjs/ui/components/button/svg/ForwardSvg.js +0 -22
  65. package/lib/commonjs/ui/components/button/svg/ForwardSvg.js.map +0 -1
  66. package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js +0 -22
  67. package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js.map +0 -1
  68. package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js +0 -22
  69. package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js.map +0 -1
  70. package/lib/commonjs/ui/components/button/svg/LanguageSvg.js +0 -22
  71. package/lib/commonjs/ui/components/button/svg/LanguageSvg.js.map +0 -1
  72. package/lib/commonjs/ui/components/button/svg/ListSvg.js +0 -22
  73. package/lib/commonjs/ui/components/button/svg/ListSvg.js.map +0 -1
  74. package/lib/commonjs/ui/components/button/svg/PauseSvg.js +0 -22
  75. package/lib/commonjs/ui/components/button/svg/PauseSvg.js.map +0 -1
  76. package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js +0 -22
  77. package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js.map +0 -1
  78. package/lib/commonjs/ui/components/button/svg/PipExitSvg.js +0 -22
  79. package/lib/commonjs/ui/components/button/svg/PipExitSvg.js.map +0 -1
  80. package/lib/commonjs/ui/components/button/svg/PlaySvg.js +0 -22
  81. package/lib/commonjs/ui/components/button/svg/PlaySvg.js.map +0 -1
  82. package/lib/commonjs/ui/components/button/svg/ReplaySvg.js +0 -22
  83. package/lib/commonjs/ui/components/button/svg/ReplaySvg.js.map +0 -1
  84. package/lib/commonjs/ui/components/button/svg/SettingsSvg.js +0 -22
  85. package/lib/commonjs/ui/components/button/svg/SettingsSvg.js.map +0 -1
  86. package/lib/commonjs/ui/components/button/svg/SvgUtils.js +0 -13
  87. package/lib/commonjs/ui/components/button/svg/SvgUtils.js.map +0 -1
  88. package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js +0 -22
  89. package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js.map +0 -1
  90. package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js +0 -22
  91. package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js.map +0 -1
  92. package/lib/commonjs/ui/components/button/svg/barrel.js +0 -226
  93. package/lib/commonjs/ui/components/button/svg/barrel.js.map +0 -1
  94. package/lib/commonjs/ui/components/button/svg/res/AirPlayButton.html +0 -6
  95. package/lib/commonjs/ui/components/button/svg/res/Airplay.svg +0 -1
  96. package/lib/commonjs/ui/components/button/svg/res/ChromecastButton.html +0 -25
  97. package/lib/commonjs/ui/components/button/svg/res/arrow_forward.svg +0 -1
  98. package/lib/commonjs/ui/components/button/svg/res/back.svg +0 -1
  99. package/lib/commonjs/ui/components/button/svg/res/backward.svg +0 -1
  100. package/lib/commonjs/ui/components/button/svg/res/chromecast-48px.svg +0 -1
  101. package/lib/commonjs/ui/components/button/svg/res/close.svg +0 -1
  102. package/lib/commonjs/ui/components/button/svg/res/error.svg +0 -1
  103. package/lib/commonjs/ui/components/button/svg/res/forward.svg +0 -1
  104. package/lib/commonjs/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
  105. package/lib/commonjs/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
  106. package/lib/commonjs/ui/components/button/svg/res/language.svg +0 -1
  107. package/lib/commonjs/ui/components/button/svg/res/list.svg +0 -1
  108. package/lib/commonjs/ui/components/button/svg/res/live.svg +0 -1
  109. package/lib/commonjs/ui/components/button/svg/res/pause.svg +0 -1
  110. package/lib/commonjs/ui/components/button/svg/res/pip_enter.svg +0 -1
  111. package/lib/commonjs/ui/components/button/svg/res/pip_exit.svg +0 -1
  112. package/lib/commonjs/ui/components/button/svg/res/play.svg +0 -1
  113. package/lib/commonjs/ui/components/button/svg/res/replay.svg +0 -1
  114. package/lib/commonjs/ui/components/button/svg/res/settings.svg +0 -1
  115. package/lib/commonjs/ui/components/button/svg/res/skip-next.svg +0 -1
  116. package/lib/commonjs/ui/components/button/svg/res/volume-high.svg +0 -1
  117. package/lib/commonjs/ui/components/button/svg/res/volume-low.svg +0 -1
  118. package/lib/commonjs/ui/components/button/svg/res/volume-off.svg +0 -1
  119. package/lib/commonjs/ui/components/controlbar/ControlBar.js +0 -61
  120. package/lib/commonjs/ui/components/controlbar/ControlBar.js.map +0 -1
  121. package/lib/commonjs/ui/components/controlbar/Spacer.js +0 -21
  122. package/lib/commonjs/ui/components/controlbar/Spacer.js.map +0 -1
  123. package/lib/commonjs/ui/components/controlbar/barrel.js +0 -28
  124. package/lib/commonjs/ui/components/controlbar/barrel.js.map +0 -1
  125. package/lib/commonjs/ui/components/menu/LanguageMenuButton.js +0 -175
  126. package/lib/commonjs/ui/components/menu/LanguageMenuButton.js.map +0 -1
  127. package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js +0 -91
  128. package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js.map +0 -1
  129. package/lib/commonjs/ui/components/menu/QualitySubMenu.js +0 -145
  130. package/lib/commonjs/ui/components/menu/QualitySubMenu.js.map +0 -1
  131. package/lib/commonjs/ui/components/menu/SettingsMenuButton.js +0 -36
  132. package/lib/commonjs/ui/components/menu/SettingsMenuButton.js.map +0 -1
  133. package/lib/commonjs/ui/components/menu/barrel.js +0 -61
  134. package/lib/commonjs/ui/components/menu/barrel.js.map +0 -1
  135. package/lib/commonjs/ui/components/menu/common/MenuButton.js +0 -34
  136. package/lib/commonjs/ui/components/menu/common/MenuButton.js.map +0 -1
  137. package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js +0 -47
  138. package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js.map +0 -1
  139. package/lib/commonjs/ui/components/menu/common/MenuTitle.js +0 -38
  140. package/lib/commonjs/ui/components/menu/common/MenuTitle.js.map +0 -1
  141. package/lib/commonjs/ui/components/menu/common/MenuView.js +0 -75
  142. package/lib/commonjs/ui/components/menu/common/MenuView.js.map +0 -1
  143. package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js +0 -45
  144. package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js.map +0 -1
  145. package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js +0 -65
  146. package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js.map +0 -1
  147. package/lib/commonjs/ui/components/menu/common/barrel.js +0 -72
  148. package/lib/commonjs/ui/components/menu/common/barrel.js.map +0 -1
  149. package/lib/commonjs/ui/components/message/CastMessage.js +0 -79
  150. package/lib/commonjs/ui/components/message/CastMessage.js.map +0 -1
  151. package/lib/commonjs/ui/components/message/ErrorDisplay.js +0 -53
  152. package/lib/commonjs/ui/components/message/ErrorDisplay.js.map +0 -1
  153. package/lib/commonjs/ui/components/message/barrel.js +0 -28
  154. package/lib/commonjs/ui/components/message/barrel.js.map +0 -1
  155. package/lib/commonjs/ui/components/seekbar/SeekBar.js +0 -194
  156. package/lib/commonjs/ui/components/seekbar/SeekBar.js.map +0 -1
  157. package/lib/commonjs/ui/components/seekbar/barrel.js +0 -28
  158. package/lib/commonjs/ui/components/seekbar/barrel.js.map +0 -1
  159. package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js +0 -45
  160. package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +0 -1
  161. package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js +0 -18
  162. package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js.map +0 -1
  163. package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js +0 -256
  164. package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js.map +0 -1
  165. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js +0 -17
  166. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +0 -1
  167. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +0 -10
  168. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +0 -1
  169. package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js +0 -28
  170. package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js.map +0 -1
  171. package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js +0 -55
  172. package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js.map +0 -1
  173. package/lib/commonjs/ui/components/timelabel/TimeLabel.js +0 -88
  174. package/lib/commonjs/ui/components/timelabel/TimeLabel.js.map +0 -1
  175. package/lib/commonjs/ui/components/timelabel/barrel.js +0 -28
  176. package/lib/commonjs/ui/components/timelabel/barrel.js.map +0 -1
  177. package/lib/commonjs/ui/components/uicontroller/UiContainer.js +0 -350
  178. package/lib/commonjs/ui/components/uicontroller/UiContainer.js.map +0 -1
  179. package/lib/commonjs/ui/components/uicontroller/UiControls.js +0 -6
  180. package/lib/commonjs/ui/components/uicontroller/UiControls.js.map +0 -1
  181. package/lib/commonjs/ui/components/uicontroller/barrel.js +0 -28
  182. package/lib/commonjs/ui/components/uicontroller/barrel.js.map +0 -1
  183. package/lib/commonjs/ui/components/util/PlayerContext.js +0 -19
  184. package/lib/commonjs/ui/components/util/PlayerContext.js.map +0 -1
  185. package/lib/commonjs/ui/components/util/TrackUtils.js +0 -69
  186. package/lib/commonjs/ui/components/util/TrackUtils.js.map +0 -1
  187. package/lib/commonjs/ui/components/util/barrel.js +0 -17
  188. package/lib/commonjs/ui/components/util/barrel.js.map +0 -1
  189. package/lib/commonjs/ui/utils/ArrayUtils.js +0 -19
  190. package/lib/commonjs/ui/utils/ArrayUtils.js.map +0 -1
  191. package/lib/commonjs/ui/utils/language/Language.js +0 -38
  192. package/lib/commonjs/ui/utils/language/Language.js.map +0 -1
  193. package/lib/commonjs/ui/utils/language/languages.json +0 -1658
  194. package/lib/module/ui/THEOplayerDefaultUi.js +0 -74
  195. package/lib/module/ui/THEOplayerDefaultUi.js.map +0 -1
  196. package/lib/module/ui/THEOplayerTheme.js +0 -41
  197. package/lib/module/ui/THEOplayerTheme.js.map +0 -1
  198. package/lib/module/ui/barrel.js +0 -4
  199. package/lib/module/ui/barrel.js.map +0 -1
  200. package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +0 -90
  201. package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +0 -1
  202. package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js +0 -26
  203. package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js.map +0 -1
  204. package/lib/module/ui/components/activityindicator/barrel.js +0 -3
  205. package/lib/module/ui/components/activityindicator/barrel.js.map +0 -1
  206. package/lib/module/ui/components/barrel.js +0 -10
  207. package/lib/module/ui/components/barrel.js.map +0 -1
  208. package/lib/module/ui/components/button/AirplayButton.js +0 -72
  209. package/lib/module/ui/components/button/AirplayButton.js.map +0 -1
  210. package/lib/module/ui/components/button/ChromecastButton.js +0 -56
  211. package/lib/module/ui/components/button/ChromecastButton.js.map +0 -1
  212. package/lib/module/ui/components/button/ChromecastButton.web.js +0 -72
  213. package/lib/module/ui/components/button/ChromecastButton.web.js.map +0 -1
  214. package/lib/module/ui/components/button/FullscreenButton.js +0 -63
  215. package/lib/module/ui/components/button/FullscreenButton.js.map +0 -1
  216. package/lib/module/ui/components/button/MuteButton.js +0 -57
  217. package/lib/module/ui/components/button/MuteButton.js.map +0 -1
  218. package/lib/module/ui/components/button/PipButton.js +0 -63
  219. package/lib/module/ui/components/button/PipButton.js.map +0 -1
  220. package/lib/module/ui/components/button/PlayButton.js +0 -104
  221. package/lib/module/ui/components/button/PlayButton.js.map +0 -1
  222. package/lib/module/ui/components/button/SkipButton.js +0 -113
  223. package/lib/module/ui/components/button/SkipButton.js.map +0 -1
  224. package/lib/module/ui/components/button/actionbutton/ActionButton.js +0 -72
  225. package/lib/module/ui/components/button/actionbutton/ActionButton.js.map +0 -1
  226. package/lib/module/ui/components/button/barrel.js +0 -10
  227. package/lib/module/ui/components/button/barrel.js.map +0 -1
  228. package/lib/module/ui/components/button/svg/AirplaySvg.js +0 -12
  229. package/lib/module/ui/components/button/svg/AirplaySvg.js.map +0 -1
  230. package/lib/module/ui/components/button/svg/ArrowForwardSvg.js +0 -12
  231. package/lib/module/ui/components/button/svg/ArrowForwardSvg.js.map +0 -1
  232. package/lib/module/ui/components/button/svg/BackSvg.js +0 -12
  233. package/lib/module/ui/components/button/svg/BackSvg.js.map +0 -1
  234. package/lib/module/ui/components/button/svg/BackwardSvg.js +0 -12
  235. package/lib/module/ui/components/button/svg/BackwardSvg.js.map +0 -1
  236. package/lib/module/ui/components/button/svg/ChromecastSvg.js +0 -12
  237. package/lib/module/ui/components/button/svg/ChromecastSvg.js.map +0 -1
  238. package/lib/module/ui/components/button/svg/ErrorSvg.js +0 -12
  239. package/lib/module/ui/components/button/svg/ErrorSvg.js.map +0 -1
  240. package/lib/module/ui/components/button/svg/ForwardSvg.js +0 -12
  241. package/lib/module/ui/components/button/svg/ForwardSvg.js.map +0 -1
  242. package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js +0 -12
  243. package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js.map +0 -1
  244. package/lib/module/ui/components/button/svg/FullscreenExitSvg.js +0 -12
  245. package/lib/module/ui/components/button/svg/FullscreenExitSvg.js.map +0 -1
  246. package/lib/module/ui/components/button/svg/LanguageSvg.js +0 -12
  247. package/lib/module/ui/components/button/svg/LanguageSvg.js.map +0 -1
  248. package/lib/module/ui/components/button/svg/ListSvg.js +0 -12
  249. package/lib/module/ui/components/button/svg/ListSvg.js.map +0 -1
  250. package/lib/module/ui/components/button/svg/PauseSvg.js +0 -12
  251. package/lib/module/ui/components/button/svg/PauseSvg.js.map +0 -1
  252. package/lib/module/ui/components/button/svg/PipEnterSvg.js +0 -12
  253. package/lib/module/ui/components/button/svg/PipEnterSvg.js.map +0 -1
  254. package/lib/module/ui/components/button/svg/PipExitSvg.js +0 -12
  255. package/lib/module/ui/components/button/svg/PipExitSvg.js.map +0 -1
  256. package/lib/module/ui/components/button/svg/PlaySvg.js +0 -12
  257. package/lib/module/ui/components/button/svg/PlaySvg.js.map +0 -1
  258. package/lib/module/ui/components/button/svg/ReplaySvg.js +0 -12
  259. package/lib/module/ui/components/button/svg/ReplaySvg.js.map +0 -1
  260. package/lib/module/ui/components/button/svg/SettingsSvg.js +0 -12
  261. package/lib/module/ui/components/button/svg/SettingsSvg.js.map +0 -1
  262. package/lib/module/ui/components/button/svg/SvgUtils.js +0 -5
  263. package/lib/module/ui/components/button/svg/SvgUtils.js.map +0 -1
  264. package/lib/module/ui/components/button/svg/VolumeOffSvg.js +0 -12
  265. package/lib/module/ui/components/button/svg/VolumeOffSvg.js.map +0 -1
  266. package/lib/module/ui/components/button/svg/VolumeUpSvg.js +0 -12
  267. package/lib/module/ui/components/button/svg/VolumeUpSvg.js.map +0 -1
  268. package/lib/module/ui/components/button/svg/barrel.js +0 -21
  269. package/lib/module/ui/components/button/svg/barrel.js.map +0 -1
  270. package/lib/module/ui/components/button/svg/res/AirPlayButton.html +0 -6
  271. package/lib/module/ui/components/button/svg/res/Airplay.svg +0 -1
  272. package/lib/module/ui/components/button/svg/res/ChromecastButton.html +0 -25
  273. package/lib/module/ui/components/button/svg/res/arrow_forward.svg +0 -1
  274. package/lib/module/ui/components/button/svg/res/back.svg +0 -1
  275. package/lib/module/ui/components/button/svg/res/backward.svg +0 -1
  276. package/lib/module/ui/components/button/svg/res/chromecast-48px.svg +0 -1
  277. package/lib/module/ui/components/button/svg/res/close.svg +0 -1
  278. package/lib/module/ui/components/button/svg/res/error.svg +0 -1
  279. package/lib/module/ui/components/button/svg/res/forward.svg +0 -1
  280. package/lib/module/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
  281. package/lib/module/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
  282. package/lib/module/ui/components/button/svg/res/language.svg +0 -1
  283. package/lib/module/ui/components/button/svg/res/list.svg +0 -1
  284. package/lib/module/ui/components/button/svg/res/live.svg +0 -1
  285. package/lib/module/ui/components/button/svg/res/pause.svg +0 -1
  286. package/lib/module/ui/components/button/svg/res/pip_enter.svg +0 -1
  287. package/lib/module/ui/components/button/svg/res/pip_exit.svg +0 -1
  288. package/lib/module/ui/components/button/svg/res/play.svg +0 -1
  289. package/lib/module/ui/components/button/svg/res/replay.svg +0 -1
  290. package/lib/module/ui/components/button/svg/res/settings.svg +0 -1
  291. package/lib/module/ui/components/button/svg/res/skip-next.svg +0 -1
  292. package/lib/module/ui/components/button/svg/res/volume-high.svg +0 -1
  293. package/lib/module/ui/components/button/svg/res/volume-low.svg +0 -1
  294. package/lib/module/ui/components/button/svg/res/volume-off.svg +0 -1
  295. package/lib/module/ui/components/controlbar/ControlBar.js +0 -52
  296. package/lib/module/ui/components/controlbar/ControlBar.js.map +0 -1
  297. package/lib/module/ui/components/controlbar/Spacer.js +0 -14
  298. package/lib/module/ui/components/controlbar/Spacer.js.map +0 -1
  299. package/lib/module/ui/components/controlbar/barrel.js +0 -3
  300. package/lib/module/ui/components/controlbar/barrel.js.map +0 -1
  301. package/lib/module/ui/components/menu/LanguageMenuButton.js +0 -165
  302. package/lib/module/ui/components/menu/LanguageMenuButton.js.map +0 -1
  303. package/lib/module/ui/components/menu/PlaybackRateSubMenu.js +0 -80
  304. package/lib/module/ui/components/menu/PlaybackRateSubMenu.js.map +0 -1
  305. package/lib/module/ui/components/menu/QualitySubMenu.js +0 -135
  306. package/lib/module/ui/components/menu/QualitySubMenu.js.map +0 -1
  307. package/lib/module/ui/components/menu/SettingsMenuButton.js +0 -28
  308. package/lib/module/ui/components/menu/SettingsMenuButton.js.map +0 -1
  309. package/lib/module/ui/components/menu/barrel.js +0 -6
  310. package/lib/module/ui/components/menu/barrel.js.map +0 -1
  311. package/lib/module/ui/components/menu/common/MenuButton.js +0 -26
  312. package/lib/module/ui/components/menu/common/MenuButton.js.map +0 -1
  313. package/lib/module/ui/components/menu/common/MenuRadioButton.js +0 -38
  314. package/lib/module/ui/components/menu/common/MenuRadioButton.js.map +0 -1
  315. package/lib/module/ui/components/menu/common/MenuTitle.js +0 -29
  316. package/lib/module/ui/components/menu/common/MenuTitle.js.map +0 -1
  317. package/lib/module/ui/components/menu/common/MenuView.js +0 -65
  318. package/lib/module/ui/components/menu/common/MenuView.js.map +0 -1
  319. package/lib/module/ui/components/menu/common/ScrollableMenu.js +0 -36
  320. package/lib/module/ui/components/menu/common/ScrollableMenu.js.map +0 -1
  321. package/lib/module/ui/components/menu/common/SubMenuWithButton.js +0 -56
  322. package/lib/module/ui/components/menu/common/SubMenuWithButton.js.map +0 -1
  323. package/lib/module/ui/components/menu/common/barrel.js +0 -7
  324. package/lib/module/ui/components/menu/common/barrel.js.map +0 -1
  325. package/lib/module/ui/components/message/CastMessage.js +0 -70
  326. package/lib/module/ui/components/message/CastMessage.js.map +0 -1
  327. package/lib/module/ui/components/message/ErrorDisplay.js +0 -46
  328. package/lib/module/ui/components/message/ErrorDisplay.js.map +0 -1
  329. package/lib/module/ui/components/message/barrel.js +0 -3
  330. package/lib/module/ui/components/message/barrel.js.map +0 -1
  331. package/lib/module/ui/components/seekbar/SeekBar.js +0 -184
  332. package/lib/module/ui/components/seekbar/SeekBar.js.map +0 -1
  333. package/lib/module/ui/components/seekbar/barrel.js +0 -3
  334. package/lib/module/ui/components/seekbar/barrel.js.map +0 -1
  335. package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js +0 -37
  336. package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +0 -1
  337. package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js +0 -11
  338. package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js.map +0 -1
  339. package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js +0 -246
  340. package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js.map +0 -1
  341. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js +0 -2
  342. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +0 -1
  343. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +0 -4
  344. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +0 -1
  345. package/lib/module/ui/components/seekbar/thumbnail/barrel.js +0 -3
  346. package/lib/module/ui/components/seekbar/thumbnail/barrel.js.map +0 -1
  347. package/lib/module/ui/components/timelabel/StaticTimeLabel.js +0 -48
  348. package/lib/module/ui/components/timelabel/StaticTimeLabel.js.map +0 -1
  349. package/lib/module/ui/components/timelabel/TimeLabel.js +0 -78
  350. package/lib/module/ui/components/timelabel/TimeLabel.js.map +0 -1
  351. package/lib/module/ui/components/timelabel/barrel.js +0 -3
  352. package/lib/module/ui/components/timelabel/barrel.js.map +0 -1
  353. package/lib/module/ui/components/uicontroller/UiContainer.js +0 -336
  354. package/lib/module/ui/components/uicontroller/UiContainer.js.map +0 -1
  355. package/lib/module/ui/components/uicontroller/UiControls.js +0 -2
  356. package/lib/module/ui/components/uicontroller/UiControls.js.map +0 -1
  357. package/lib/module/ui/components/uicontroller/barrel.js +0 -3
  358. package/lib/module/ui/components/uicontroller/barrel.js.map +0 -1
  359. package/lib/module/ui/components/util/PlayerContext.js +0 -11
  360. package/lib/module/ui/components/util/PlayerContext.js.map +0 -1
  361. package/lib/module/ui/components/util/TrackUtils.js +0 -60
  362. package/lib/module/ui/components/util/TrackUtils.js.map +0 -1
  363. package/lib/module/ui/components/util/barrel.js +0 -2
  364. package/lib/module/ui/components/util/barrel.js.map +0 -1
  365. package/lib/module/ui/utils/ArrayUtils.js +0 -12
  366. package/lib/module/ui/utils/ArrayUtils.js.map +0 -1
  367. package/lib/module/ui/utils/language/Language.js +0 -27
  368. package/lib/module/ui/utils/language/Language.js.map +0 -1
  369. package/lib/module/ui/utils/language/languages.json +0 -1658
  370. package/lib/typescript/ui/THEOplayerDefaultUi.d.ts +0 -35
  371. package/lib/typescript/ui/THEOplayerTheme.d.ts +0 -84
  372. package/lib/typescript/ui/barrel.d.ts +0 -3
  373. package/lib/typescript/ui/components/activityindicator/CenteredDelayedActivityIndicator.d.ts +0 -25
  374. package/lib/typescript/ui/components/activityindicator/DelayedActivityIndicator.d.ts +0 -9
  375. package/lib/typescript/ui/components/activityindicator/barrel.d.ts +0 -2
  376. package/lib/typescript/ui/components/barrel.d.ts +0 -9
  377. package/lib/typescript/ui/components/button/AirplayButton.d.ts +0 -18
  378. package/lib/typescript/ui/components/button/ChromecastButton.d.ts +0 -19
  379. package/lib/typescript/ui/components/button/ChromecastButton.web.d.ts +0 -19
  380. package/lib/typescript/ui/components/button/FullscreenButton.d.ts +0 -17
  381. package/lib/typescript/ui/components/button/MuteButton.d.ts +0 -16
  382. package/lib/typescript/ui/components/button/PipButton.d.ts +0 -17
  383. package/lib/typescript/ui/components/button/PlayButton.d.ts +0 -28
  384. package/lib/typescript/ui/components/button/SkipButton.d.ts +0 -33
  385. package/lib/typescript/ui/components/button/actionbutton/ActionButton.d.ts +0 -41
  386. package/lib/typescript/ui/components/button/barrel.d.ts +0 -9
  387. package/lib/typescript/ui/components/button/svg/AirplaySvg.d.ts +0 -3
  388. package/lib/typescript/ui/components/button/svg/ArrowForwardSvg.d.ts +0 -3
  389. package/lib/typescript/ui/components/button/svg/BackSvg.d.ts +0 -3
  390. package/lib/typescript/ui/components/button/svg/BackwardSvg.d.ts +0 -3
  391. package/lib/typescript/ui/components/button/svg/ChromecastSvg.d.ts +0 -3
  392. package/lib/typescript/ui/components/button/svg/ErrorSvg.d.ts +0 -3
  393. package/lib/typescript/ui/components/button/svg/ForwardSvg.d.ts +0 -3
  394. package/lib/typescript/ui/components/button/svg/FullscreenEnterSvg.d.ts +0 -3
  395. package/lib/typescript/ui/components/button/svg/FullscreenExitSvg.d.ts +0 -3
  396. package/lib/typescript/ui/components/button/svg/LanguageSvg.d.ts +0 -3
  397. package/lib/typescript/ui/components/button/svg/ListSvg.d.ts +0 -3
  398. package/lib/typescript/ui/components/button/svg/PauseSvg.d.ts +0 -3
  399. package/lib/typescript/ui/components/button/svg/PipEnterSvg.d.ts +0 -3
  400. package/lib/typescript/ui/components/button/svg/PipExitSvg.d.ts +0 -3
  401. package/lib/typescript/ui/components/button/svg/PlaySvg.d.ts +0 -3
  402. package/lib/typescript/ui/components/button/svg/ReplaySvg.d.ts +0 -3
  403. package/lib/typescript/ui/components/button/svg/SettingsSvg.d.ts +0 -3
  404. package/lib/typescript/ui/components/button/svg/SvgUtils.d.ts +0 -3
  405. package/lib/typescript/ui/components/button/svg/VolumeOffSvg.d.ts +0 -3
  406. package/lib/typescript/ui/components/button/svg/VolumeUpSvg.d.ts +0 -3
  407. package/lib/typescript/ui/components/button/svg/barrel.d.ts +0 -20
  408. package/lib/typescript/ui/components/controlbar/ControlBar.d.ts +0 -39
  409. package/lib/typescript/ui/components/controlbar/Spacer.d.ts +0 -5
  410. package/lib/typescript/ui/components/controlbar/barrel.d.ts +0 -2
  411. package/lib/typescript/ui/components/menu/LanguageMenuButton.d.ts +0 -40
  412. package/lib/typescript/ui/components/menu/PlaybackRateSubMenu.d.ts +0 -36
  413. package/lib/typescript/ui/components/menu/QualitySubMenu.d.ts +0 -29
  414. package/lib/typescript/ui/components/menu/SettingsMenuButton.d.ts +0 -12
  415. package/lib/typescript/ui/components/menu/barrel.d.ts +0 -5
  416. package/lib/typescript/ui/components/menu/common/MenuButton.d.ts +0 -25
  417. package/lib/typescript/ui/components/menu/common/MenuRadioButton.d.ts +0 -33
  418. package/lib/typescript/ui/components/menu/common/MenuTitle.d.ts +0 -20
  419. package/lib/typescript/ui/components/menu/common/MenuView.d.ts +0 -21
  420. package/lib/typescript/ui/components/menu/common/ScrollableMenu.d.ts +0 -23
  421. package/lib/typescript/ui/components/menu/common/SubMenuWithButton.d.ts +0 -29
  422. package/lib/typescript/ui/components/menu/common/barrel.d.ts +0 -6
  423. package/lib/typescript/ui/components/message/CastMessage.d.ts +0 -16
  424. package/lib/typescript/ui/components/message/ErrorDisplay.d.ts +0 -12
  425. package/lib/typescript/ui/components/message/barrel.d.ts +0 -2
  426. package/lib/typescript/ui/components/seekbar/SeekBar.d.ts +0 -41
  427. package/lib/typescript/ui/components/seekbar/barrel.d.ts +0 -2
  428. package/lib/typescript/ui/components/seekbar/thumbnail/SingleThumbnailView.d.ts +0 -8
  429. package/lib/typescript/ui/components/seekbar/thumbnail/Thumbnail.d.ts +0 -56
  430. package/lib/typescript/ui/components/seekbar/thumbnail/ThumbnailView.d.ts +0 -60
  431. package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.d.ts +0 -1
  432. package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.web.d.ts +0 -8
  433. package/lib/typescript/ui/components/seekbar/thumbnail/barrel.d.ts +0 -2
  434. package/lib/typescript/ui/components/timelabel/StaticTimeLabel.d.ts +0 -24
  435. package/lib/typescript/ui/components/timelabel/TimeLabel.d.ts +0 -32
  436. package/lib/typescript/ui/components/timelabel/barrel.d.ts +0 -2
  437. package/lib/typescript/ui/components/uicontroller/UiContainer.d.ts +0 -115
  438. package/lib/typescript/ui/components/uicontroller/UiControls.d.ts +0 -14
  439. package/lib/typescript/ui/components/uicontroller/barrel.d.ts +0 -2
  440. package/lib/typescript/ui/components/util/PlayerContext.d.ts +0 -22
  441. package/lib/typescript/ui/components/util/TrackUtils.d.ts +0 -10
  442. package/lib/typescript/ui/components/util/barrel.d.ts +0 -1
  443. package/lib/typescript/ui/utils/ArrayUtils.d.ts +0 -2
  444. package/lib/typescript/ui/utils/language/Language.d.ts +0 -19
  445. package/src/ui/THEOplayerDefaultUi.tsx +0 -108
  446. package/src/ui/THEOplayerTheme.ts +0 -112
  447. package/src/ui/barrel.ts +0 -3
  448. package/src/ui/components/activityindicator/CenteredDelayedActivityIndicator.tsx +0 -96
  449. package/src/ui/components/activityindicator/DelayedActivityIndicator.tsx +0 -32
  450. package/src/ui/components/activityindicator/barrel.ts +0 -2
  451. package/src/ui/components/barrel.ts +0 -9
  452. package/src/ui/components/button/AirplayButton.tsx +0 -64
  453. package/src/ui/components/button/ChromecastButton.tsx +0 -60
  454. package/src/ui/components/button/ChromecastButton.web.tsx +0 -66
  455. package/src/ui/components/button/FullscreenButton.tsx +0 -60
  456. package/src/ui/components/button/MuteButton.tsx +0 -52
  457. package/src/ui/components/button/PipButton.tsx +0 -61
  458. package/src/ui/components/button/PlayButton.tsx +0 -107
  459. package/src/ui/components/button/SkipButton.tsx +0 -112
  460. package/src/ui/components/button/actionbutton/ActionButton.tsx +0 -105
  461. package/src/ui/components/button/barrel.ts +0 -9
  462. package/src/ui/components/button/svg/AirplaySvg.tsx +0 -18
  463. package/src/ui/components/button/svg/ArrowForwardSvg.tsx +0 -18
  464. package/src/ui/components/button/svg/BackSvg.tsx +0 -18
  465. package/src/ui/components/button/svg/BackwardSvg.tsx +0 -18
  466. package/src/ui/components/button/svg/ChromecastSvg.tsx +0 -18
  467. package/src/ui/components/button/svg/ErrorSvg.tsx +0 -18
  468. package/src/ui/components/button/svg/ForwardSvg.tsx +0 -18
  469. package/src/ui/components/button/svg/FullscreenEnterSvg.tsx +0 -18
  470. package/src/ui/components/button/svg/FullscreenExitSvg.tsx +0 -18
  471. package/src/ui/components/button/svg/LanguageSvg.tsx +0 -18
  472. package/src/ui/components/button/svg/ListSvg.tsx +0 -18
  473. package/src/ui/components/button/svg/PauseSvg.tsx +0 -18
  474. package/src/ui/components/button/svg/PipEnterSvg.tsx +0 -18
  475. package/src/ui/components/button/svg/PipExitSvg.tsx +0 -18
  476. package/src/ui/components/button/svg/PlaySvg.tsx +0 -18
  477. package/src/ui/components/button/svg/ReplaySvg.tsx +0 -18
  478. package/src/ui/components/button/svg/SettingsSvg.tsx +0 -18
  479. package/src/ui/components/button/svg/SvgUtils.ts +0 -4
  480. package/src/ui/components/button/svg/VolumeOffSvg.tsx +0 -18
  481. package/src/ui/components/button/svg/VolumeUpSvg.tsx +0 -18
  482. package/src/ui/components/button/svg/barrel.ts +0 -20
  483. package/src/ui/components/button/svg/res/AirPlayButton.html +0 -6
  484. package/src/ui/components/button/svg/res/Airplay.svg +0 -1
  485. package/src/ui/components/button/svg/res/ChromecastButton.html +0 -25
  486. package/src/ui/components/button/svg/res/arrow_forward.svg +0 -1
  487. package/src/ui/components/button/svg/res/back.svg +0 -1
  488. package/src/ui/components/button/svg/res/backward.svg +0 -1
  489. package/src/ui/components/button/svg/res/chromecast-48px.svg +0 -1
  490. package/src/ui/components/button/svg/res/close.svg +0 -1
  491. package/src/ui/components/button/svg/res/error.svg +0 -1
  492. package/src/ui/components/button/svg/res/forward.svg +0 -1
  493. package/src/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
  494. package/src/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
  495. package/src/ui/components/button/svg/res/language.svg +0 -1
  496. package/src/ui/components/button/svg/res/list.svg +0 -1
  497. package/src/ui/components/button/svg/res/live.svg +0 -1
  498. package/src/ui/components/button/svg/res/pause.svg +0 -1
  499. package/src/ui/components/button/svg/res/pip_enter.svg +0 -1
  500. package/src/ui/components/button/svg/res/pip_exit.svg +0 -1
  501. package/src/ui/components/button/svg/res/play.svg +0 -1
  502. package/src/ui/components/button/svg/res/replay.svg +0 -1
  503. package/src/ui/components/button/svg/res/settings.svg +0 -1
  504. package/src/ui/components/button/svg/res/skip-next.svg +0 -1
  505. package/src/ui/components/button/svg/res/volume-high.svg +0 -1
  506. package/src/ui/components/button/svg/res/volume-low.svg +0 -1
  507. package/src/ui/components/button/svg/res/volume-off.svg +0 -1
  508. package/src/ui/components/controlbar/ControlBar.tsx +0 -69
  509. package/src/ui/components/controlbar/Spacer.tsx +0 -9
  510. package/src/ui/components/controlbar/barrel.ts +0 -2
  511. package/src/ui/components/menu/LanguageMenuButton.tsx +0 -192
  512. package/src/ui/components/menu/PlaybackRateSubMenu.tsx +0 -93
  513. package/src/ui/components/menu/QualitySubMenu.tsx +0 -148
  514. package/src/ui/components/menu/SettingsMenuButton.tsx +0 -25
  515. package/src/ui/components/menu/barrel.ts +0 -5
  516. package/src/ui/components/menu/common/MenuButton.tsx +0 -49
  517. package/src/ui/components/menu/common/MenuRadioButton.tsx +0 -65
  518. package/src/ui/components/menu/common/MenuTitle.tsx +0 -37
  519. package/src/ui/components/menu/common/MenuView.tsx +0 -62
  520. package/src/ui/components/menu/common/ScrollableMenu.tsx +0 -43
  521. package/src/ui/components/menu/common/SubMenuWithButton.tsx +0 -58
  522. package/src/ui/components/menu/common/barrel.ts +0 -6
  523. package/src/ui/components/message/CastMessage.tsx +0 -74
  524. package/src/ui/components/message/ErrorDisplay.tsx +0 -43
  525. package/src/ui/components/message/barrel.ts +0 -2
  526. package/src/ui/components/seekbar/SeekBar.tsx +0 -178
  527. package/src/ui/components/seekbar/barrel.ts +0 -2
  528. package/src/ui/components/seekbar/thumbnail/SingleThumbnailView.tsx +0 -38
  529. package/src/ui/components/seekbar/thumbnail/Thumbnail.ts +0 -72
  530. package/src/ui/components/seekbar/thumbnail/ThumbnailView.tsx +0 -266
  531. package/src/ui/components/seekbar/thumbnail/Urlpolyfill.ts +0 -1
  532. package/src/ui/components/seekbar/thumbnail/Urlpolyfill.web.ts +0 -3
  533. package/src/ui/components/seekbar/thumbnail/barrel.ts +0 -2
  534. package/src/ui/components/timelabel/StaticTimeLabel.tsx +0 -63
  535. package/src/ui/components/timelabel/TimeLabel.tsx +0 -79
  536. package/src/ui/components/timelabel/barrel.ts +0 -2
  537. package/src/ui/components/uicontroller/UiContainer.tsx +0 -355
  538. package/src/ui/components/uicontroller/UiControls.ts +0 -31
  539. package/src/ui/components/uicontroller/barrel.ts +0 -2
  540. package/src/ui/components/util/PlayerContext.ts +0 -29
  541. package/src/ui/components/util/TrackUtils.ts +0 -62
  542. package/src/ui/components/util/barrel.ts +0 -1
  543. package/src/ui/utils/ArrayUtils.ts +0 -12
  544. package/src/ui/utils/language/Language.ts +0 -38
  545. package/src/ui/utils/language/languages.json +0 -1658
@@ -1,93 +0,0 @@
1
- import React, { useContext, useState } from 'react';
2
- import { PlayerContext } from '../util/PlayerContext';
3
- import { MenuView } from './common/MenuView';
4
- import { ScrollableMenu } from './common/ScrollableMenu';
5
- import { MenuRadioButton } from './common/MenuRadioButton';
6
- import { SubMenuWithButton } from './common/SubMenuWithButton';
7
- import type { StyleProp, ViewStyle } from 'react-native';
8
-
9
- export interface PlaybackRateValue {
10
- /**
11
- * The playbackRate value.
12
- */
13
- readonly value: number;
14
- /**
15
- * The label of the playbackRate value.
16
- */
17
- readonly label: string;
18
- }
19
-
20
- /**
21
- * The default playback rate values for the menu.
22
- */
23
- export const DEFAULT_PLAYBACK_RATE_MENU_VALUES: PlaybackRateValue[] = [
24
- { value: 0.25, label: '0.25x' },
25
- { value: 0.5, label: '0.5x' },
26
- { value: 1, label: 'Normal' },
27
- { value: 1.25, label: '1.25x' },
28
- { value: 1.5, label: '1.5x' },
29
- { value: 2, label: '2x' },
30
- ];
31
-
32
- interface PlaybackRateSubMenuProps {
33
- /**
34
- * Overrides for the default playbackRate values.
35
- */
36
- values?: PlaybackRateValue[];
37
- /**
38
- * Overrides for the style of the menu.
39
- */
40
- menuStyle?: StyleProp<ViewStyle>;
41
- }
42
-
43
- /**
44
- * A button component that opens a playbackRate selection menu for the `react-native-theoplayer` UI.
45
- */
46
- export const PlaybackRateSubMenu = (props: PlaybackRateSubMenuProps) => {
47
- const { values, menuStyle } = props;
48
- const selectedValues: PlaybackRateValue[] = values ?? DEFAULT_PLAYBACK_RATE_MENU_VALUES;
49
- const player = useContext(PlayerContext).player;
50
-
51
- const createMenu = () => {
52
- return <PlaybackSelectionView values={selectedValues} menuStyle={menuStyle} />;
53
- };
54
- const preview = selectedValues.find((value) => value.value === player.playbackRate)?.label ?? player.playbackRate.toString() + 'x';
55
-
56
- return <SubMenuWithButton menuConstructor={createMenu} label={'Speed'} preview={preview} />;
57
- };
58
-
59
- interface PlaybackSelectionViewProps {
60
- menuStyle?: StyleProp<ViewStyle>;
61
- values: PlaybackRateValue[];
62
- }
63
-
64
- export const PlaybackSelectionView = (props: PlaybackSelectionViewProps) => {
65
- const { values, menuStyle } = props;
66
- const player = useContext(PlayerContext).player;
67
- const [selectedPlaybackRate, setSelectedPlaybackRate] = useState(player.playbackRate);
68
- const onChangePlaybackRate = (playbackRate: number | undefined) => {
69
- if (playbackRate) {
70
- player.playbackRate = playbackRate;
71
- setSelectedPlaybackRate(playbackRate);
72
- }
73
- };
74
-
75
- return (
76
- <MenuView
77
- style={menuStyle}
78
- menu={
79
- <ScrollableMenu
80
- title={'Playback Rate'}
81
- items={values.map((playbackRateValue, id) => (
82
- <MenuRadioButton
83
- key={id}
84
- label={playbackRateValue.label}
85
- uid={playbackRateValue.value}
86
- onSelect={onChangePlaybackRate}
87
- selected={selectedPlaybackRate === playbackRateValue.value}></MenuRadioButton>
88
- ))}
89
- />
90
- }
91
- />
92
- );
93
- };
@@ -1,148 +0,0 @@
1
- import type { VideoQuality } from 'react-native-theoplayer';
2
- import { findMediaTrackByUid, MediaTrack, PlayerEventType } from 'react-native-theoplayer';
3
- import React, { PureComponent, useContext } from 'react';
4
- import { Platform, StyleProp, ViewStyle } from 'react-native';
5
- import { PlayerContext, UiContext } from '../util/PlayerContext';
6
- import { getVideoQualityLabel } from '../util/TrackUtils';
7
- import { MenuView } from './common/MenuView';
8
- import { ScrollableMenu } from './common/ScrollableMenu';
9
- import { MenuRadioButton } from './common/MenuRadioButton';
10
- import { SubMenuWithButton } from './common/SubMenuWithButton';
11
-
12
- export interface QualitySubMenuProps {
13
- /**
14
- * Overrides for the style of the menu.
15
- */
16
- menuStyle?: StyleProp<ViewStyle>;
17
- }
18
-
19
- /**
20
- * A button component that opens a playbackRate selection menu for the `react-native-theoplayer` UI.
21
- */
22
- export const QualitySubMenu = (props: QualitySubMenuProps) => {
23
- const { menuStyle } = props;
24
- if (Platform.OS === 'ios') {
25
- return <></>;
26
- }
27
- const createMenu = () => {
28
- return <QualitySelectionView style={menuStyle} />;
29
- };
30
- const player = useContext(PlayerContext).player;
31
-
32
- let selectedQualityLabel = 'auto';
33
- if (player.targetVideoQuality !== undefined) {
34
- let id: number | undefined;
35
- if (typeof player.targetVideoQuality === 'number') {
36
- id = player.targetVideoQuality;
37
- } else {
38
- id = player.targetVideoQuality.length > 0 ? player.targetVideoQuality[0] : undefined;
39
- }
40
- const selectedTrack = player.videoTracks.find((track) => track.uid === player.selectedVideoTrack);
41
- const selectedQuality = selectedTrack !== undefined ? selectedTrack.qualities.find((quality) => quality.uid === id) : undefined;
42
- selectedQualityLabel = getVideoQualityLabel(selectedQuality as VideoQuality, false);
43
- }
44
-
45
- return <SubMenuWithButton menuConstructor={createMenu} label={'Quality'} preview={selectedQualityLabel} />;
46
- };
47
-
48
- export interface QualitySelectionViewState {
49
- videoTracks: MediaTrack[];
50
- selectedVideoTrack: number | undefined;
51
- targetVideoTrackQuality: number | number[] | undefined;
52
- }
53
-
54
- export interface QualitySelectionViewProps {
55
- style?: StyleProp<ViewStyle>;
56
- }
57
-
58
- export class QualitySelectionView extends PureComponent<QualitySelectionViewProps, QualitySelectionViewState> {
59
- constructor(props: QualitySelectionViewProps) {
60
- super(props);
61
- this.state = {
62
- videoTracks: [],
63
- selectedVideoTrack: undefined,
64
- targetVideoTrackQuality: undefined,
65
- };
66
- }
67
-
68
- componentDidMount() {
69
- const player = (this.context as UiContext).player;
70
- player.addEventListener(PlayerEventType.MEDIA_TRACK_LIST, this.onTrackListChanged);
71
- this.setState({
72
- videoTracks: player.videoTracks,
73
- selectedVideoTrack: player.selectedVideoTrack,
74
- targetVideoTrackQuality: player.targetVideoQuality,
75
- });
76
- }
77
-
78
- componentWillUnmount() {
79
- const player = (this.context as UiContext).player;
80
- player.removeEventListener(PlayerEventType.MEDIA_TRACK_LIST, this.onTrackListChanged);
81
- }
82
-
83
- private onTrackListChanged = () => {
84
- const player = (this.context as UiContext).player;
85
- this.setState({
86
- videoTracks: player.videoTracks,
87
- selectedVideoTrack: player.selectedVideoTrack,
88
- targetVideoTrackQuality: player.targetVideoQuality,
89
- });
90
- };
91
-
92
- private selectTargetVideoQuality = (qualityIndex: number | undefined) => {
93
- const { videoTracks, selectedVideoTrack } = this.state;
94
- if (!videoTracks || !selectedVideoTrack) {
95
- return;
96
- }
97
- const videoTrack = videoTracks.find((track) => track.uid === selectedVideoTrack);
98
- const qualities = videoTrack?.qualities;
99
- if (!qualities) {
100
- return;
101
- }
102
- let uid: number | undefined = undefined;
103
- if (qualityIndex !== undefined && qualityIndex > 0) {
104
- // The first quality in the list is "auto". The rest are selectable qualities.
105
- uid = qualities[qualityIndex - 1].uid;
106
- }
107
- const player = (this.context as UiContext).player;
108
- player.targetVideoQuality = uid;
109
- this.setState({ targetVideoTrackQuality: uid });
110
- };
111
-
112
- render() {
113
- const { style } = this.props;
114
- const { videoTracks, selectedVideoTrack, targetVideoTrackQuality } = this.state;
115
- const availableVideoQualities = findMediaTrackByUid(videoTracks, selectedVideoTrack)?.qualities || [];
116
- availableVideoQualities.sort((q1, q2) => q2.bandwidth - q1.bandwidth);
117
-
118
- let selectedTarget: number | undefined;
119
- if (targetVideoTrackQuality === undefined || typeof targetVideoTrackQuality === 'number') {
120
- selectedTarget = targetVideoTrackQuality;
121
- } else {
122
- selectedTarget = targetVideoTrackQuality.length > 0 ? targetVideoTrackQuality[0] : undefined;
123
- }
124
-
125
- return (
126
- <MenuView
127
- style={style}
128
- menu={
129
- <ScrollableMenu
130
- title={'Video quality'}
131
- items={[undefined, ...availableVideoQualities].map((track, id) => (
132
- <MenuRadioButton
133
- key={id}
134
- label={getVideoQualityLabel(track as VideoQuality)}
135
- uid={id}
136
- onSelect={this.selectTargetVideoQuality}
137
- selected={
138
- (track === undefined && selectedTarget === undefined) || (track !== undefined && track.uid === selectedTarget)
139
- }></MenuRadioButton>
140
- ))}
141
- />
142
- }
143
- />
144
- );
145
- }
146
- }
147
-
148
- QualitySelectionView.contextType = PlayerContext;
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { MenuButton } from './common/MenuButton';
3
- import { SettingsSvg } from '../button/svg/SettingsSvg';
4
- import { MenuView } from './common/MenuView';
5
- import { ScrollableMenu } from './common/ScrollableMenu';
6
- import type { StyleProp, ViewStyle } from 'react-native';
7
-
8
- export interface SettingsMenuButtonProps {
9
- /**
10
- * Overrides for the style of the menu.
11
- */
12
- menuStyle?: StyleProp<ViewStyle>;
13
- }
14
-
15
- /**
16
- * A button component that opens a settings menu containing all children for the `react-native-theoplayer` UI.
17
- */
18
- export const SettingsMenuButton = (props: React.PropsWithChildren<SettingsMenuButtonProps>) => {
19
- const { children, menuStyle } = props;
20
- const createMenu = () => {
21
- return <MenuView style={menuStyle} menu={<ScrollableMenu title={'Settings'} items={children} />} />;
22
- };
23
-
24
- return <MenuButton svg={<SettingsSvg />} menuConstructor={createMenu} />;
25
- };
@@ -1,5 +0,0 @@
1
- export * from './common/barrel';
2
- export * from './LanguageMenuButton';
3
- export * from './PlaybackRateSubMenu';
4
- export * from './QualitySubMenu';
5
- export * from './SettingsMenuButton';
@@ -1,49 +0,0 @@
1
- import type { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
2
- import React, { ReactNode } from 'react';
3
- import { ActionButton } from '../../button/actionbutton/ActionButton';
4
- import { PlayerContext, UiContext } from '../../util/PlayerContext';
5
- import type { MenuConstructor } from '../../uicontroller/UiControls';
6
-
7
- export interface MenuButtonProps {
8
- /**
9
- * The image that will be used in the button.
10
- */
11
- icon?: ImageSourcePropType;
12
- /**
13
- * The SVG that will be used in the button. Takes priority over images.
14
- */
15
- svg?: ReactNode;
16
- /**
17
- * The style overrides for the menu button.
18
- */
19
- style?: StyleProp<ViewStyle>;
20
- /**
21
- * The menu that will be constructed when the button is pressed.
22
- */
23
- menuConstructor?: MenuConstructor;
24
- }
25
-
26
- /**
27
- * A menu button that opens a fullscreen menu for in the `react-native-theoplayer` UI.
28
- */
29
- export const MenuButton = (props: MenuButtonProps) => {
30
- const { icon, svg, style, menuConstructor } = props;
31
-
32
- return (
33
- <PlayerContext.Consumer>
34
- {(context: UiContext) => (
35
- <ActionButton
36
- svg={svg}
37
- icon={icon}
38
- onPress={() => {
39
- if (menuConstructor) {
40
- context.ui.openMenu_(menuConstructor);
41
- }
42
- }}
43
- style={style}
44
- touchable={true}
45
- />
46
- )}
47
- </PlayerContext.Consumer>
48
- );
49
- };
@@ -1,65 +0,0 @@
1
- import { StyleProp, Text, TextStyle, TouchableOpacity } from 'react-native';
2
- import React from 'react';
3
- import { PlayerContext, UiContext } from '../../util/PlayerContext';
4
-
5
- export interface MenuRadioButtonProps {
6
- /**
7
- * The label for the button.
8
- */
9
- label: string;
10
- /**
11
- * The uid used in the callback when the button is pressed.
12
- */
13
- uid: number | undefined;
14
- /**
15
- * Whether the radio button is selected.
16
- */
17
- selected?: boolean;
18
- /**
19
- * The callback that is called when the button is pressed.
20
- * @param id The uid prop.
21
- */
22
- onSelect: (id: number | undefined) => void;
23
- /**
24
- * The style overrides for the radio button.
25
- */
26
- style?: StyleProp<TextStyle>;
27
- }
28
-
29
- /**
30
- * The default style for the menu button.
31
- */
32
- export const DEFAULT_MENU_BUTTON_STYLE: TextStyle = {
33
- fontSize: 16,
34
- lineHeight: 24,
35
- padding: 10,
36
- textAlign: 'center',
37
- };
38
-
39
- /**
40
- * The default radio button that can be used in menus for the `react-native-theoplayer` UI.
41
- */
42
- export const MenuRadioButton = (props: MenuRadioButtonProps) => {
43
- const { uid, onSelect, label, selected, style } = props;
44
- return (
45
- <TouchableOpacity
46
- onPress={() => {
47
- onSelect(uid);
48
- }}>
49
- <PlayerContext.Consumer>
50
- {(context: UiContext) => (
51
- <Text
52
- style={[
53
- DEFAULT_MENU_BUTTON_STYLE,
54
- selected
55
- ? { color: context.style.colors.textSelected, backgroundColor: context.style.colors.textSelectedBackground }
56
- : { color: context.style.colors.text },
57
- style,
58
- ]}>
59
- {label}
60
- </Text>
61
- )}
62
- </PlayerContext.Consumer>
63
- </TouchableOpacity>
64
- );
65
- };
@@ -1,37 +0,0 @@
1
- import { StyleProp, Text, TextStyle } from 'react-native';
2
- import React from 'react';
3
- import { PlayerContext, UiContext } from '../../util/PlayerContext';
4
-
5
- export interface MenuTitleProps {
6
- /**
7
- * The label of the menu title component.
8
- */
9
- label: string;
10
- /**
11
- * The style overrides.
12
- */
13
- style?: StyleProp<TextStyle>;
14
- }
15
-
16
- /**
17
- * The default style for the menu title.
18
- */
19
- export const DEFAULT_MENU_TITLE_STYLE: TextStyle = {
20
- fontSize: 20,
21
- lineHeight: 24,
22
- padding: 10,
23
- textAlign: 'center',
24
- fontWeight: 'bold',
25
- };
26
-
27
- /**
28
- * The title placed at the top of the fullscreen menu.
29
- */
30
- export const MenuTitle = (props: MenuTitleProps) => {
31
- const { label, style } = props;
32
- return (
33
- <PlayerContext.Consumer>
34
- {(context: UiContext) => <Text style={[DEFAULT_MENU_TITLE_STYLE, { color: context.style.colors.text }, style]}>{label}</Text>}
35
- </PlayerContext.Consumer>
36
- );
37
- };
@@ -1,62 +0,0 @@
1
- import React, { ReactNode, useContext } from 'react';
2
- import { PlayerContext, UiContext } from '../../util/PlayerContext';
3
- import { StyleProp, StyleSheet, Text, TouchableOpacity, View, ViewStyle } from 'react-native';
4
- import { ControlBar } from '../../controlbar/ControlBar';
5
- import { TOP_UI_CONTAINER_STYLE } from '../../uicontroller/UiContainer';
6
- import { BackSvg } from '../../button/svg/BackSvg';
7
- import { ActionButton } from '../../button/actionbutton/ActionButton';
8
-
9
- interface MenuViewProps {
10
- /**
11
- * The menu to render inside the menu view.
12
- */
13
- menu: ReactNode;
14
- /**
15
- * The style overrides for the menu view.
16
- */
17
- style?: StyleProp<ViewStyle>;
18
- }
19
-
20
- /**
21
- * The default style for the menu view.
22
- */
23
- export const DEFAULT_MENU_VIEW_STYLE: ViewStyle = {
24
- flex: 1,
25
- flexDirection: 'row',
26
- left: 0,
27
- right: 0,
28
- top: 0,
29
- bottom: 0,
30
- paddingVertical: 20,
31
- paddingLeft: 50,
32
- paddingRight: 40,
33
- };
34
-
35
- /**
36
- * A component to render a fullscreen menu with a title and back button for the `react-native-theoplayer` UI.
37
- */
38
- export const MenuView = (props: MenuViewProps) => {
39
- const { menu, style } = props;
40
- const context = useContext(PlayerContext);
41
- const onClose = () => {
42
- context.ui.closeCurrentMenu_();
43
- };
44
- return (
45
- <PlayerContext.Consumer>
46
- {(context: UiContext) => (
47
- <View style={StyleSheet.absoluteFill}>
48
- <ControlBar style={TOP_UI_CONTAINER_STYLE}>
49
- <View style={{ flexDirection: 'row' }}>
50
- <TouchableOpacity style={{ flexDirection: 'row' }} onPress={onClose}>
51
- <ActionButton touchable={false} svg={<BackSvg />} />
52
- <Text style={{ color: context.style.colors.text, fontSize: 16, lineHeight: 30 }}>Back</Text>
53
- </TouchableOpacity>
54
- </View>
55
- <View style={{ flexGrow: 1 }} />
56
- </ControlBar>
57
- <View style={[DEFAULT_MENU_VIEW_STYLE, style]}>{menu}</View>
58
- </View>
59
- )}
60
- </PlayerContext.Consumer>
61
- );
62
- };
@@ -1,43 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { SafeAreaView, ScrollView, View, ViewStyle } from 'react-native';
3
- import { MenuTitle } from './MenuTitle';
4
-
5
- interface ScrollableMenuProps {
6
- /**
7
- * The title of the scrollable menu.
8
- */
9
- title: string;
10
- /**
11
- * The items to be put in the scrollable menu.
12
- */
13
- items?: ReactNode;
14
- }
15
-
16
- /**
17
- * The default style for the scrollable menu.
18
- */
19
- export const DEFAULT_SCROLLABLE_MENU_STYLE: ViewStyle = {
20
- flex: 1,
21
- left: 0,
22
- right: 0,
23
- top: 0,
24
- bottom: 0,
25
- paddingRight: 10,
26
- };
27
-
28
- /**
29
- * A menu component that provides a ScrollView for menu items for the `react-native-theoplayer` UI.
30
- * @param props
31
- * @constructor
32
- */
33
- export const ScrollableMenu = (props: ScrollableMenuProps) => {
34
- const { title, items } = props;
35
- return (
36
- <SafeAreaView style={DEFAULT_SCROLLABLE_MENU_STYLE}>
37
- <MenuTitle label={title} />
38
- <ScrollView>
39
- <View style={{ flexDirection: 'column' }}>{items}</View>
40
- </ScrollView>
41
- </SafeAreaView>
42
- );
43
- };
@@ -1,58 +0,0 @@
1
- import { PlayerContext, UiContext } from '../../util/PlayerContext';
2
- import { StyleProp, Text, TextStyle, TouchableOpacity, View, ViewStyle } from 'react-native';
3
- import React, { useContext } from 'react';
4
- import { ArrowForwardSvg } from '../../button/svg/ArrowForwardSvg';
5
- import type { MenuConstructor } from '../../uicontroller/UiControls';
6
- import { DEFAULT_MENU_BUTTON_STYLE } from './MenuRadioButton';
7
- import { ActionButton } from '../../button/actionbutton/ActionButton';
8
-
9
- export interface SubMenuButtonProps {
10
- /**
11
- * The style overrides.
12
- */
13
- style?: StyleProp<ViewStyle>;
14
- /**
15
- * The style overrides for the text components.
16
- */
17
- textStyle?: StyleProp<TextStyle>;
18
- /**
19
- * The sub menu that will be opened.
20
- */
21
- menuConstructor: MenuConstructor;
22
- /**
23
- * The label for the sub menu button.
24
- */
25
- label: string;
26
- /**
27
- * A preview for the currently selected value before opening the sub menu.
28
- */
29
- preview: string;
30
- }
31
-
32
- /**
33
- * A component that can be put inside a SettingsMenuButton to create a sub menu.
34
- */
35
- export const SubMenuWithButton = (props: SubMenuButtonProps) => {
36
- const { style, textStyle, menuConstructor, label, preview } = props;
37
- const context = useContext(PlayerContext);
38
- const onTouch = () => {
39
- if (menuConstructor) {
40
- context.ui.openMenu_(menuConstructor);
41
- }
42
- };
43
- return (
44
- <PlayerContext.Consumer>
45
- {(context: UiContext) => (
46
- <View style={[{ height: 44, flexDirection: 'row', width: '100%', justifyContent: 'center' }, style]}>
47
- <Text style={[DEFAULT_MENU_BUTTON_STYLE, { color: context.style.colors.text, width: '30%' }, textStyle]}>{label}</Text>
48
- <View style={{ flexDirection: 'row', width: '40%', justifyContent: 'flex-end' }}>
49
- <TouchableOpacity style={{ flexDirection: 'row' }} onPress={onTouch}>
50
- <Text style={[DEFAULT_MENU_BUTTON_STYLE, { color: context.style.colors.text }, textStyle]}>{preview}</Text>
51
- <ActionButton touchable={false} svg={<ArrowForwardSvg />} />
52
- </TouchableOpacity>
53
- </View>
54
- </View>
55
- )}
56
- </PlayerContext.Consumer>
57
- );
58
- };
@@ -1,6 +0,0 @@
1
- export * from './MenuButton';
2
- export * from './MenuTitle';
3
- export * from './MenuView';
4
- export * from './MenuRadioButton';
5
- export * from './ScrollableMenu';
6
- export * from './SubMenuWithButton';
@@ -1,74 +0,0 @@
1
- import React, { PureComponent } from 'react';
2
- import { CastEvent, CastEventType, CastState, PlayerEventType } from 'react-native-theoplayer';
3
- import { Text } from 'react-native';
4
- import { PlayerContext, UiContext } from '../util/PlayerContext';
5
-
6
- interface CastMessageState {
7
- message: string | undefined;
8
- }
9
-
10
- /**
11
- * A simple cast message showing the current state of casting for the `react-native-theoplayer` UI.
12
- */
13
- export class CastMessage extends PureComponent<unknown, CastMessageState> {
14
- constructor(props: unknown) {
15
- super(props);
16
- this.state = { message: undefined };
17
- }
18
-
19
- componentDidMount() {
20
- const player = (this.context as UiContext).player;
21
- player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
22
- const chromecastState = player.cast.chromecast?.state;
23
- const airplayState = player.cast.airplay?.state;
24
- if (chromecastState === 'connecting' || chromecastState === 'connected') {
25
- this._processCastState(chromecastState, 'Chromecast');
26
- } else if (airplayState === 'connecting' || airplayState === 'connected') {
27
- this._processCastState(airplayState, 'Airplay');
28
- }
29
- }
30
-
31
- componentWillUnmount() {
32
- const context = this.context as UiContext;
33
- context.player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
34
- }
35
-
36
- private _processCastState = (state: CastState, target: 'Chromecast' | 'Airplay') => {
37
- let message: string | undefined;
38
- switch (state) {
39
- case 'connecting':
40
- message = `Connecting to ${target} ...`;
41
- break;
42
- case 'connected':
43
- message = `Playing on ${target}`;
44
- break;
45
- }
46
- this.setState({
47
- message,
48
- });
49
- };
50
-
51
- private onCastEvent = (event: CastEvent) => {
52
- if (event.subType !== CastEventType.CHROMECAST_STATE_CHANGE && event.subType !== CastEventType.AIRPLAY_STATE_CHANGE) {
53
- return;
54
- }
55
- const castTarget = event.subType === CastEventType.CHROMECAST_STATE_CHANGE ? 'Chromecast' : 'Airplay';
56
- this._processCastState(event.state, castTarget);
57
- };
58
-
59
- render() {
60
- const { message } = this.state;
61
-
62
- if (!message) {
63
- return <></>;
64
- }
65
-
66
- return (
67
- <PlayerContext.Consumer>
68
- {(context: UiContext) => <Text style={[context.style.text, { color: context.style.colors.text }]}>{message}</Text>}
69
- </PlayerContext.Consumer>
70
- );
71
- }
72
- }
73
-
74
- CastMessage.contextType = PlayerContext;