react-native-theoplayer 2.7.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 (593) hide show
  1. package/CHANGELOG.md +76 -13
  2. package/README.md +16 -2
  3. package/android/build.gradle +1 -1
  4. package/android/local/com/theoplayer/android-connector/mediasession/5.2.0-local/mediasession-5.2.0-local.aar +0 -0
  5. package/android/local/com/theoplayer/android-connector/mediasession/{4.12.0-local/mediasession-4.12.0-local.pom → 5.2.0-local/mediasession-5.2.0-local.pom} +1 -1
  6. package/android/local/com/theoplayer/android-connector/mediasession/maven-metadata-local.xml +4 -4
  7. package/android/src/main/AndroidManifest.xml +2 -2
  8. package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +1 -1
  9. package/android/src/main/java/com/theoplayer/ReactTHEOplayerContext.kt +36 -20
  10. package/android/src/main/java/com/theoplayer/media/CustomMediaButtonReceiver.kt +25 -0
  11. package/android/src/main/java/com/theoplayer/{audio → media}/MediaNotificationBuilder.kt +6 -1
  12. package/android/src/main/java/com/theoplayer/{audio → media}/MediaPlaybackService.kt +39 -11
  13. package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +12 -0
  14. package/android/src/main/java/com/theoplayer/track/TrackListAdapter.kt +17 -13
  15. package/ios/contentprotection/THEOplayerRCTProxyContentProtectionIntegration.swift +19 -29
  16. package/lib/commonjs/api/cast/Chromecast.js.map +1 -1
  17. package/lib/commonjs/api/source/dash/DashPlaybackConfiguration.js.map +1 -1
  18. package/lib/commonjs/api/track/TextTrack.js.map +1 -1
  19. package/lib/commonjs/index.js +0 -12
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/internal/adapter/THEOplayerAdapter.js +17 -0
  22. package/lib/commonjs/internal/adapter/THEOplayerAdapter.js.map +1 -1
  23. package/lib/commonjs/internal/adapter/web/FullscreenAPI.js +41 -0
  24. package/lib/commonjs/internal/adapter/web/FullscreenAPI.js.map +1 -0
  25. package/lib/commonjs/internal/adapter/web/WebPresentationModeManager.js +45 -39
  26. package/lib/commonjs/internal/adapter/web/WebPresentationModeManager.js.map +1 -1
  27. package/lib/commonjs/internal/utils/CommonUtils.js +10 -0
  28. package/lib/commonjs/internal/utils/CommonUtils.js.map +1 -0
  29. package/lib/module/api/cast/Chromecast.js.map +1 -1
  30. package/lib/module/api/source/dash/DashPlaybackConfiguration.js.map +1 -1
  31. package/lib/module/api/track/TextTrack.js.map +1 -1
  32. package/lib/module/index.js +0 -1
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/internal/adapter/THEOplayerAdapter.js +18 -1
  35. package/lib/module/internal/adapter/THEOplayerAdapter.js.map +1 -1
  36. package/lib/module/internal/adapter/web/FullscreenAPI.js +34 -0
  37. package/lib/module/internal/adapter/web/FullscreenAPI.js.map +1 -0
  38. package/lib/module/internal/adapter/web/WebPresentationModeManager.js +45 -39
  39. package/lib/module/internal/adapter/web/WebPresentationModeManager.js.map +1 -1
  40. package/lib/module/internal/utils/CommonUtils.js +4 -0
  41. package/lib/module/internal/utils/CommonUtils.js.map +1 -0
  42. package/lib/typescript/api/cast/Chromecast.d.ts +1 -1
  43. package/lib/typescript/api/source/dash/DashPlaybackConfiguration.d.ts +52 -0
  44. package/lib/typescript/api/track/TextTrack.d.ts +2 -2
  45. package/lib/typescript/index.d.ts +0 -1
  46. package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts +1 -0
  47. package/lib/typescript/internal/adapter/web/FullscreenAPI.d.ts +9 -0
  48. package/lib/typescript/internal/utils/CommonUtils.d.ts +1 -0
  49. package/package.json +2 -8
  50. package/react-native-theoplayer.podspec +1 -1
  51. package/src/api/cast/Chromecast.ts +1 -1
  52. package/src/api/source/dash/DashPlaybackConfiguration.ts +56 -0
  53. package/src/api/track/TextTrack.ts +2 -2
  54. package/src/index.tsx +0 -1
  55. package/src/internal/adapter/THEOplayerAdapter.ts +19 -0
  56. package/src/internal/adapter/web/FullscreenAPI.ts +59 -0
  57. package/src/internal/adapter/web/WebPresentationModeManager.ts +29 -22
  58. package/src/internal/utils/CommonUtils.ts +3 -0
  59. package/android/local/com/theoplayer/android-connector/mediasession/4.12.0-local/mediasession-4.12.0-local.aar +0 -0
  60. package/lib/commonjs/ui/THEOplayerDefaultUi.js +0 -82
  61. package/lib/commonjs/ui/THEOplayerDefaultUi.js.map +0 -1
  62. package/lib/commonjs/ui/THEOplayerTheme.js +0 -48
  63. package/lib/commonjs/ui/THEOplayerTheme.js.map +0 -1
  64. package/lib/commonjs/ui/barrel.js +0 -39
  65. package/lib/commonjs/ui/barrel.js.map +0 -1
  66. package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +0 -99
  67. package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +0 -1
  68. package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js +0 -35
  69. package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js.map +0 -1
  70. package/lib/commonjs/ui/components/activityindicator/barrel.js +0 -28
  71. package/lib/commonjs/ui/components/activityindicator/barrel.js.map +0 -1
  72. package/lib/commonjs/ui/components/barrel.js +0 -105
  73. package/lib/commonjs/ui/components/barrel.js.map +0 -1
  74. package/lib/commonjs/ui/components/button/AirplayButton.js +0 -81
  75. package/lib/commonjs/ui/components/button/AirplayButton.js.map +0 -1
  76. package/lib/commonjs/ui/components/button/ChromecastButton.js +0 -66
  77. package/lib/commonjs/ui/components/button/ChromecastButton.js.map +0 -1
  78. package/lib/commonjs/ui/components/button/ChromecastButton.web.js +0 -82
  79. package/lib/commonjs/ui/components/button/ChromecastButton.web.js.map +0 -1
  80. package/lib/commonjs/ui/components/button/FullscreenButton.js +0 -72
  81. package/lib/commonjs/ui/components/button/FullscreenButton.js.map +0 -1
  82. package/lib/commonjs/ui/components/button/MuteButton.js +0 -66
  83. package/lib/commonjs/ui/components/button/MuteButton.js.map +0 -1
  84. package/lib/commonjs/ui/components/button/PipButton.js +0 -72
  85. package/lib/commonjs/ui/components/button/PipButton.js.map +0 -1
  86. package/lib/commonjs/ui/components/button/PlayButton.js +0 -113
  87. package/lib/commonjs/ui/components/button/PlayButton.js.map +0 -1
  88. package/lib/commonjs/ui/components/button/SkipButton.js +0 -122
  89. package/lib/commonjs/ui/components/button/SkipButton.js.map +0 -1
  90. package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js +0 -82
  91. package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js.map +0 -1
  92. package/lib/commonjs/ui/components/button/barrel.js +0 -105
  93. package/lib/commonjs/ui/components/button/barrel.js.map +0 -1
  94. package/lib/commonjs/ui/components/button/svg/AirplaySvg.js +0 -22
  95. package/lib/commonjs/ui/components/button/svg/AirplaySvg.js.map +0 -1
  96. package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js +0 -22
  97. package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js.map +0 -1
  98. package/lib/commonjs/ui/components/button/svg/BackSvg.js +0 -22
  99. package/lib/commonjs/ui/components/button/svg/BackSvg.js.map +0 -1
  100. package/lib/commonjs/ui/components/button/svg/BackwardSvg.js +0 -22
  101. package/lib/commonjs/ui/components/button/svg/BackwardSvg.js.map +0 -1
  102. package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js +0 -22
  103. package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js.map +0 -1
  104. package/lib/commonjs/ui/components/button/svg/ErrorSvg.js +0 -22
  105. package/lib/commonjs/ui/components/button/svg/ErrorSvg.js.map +0 -1
  106. package/lib/commonjs/ui/components/button/svg/ForwardSvg.js +0 -22
  107. package/lib/commonjs/ui/components/button/svg/ForwardSvg.js.map +0 -1
  108. package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js +0 -22
  109. package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js.map +0 -1
  110. package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js +0 -22
  111. package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js.map +0 -1
  112. package/lib/commonjs/ui/components/button/svg/LanguageSvg.js +0 -22
  113. package/lib/commonjs/ui/components/button/svg/LanguageSvg.js.map +0 -1
  114. package/lib/commonjs/ui/components/button/svg/ListSvg.js +0 -22
  115. package/lib/commonjs/ui/components/button/svg/ListSvg.js.map +0 -1
  116. package/lib/commonjs/ui/components/button/svg/PauseSvg.js +0 -22
  117. package/lib/commonjs/ui/components/button/svg/PauseSvg.js.map +0 -1
  118. package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js +0 -22
  119. package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js.map +0 -1
  120. package/lib/commonjs/ui/components/button/svg/PipExitSvg.js +0 -22
  121. package/lib/commonjs/ui/components/button/svg/PipExitSvg.js.map +0 -1
  122. package/lib/commonjs/ui/components/button/svg/PlaySvg.js +0 -22
  123. package/lib/commonjs/ui/components/button/svg/PlaySvg.js.map +0 -1
  124. package/lib/commonjs/ui/components/button/svg/ReplaySvg.js +0 -22
  125. package/lib/commonjs/ui/components/button/svg/ReplaySvg.js.map +0 -1
  126. package/lib/commonjs/ui/components/button/svg/SettingsSvg.js +0 -22
  127. package/lib/commonjs/ui/components/button/svg/SettingsSvg.js.map +0 -1
  128. package/lib/commonjs/ui/components/button/svg/SvgUtils.js +0 -13
  129. package/lib/commonjs/ui/components/button/svg/SvgUtils.js.map +0 -1
  130. package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js +0 -22
  131. package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js.map +0 -1
  132. package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js +0 -22
  133. package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js.map +0 -1
  134. package/lib/commonjs/ui/components/button/svg/barrel.js +0 -226
  135. package/lib/commonjs/ui/components/button/svg/barrel.js.map +0 -1
  136. package/lib/commonjs/ui/components/button/svg/res/AirPlayButton.html +0 -6
  137. package/lib/commonjs/ui/components/button/svg/res/Airplay.svg +0 -1
  138. package/lib/commonjs/ui/components/button/svg/res/ChromecastButton.html +0 -25
  139. package/lib/commonjs/ui/components/button/svg/res/arrow_forward.svg +0 -1
  140. package/lib/commonjs/ui/components/button/svg/res/back.svg +0 -1
  141. package/lib/commonjs/ui/components/button/svg/res/backward.svg +0 -1
  142. package/lib/commonjs/ui/components/button/svg/res/chromecast-48px.svg +0 -1
  143. package/lib/commonjs/ui/components/button/svg/res/close.svg +0 -1
  144. package/lib/commonjs/ui/components/button/svg/res/error.svg +0 -1
  145. package/lib/commonjs/ui/components/button/svg/res/forward.svg +0 -1
  146. package/lib/commonjs/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
  147. package/lib/commonjs/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
  148. package/lib/commonjs/ui/components/button/svg/res/language.svg +0 -1
  149. package/lib/commonjs/ui/components/button/svg/res/list.svg +0 -1
  150. package/lib/commonjs/ui/components/button/svg/res/live.svg +0 -1
  151. package/lib/commonjs/ui/components/button/svg/res/pause.svg +0 -1
  152. package/lib/commonjs/ui/components/button/svg/res/pip_enter.svg +0 -1
  153. package/lib/commonjs/ui/components/button/svg/res/pip_exit.svg +0 -1
  154. package/lib/commonjs/ui/components/button/svg/res/play.svg +0 -1
  155. package/lib/commonjs/ui/components/button/svg/res/replay.svg +0 -1
  156. package/lib/commonjs/ui/components/button/svg/res/settings.svg +0 -1
  157. package/lib/commonjs/ui/components/button/svg/res/skip-next.svg +0 -1
  158. package/lib/commonjs/ui/components/button/svg/res/volume-high.svg +0 -1
  159. package/lib/commonjs/ui/components/button/svg/res/volume-low.svg +0 -1
  160. package/lib/commonjs/ui/components/button/svg/res/volume-off.svg +0 -1
  161. package/lib/commonjs/ui/components/controlbar/ControlBar.js +0 -61
  162. package/lib/commonjs/ui/components/controlbar/ControlBar.js.map +0 -1
  163. package/lib/commonjs/ui/components/controlbar/Spacer.js +0 -21
  164. package/lib/commonjs/ui/components/controlbar/Spacer.js.map +0 -1
  165. package/lib/commonjs/ui/components/controlbar/barrel.js +0 -28
  166. package/lib/commonjs/ui/components/controlbar/barrel.js.map +0 -1
  167. package/lib/commonjs/ui/components/menu/LanguageMenuButton.js +0 -175
  168. package/lib/commonjs/ui/components/menu/LanguageMenuButton.js.map +0 -1
  169. package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js +0 -91
  170. package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js.map +0 -1
  171. package/lib/commonjs/ui/components/menu/QualitySubMenu.js +0 -145
  172. package/lib/commonjs/ui/components/menu/QualitySubMenu.js.map +0 -1
  173. package/lib/commonjs/ui/components/menu/SettingsMenuButton.js +0 -36
  174. package/lib/commonjs/ui/components/menu/SettingsMenuButton.js.map +0 -1
  175. package/lib/commonjs/ui/components/menu/barrel.js +0 -61
  176. package/lib/commonjs/ui/components/menu/barrel.js.map +0 -1
  177. package/lib/commonjs/ui/components/menu/common/MenuButton.js +0 -34
  178. package/lib/commonjs/ui/components/menu/common/MenuButton.js.map +0 -1
  179. package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js +0 -47
  180. package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js.map +0 -1
  181. package/lib/commonjs/ui/components/menu/common/MenuTitle.js +0 -38
  182. package/lib/commonjs/ui/components/menu/common/MenuTitle.js.map +0 -1
  183. package/lib/commonjs/ui/components/menu/common/MenuView.js +0 -75
  184. package/lib/commonjs/ui/components/menu/common/MenuView.js.map +0 -1
  185. package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js +0 -45
  186. package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js.map +0 -1
  187. package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js +0 -65
  188. package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js.map +0 -1
  189. package/lib/commonjs/ui/components/menu/common/barrel.js +0 -72
  190. package/lib/commonjs/ui/components/menu/common/barrel.js.map +0 -1
  191. package/lib/commonjs/ui/components/message/CastMessage.js +0 -79
  192. package/lib/commonjs/ui/components/message/CastMessage.js.map +0 -1
  193. package/lib/commonjs/ui/components/message/ErrorDisplay.js +0 -53
  194. package/lib/commonjs/ui/components/message/ErrorDisplay.js.map +0 -1
  195. package/lib/commonjs/ui/components/message/barrel.js +0 -28
  196. package/lib/commonjs/ui/components/message/barrel.js.map +0 -1
  197. package/lib/commonjs/ui/components/seekbar/SeekBar.js +0 -194
  198. package/lib/commonjs/ui/components/seekbar/SeekBar.js.map +0 -1
  199. package/lib/commonjs/ui/components/seekbar/barrel.js +0 -28
  200. package/lib/commonjs/ui/components/seekbar/barrel.js.map +0 -1
  201. package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js +0 -45
  202. package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +0 -1
  203. package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js +0 -18
  204. package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js.map +0 -1
  205. package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js +0 -256
  206. package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js.map +0 -1
  207. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js +0 -17
  208. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +0 -1
  209. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +0 -17
  210. package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +0 -1
  211. package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js +0 -28
  212. package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js.map +0 -1
  213. package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js +0 -55
  214. package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js.map +0 -1
  215. package/lib/commonjs/ui/components/timelabel/TimeLabel.js +0 -88
  216. package/lib/commonjs/ui/components/timelabel/TimeLabel.js.map +0 -1
  217. package/lib/commonjs/ui/components/timelabel/barrel.js +0 -28
  218. package/lib/commonjs/ui/components/timelabel/barrel.js.map +0 -1
  219. package/lib/commonjs/ui/components/uicontroller/UiContainer.js +0 -350
  220. package/lib/commonjs/ui/components/uicontroller/UiContainer.js.map +0 -1
  221. package/lib/commonjs/ui/components/uicontroller/UiControls.js +0 -6
  222. package/lib/commonjs/ui/components/uicontroller/UiControls.js.map +0 -1
  223. package/lib/commonjs/ui/components/uicontroller/barrel.js +0 -28
  224. package/lib/commonjs/ui/components/uicontroller/barrel.js.map +0 -1
  225. package/lib/commonjs/ui/components/util/PlayerContext.js +0 -19
  226. package/lib/commonjs/ui/components/util/PlayerContext.js.map +0 -1
  227. package/lib/commonjs/ui/components/util/TrackUtils.js +0 -69
  228. package/lib/commonjs/ui/components/util/TrackUtils.js.map +0 -1
  229. package/lib/commonjs/ui/components/util/barrel.js +0 -17
  230. package/lib/commonjs/ui/components/util/barrel.js.map +0 -1
  231. package/lib/commonjs/ui/utils/ArrayUtils.js +0 -19
  232. package/lib/commonjs/ui/utils/ArrayUtils.js.map +0 -1
  233. package/lib/commonjs/ui/utils/language/Language.js +0 -38
  234. package/lib/commonjs/ui/utils/language/Language.js.map +0 -1
  235. package/lib/commonjs/ui/utils/language/languages.json +0 -1658
  236. package/lib/commonjs/web/platform/BrowserDetection.js +0 -34
  237. package/lib/commonjs/web/platform/BrowserDetection.js.map +0 -1
  238. package/lib/module/ui/THEOplayerDefaultUi.js +0 -74
  239. package/lib/module/ui/THEOplayerDefaultUi.js.map +0 -1
  240. package/lib/module/ui/THEOplayerTheme.js +0 -41
  241. package/lib/module/ui/THEOplayerTheme.js.map +0 -1
  242. package/lib/module/ui/barrel.js +0 -4
  243. package/lib/module/ui/barrel.js.map +0 -1
  244. package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +0 -90
  245. package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +0 -1
  246. package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js +0 -26
  247. package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js.map +0 -1
  248. package/lib/module/ui/components/activityindicator/barrel.js +0 -3
  249. package/lib/module/ui/components/activityindicator/barrel.js.map +0 -1
  250. package/lib/module/ui/components/barrel.js +0 -10
  251. package/lib/module/ui/components/barrel.js.map +0 -1
  252. package/lib/module/ui/components/button/AirplayButton.js +0 -72
  253. package/lib/module/ui/components/button/AirplayButton.js.map +0 -1
  254. package/lib/module/ui/components/button/ChromecastButton.js +0 -56
  255. package/lib/module/ui/components/button/ChromecastButton.js.map +0 -1
  256. package/lib/module/ui/components/button/ChromecastButton.web.js +0 -72
  257. package/lib/module/ui/components/button/ChromecastButton.web.js.map +0 -1
  258. package/lib/module/ui/components/button/FullscreenButton.js +0 -63
  259. package/lib/module/ui/components/button/FullscreenButton.js.map +0 -1
  260. package/lib/module/ui/components/button/MuteButton.js +0 -57
  261. package/lib/module/ui/components/button/MuteButton.js.map +0 -1
  262. package/lib/module/ui/components/button/PipButton.js +0 -63
  263. package/lib/module/ui/components/button/PipButton.js.map +0 -1
  264. package/lib/module/ui/components/button/PlayButton.js +0 -104
  265. package/lib/module/ui/components/button/PlayButton.js.map +0 -1
  266. package/lib/module/ui/components/button/SkipButton.js +0 -113
  267. package/lib/module/ui/components/button/SkipButton.js.map +0 -1
  268. package/lib/module/ui/components/button/actionbutton/ActionButton.js +0 -72
  269. package/lib/module/ui/components/button/actionbutton/ActionButton.js.map +0 -1
  270. package/lib/module/ui/components/button/barrel.js +0 -10
  271. package/lib/module/ui/components/button/barrel.js.map +0 -1
  272. package/lib/module/ui/components/button/svg/AirplaySvg.js +0 -12
  273. package/lib/module/ui/components/button/svg/AirplaySvg.js.map +0 -1
  274. package/lib/module/ui/components/button/svg/ArrowForwardSvg.js +0 -12
  275. package/lib/module/ui/components/button/svg/ArrowForwardSvg.js.map +0 -1
  276. package/lib/module/ui/components/button/svg/BackSvg.js +0 -12
  277. package/lib/module/ui/components/button/svg/BackSvg.js.map +0 -1
  278. package/lib/module/ui/components/button/svg/BackwardSvg.js +0 -12
  279. package/lib/module/ui/components/button/svg/BackwardSvg.js.map +0 -1
  280. package/lib/module/ui/components/button/svg/ChromecastSvg.js +0 -12
  281. package/lib/module/ui/components/button/svg/ChromecastSvg.js.map +0 -1
  282. package/lib/module/ui/components/button/svg/ErrorSvg.js +0 -12
  283. package/lib/module/ui/components/button/svg/ErrorSvg.js.map +0 -1
  284. package/lib/module/ui/components/button/svg/ForwardSvg.js +0 -12
  285. package/lib/module/ui/components/button/svg/ForwardSvg.js.map +0 -1
  286. package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js +0 -12
  287. package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js.map +0 -1
  288. package/lib/module/ui/components/button/svg/FullscreenExitSvg.js +0 -12
  289. package/lib/module/ui/components/button/svg/FullscreenExitSvg.js.map +0 -1
  290. package/lib/module/ui/components/button/svg/LanguageSvg.js +0 -12
  291. package/lib/module/ui/components/button/svg/LanguageSvg.js.map +0 -1
  292. package/lib/module/ui/components/button/svg/ListSvg.js +0 -12
  293. package/lib/module/ui/components/button/svg/ListSvg.js.map +0 -1
  294. package/lib/module/ui/components/button/svg/PauseSvg.js +0 -12
  295. package/lib/module/ui/components/button/svg/PauseSvg.js.map +0 -1
  296. package/lib/module/ui/components/button/svg/PipEnterSvg.js +0 -12
  297. package/lib/module/ui/components/button/svg/PipEnterSvg.js.map +0 -1
  298. package/lib/module/ui/components/button/svg/PipExitSvg.js +0 -12
  299. package/lib/module/ui/components/button/svg/PipExitSvg.js.map +0 -1
  300. package/lib/module/ui/components/button/svg/PlaySvg.js +0 -12
  301. package/lib/module/ui/components/button/svg/PlaySvg.js.map +0 -1
  302. package/lib/module/ui/components/button/svg/ReplaySvg.js +0 -12
  303. package/lib/module/ui/components/button/svg/ReplaySvg.js.map +0 -1
  304. package/lib/module/ui/components/button/svg/SettingsSvg.js +0 -12
  305. package/lib/module/ui/components/button/svg/SettingsSvg.js.map +0 -1
  306. package/lib/module/ui/components/button/svg/SvgUtils.js +0 -5
  307. package/lib/module/ui/components/button/svg/SvgUtils.js.map +0 -1
  308. package/lib/module/ui/components/button/svg/VolumeOffSvg.js +0 -12
  309. package/lib/module/ui/components/button/svg/VolumeOffSvg.js.map +0 -1
  310. package/lib/module/ui/components/button/svg/VolumeUpSvg.js +0 -12
  311. package/lib/module/ui/components/button/svg/VolumeUpSvg.js.map +0 -1
  312. package/lib/module/ui/components/button/svg/barrel.js +0 -21
  313. package/lib/module/ui/components/button/svg/barrel.js.map +0 -1
  314. package/lib/module/ui/components/button/svg/res/AirPlayButton.html +0 -6
  315. package/lib/module/ui/components/button/svg/res/Airplay.svg +0 -1
  316. package/lib/module/ui/components/button/svg/res/ChromecastButton.html +0 -25
  317. package/lib/module/ui/components/button/svg/res/arrow_forward.svg +0 -1
  318. package/lib/module/ui/components/button/svg/res/back.svg +0 -1
  319. package/lib/module/ui/components/button/svg/res/backward.svg +0 -1
  320. package/lib/module/ui/components/button/svg/res/chromecast-48px.svg +0 -1
  321. package/lib/module/ui/components/button/svg/res/close.svg +0 -1
  322. package/lib/module/ui/components/button/svg/res/error.svg +0 -1
  323. package/lib/module/ui/components/button/svg/res/forward.svg +0 -1
  324. package/lib/module/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
  325. package/lib/module/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
  326. package/lib/module/ui/components/button/svg/res/language.svg +0 -1
  327. package/lib/module/ui/components/button/svg/res/list.svg +0 -1
  328. package/lib/module/ui/components/button/svg/res/live.svg +0 -1
  329. package/lib/module/ui/components/button/svg/res/pause.svg +0 -1
  330. package/lib/module/ui/components/button/svg/res/pip_enter.svg +0 -1
  331. package/lib/module/ui/components/button/svg/res/pip_exit.svg +0 -1
  332. package/lib/module/ui/components/button/svg/res/play.svg +0 -1
  333. package/lib/module/ui/components/button/svg/res/replay.svg +0 -1
  334. package/lib/module/ui/components/button/svg/res/settings.svg +0 -1
  335. package/lib/module/ui/components/button/svg/res/skip-next.svg +0 -1
  336. package/lib/module/ui/components/button/svg/res/volume-high.svg +0 -1
  337. package/lib/module/ui/components/button/svg/res/volume-low.svg +0 -1
  338. package/lib/module/ui/components/button/svg/res/volume-off.svg +0 -1
  339. package/lib/module/ui/components/controlbar/ControlBar.js +0 -52
  340. package/lib/module/ui/components/controlbar/ControlBar.js.map +0 -1
  341. package/lib/module/ui/components/controlbar/Spacer.js +0 -14
  342. package/lib/module/ui/components/controlbar/Spacer.js.map +0 -1
  343. package/lib/module/ui/components/controlbar/barrel.js +0 -3
  344. package/lib/module/ui/components/controlbar/barrel.js.map +0 -1
  345. package/lib/module/ui/components/menu/LanguageMenuButton.js +0 -165
  346. package/lib/module/ui/components/menu/LanguageMenuButton.js.map +0 -1
  347. package/lib/module/ui/components/menu/PlaybackRateSubMenu.js +0 -80
  348. package/lib/module/ui/components/menu/PlaybackRateSubMenu.js.map +0 -1
  349. package/lib/module/ui/components/menu/QualitySubMenu.js +0 -135
  350. package/lib/module/ui/components/menu/QualitySubMenu.js.map +0 -1
  351. package/lib/module/ui/components/menu/SettingsMenuButton.js +0 -28
  352. package/lib/module/ui/components/menu/SettingsMenuButton.js.map +0 -1
  353. package/lib/module/ui/components/menu/barrel.js +0 -6
  354. package/lib/module/ui/components/menu/barrel.js.map +0 -1
  355. package/lib/module/ui/components/menu/common/MenuButton.js +0 -26
  356. package/lib/module/ui/components/menu/common/MenuButton.js.map +0 -1
  357. package/lib/module/ui/components/menu/common/MenuRadioButton.js +0 -38
  358. package/lib/module/ui/components/menu/common/MenuRadioButton.js.map +0 -1
  359. package/lib/module/ui/components/menu/common/MenuTitle.js +0 -29
  360. package/lib/module/ui/components/menu/common/MenuTitle.js.map +0 -1
  361. package/lib/module/ui/components/menu/common/MenuView.js +0 -65
  362. package/lib/module/ui/components/menu/common/MenuView.js.map +0 -1
  363. package/lib/module/ui/components/menu/common/ScrollableMenu.js +0 -36
  364. package/lib/module/ui/components/menu/common/ScrollableMenu.js.map +0 -1
  365. package/lib/module/ui/components/menu/common/SubMenuWithButton.js +0 -56
  366. package/lib/module/ui/components/menu/common/SubMenuWithButton.js.map +0 -1
  367. package/lib/module/ui/components/menu/common/barrel.js +0 -7
  368. package/lib/module/ui/components/menu/common/barrel.js.map +0 -1
  369. package/lib/module/ui/components/message/CastMessage.js +0 -70
  370. package/lib/module/ui/components/message/CastMessage.js.map +0 -1
  371. package/lib/module/ui/components/message/ErrorDisplay.js +0 -46
  372. package/lib/module/ui/components/message/ErrorDisplay.js.map +0 -1
  373. package/lib/module/ui/components/message/barrel.js +0 -3
  374. package/lib/module/ui/components/message/barrel.js.map +0 -1
  375. package/lib/module/ui/components/seekbar/SeekBar.js +0 -184
  376. package/lib/module/ui/components/seekbar/SeekBar.js.map +0 -1
  377. package/lib/module/ui/components/seekbar/barrel.js +0 -3
  378. package/lib/module/ui/components/seekbar/barrel.js.map +0 -1
  379. package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js +0 -37
  380. package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +0 -1
  381. package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js +0 -11
  382. package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js.map +0 -1
  383. package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js +0 -246
  384. package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js.map +0 -1
  385. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js +0 -2
  386. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +0 -1
  387. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +0 -3
  388. package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +0 -1
  389. package/lib/module/ui/components/seekbar/thumbnail/barrel.js +0 -3
  390. package/lib/module/ui/components/seekbar/thumbnail/barrel.js.map +0 -1
  391. package/lib/module/ui/components/timelabel/StaticTimeLabel.js +0 -48
  392. package/lib/module/ui/components/timelabel/StaticTimeLabel.js.map +0 -1
  393. package/lib/module/ui/components/timelabel/TimeLabel.js +0 -78
  394. package/lib/module/ui/components/timelabel/TimeLabel.js.map +0 -1
  395. package/lib/module/ui/components/timelabel/barrel.js +0 -3
  396. package/lib/module/ui/components/timelabel/barrel.js.map +0 -1
  397. package/lib/module/ui/components/uicontroller/UiContainer.js +0 -336
  398. package/lib/module/ui/components/uicontroller/UiContainer.js.map +0 -1
  399. package/lib/module/ui/components/uicontroller/UiControls.js +0 -2
  400. package/lib/module/ui/components/uicontroller/UiControls.js.map +0 -1
  401. package/lib/module/ui/components/uicontroller/barrel.js +0 -3
  402. package/lib/module/ui/components/uicontroller/barrel.js.map +0 -1
  403. package/lib/module/ui/components/util/PlayerContext.js +0 -11
  404. package/lib/module/ui/components/util/PlayerContext.js.map +0 -1
  405. package/lib/module/ui/components/util/TrackUtils.js +0 -60
  406. package/lib/module/ui/components/util/TrackUtils.js.map +0 -1
  407. package/lib/module/ui/components/util/barrel.js +0 -2
  408. package/lib/module/ui/components/util/barrel.js.map +0 -1
  409. package/lib/module/ui/utils/ArrayUtils.js +0 -12
  410. package/lib/module/ui/utils/ArrayUtils.js.map +0 -1
  411. package/lib/module/ui/utils/language/Language.js +0 -27
  412. package/lib/module/ui/utils/language/Language.js.map +0 -1
  413. package/lib/module/ui/utils/language/languages.json +0 -1658
  414. package/lib/module/web/platform/BrowserDetection.js +0 -27
  415. package/lib/module/web/platform/BrowserDetection.js.map +0 -1
  416. package/lib/typescript/ui/THEOplayerDefaultUi.d.ts +0 -35
  417. package/lib/typescript/ui/THEOplayerTheme.d.ts +0 -84
  418. package/lib/typescript/ui/barrel.d.ts +0 -3
  419. package/lib/typescript/ui/components/activityindicator/CenteredDelayedActivityIndicator.d.ts +0 -25
  420. package/lib/typescript/ui/components/activityindicator/DelayedActivityIndicator.d.ts +0 -9
  421. package/lib/typescript/ui/components/activityindicator/barrel.d.ts +0 -2
  422. package/lib/typescript/ui/components/barrel.d.ts +0 -9
  423. package/lib/typescript/ui/components/button/AirplayButton.d.ts +0 -18
  424. package/lib/typescript/ui/components/button/ChromecastButton.d.ts +0 -19
  425. package/lib/typescript/ui/components/button/ChromecastButton.web.d.ts +0 -19
  426. package/lib/typescript/ui/components/button/FullscreenButton.d.ts +0 -17
  427. package/lib/typescript/ui/components/button/MuteButton.d.ts +0 -16
  428. package/lib/typescript/ui/components/button/PipButton.d.ts +0 -17
  429. package/lib/typescript/ui/components/button/PlayButton.d.ts +0 -28
  430. package/lib/typescript/ui/components/button/SkipButton.d.ts +0 -33
  431. package/lib/typescript/ui/components/button/actionbutton/ActionButton.d.ts +0 -41
  432. package/lib/typescript/ui/components/button/barrel.d.ts +0 -9
  433. package/lib/typescript/ui/components/button/svg/AirplaySvg.d.ts +0 -3
  434. package/lib/typescript/ui/components/button/svg/ArrowForwardSvg.d.ts +0 -3
  435. package/lib/typescript/ui/components/button/svg/BackSvg.d.ts +0 -3
  436. package/lib/typescript/ui/components/button/svg/BackwardSvg.d.ts +0 -3
  437. package/lib/typescript/ui/components/button/svg/ChromecastSvg.d.ts +0 -3
  438. package/lib/typescript/ui/components/button/svg/ErrorSvg.d.ts +0 -3
  439. package/lib/typescript/ui/components/button/svg/ForwardSvg.d.ts +0 -3
  440. package/lib/typescript/ui/components/button/svg/FullscreenEnterSvg.d.ts +0 -3
  441. package/lib/typescript/ui/components/button/svg/FullscreenExitSvg.d.ts +0 -3
  442. package/lib/typescript/ui/components/button/svg/LanguageSvg.d.ts +0 -3
  443. package/lib/typescript/ui/components/button/svg/ListSvg.d.ts +0 -3
  444. package/lib/typescript/ui/components/button/svg/PauseSvg.d.ts +0 -3
  445. package/lib/typescript/ui/components/button/svg/PipEnterSvg.d.ts +0 -3
  446. package/lib/typescript/ui/components/button/svg/PipExitSvg.d.ts +0 -3
  447. package/lib/typescript/ui/components/button/svg/PlaySvg.d.ts +0 -3
  448. package/lib/typescript/ui/components/button/svg/ReplaySvg.d.ts +0 -3
  449. package/lib/typescript/ui/components/button/svg/SettingsSvg.d.ts +0 -3
  450. package/lib/typescript/ui/components/button/svg/SvgUtils.d.ts +0 -3
  451. package/lib/typescript/ui/components/button/svg/VolumeOffSvg.d.ts +0 -3
  452. package/lib/typescript/ui/components/button/svg/VolumeUpSvg.d.ts +0 -3
  453. package/lib/typescript/ui/components/button/svg/barrel.d.ts +0 -20
  454. package/lib/typescript/ui/components/controlbar/ControlBar.d.ts +0 -39
  455. package/lib/typescript/ui/components/controlbar/Spacer.d.ts +0 -5
  456. package/lib/typescript/ui/components/controlbar/barrel.d.ts +0 -2
  457. package/lib/typescript/ui/components/menu/LanguageMenuButton.d.ts +0 -40
  458. package/lib/typescript/ui/components/menu/PlaybackRateSubMenu.d.ts +0 -36
  459. package/lib/typescript/ui/components/menu/QualitySubMenu.d.ts +0 -29
  460. package/lib/typescript/ui/components/menu/SettingsMenuButton.d.ts +0 -12
  461. package/lib/typescript/ui/components/menu/barrel.d.ts +0 -5
  462. package/lib/typescript/ui/components/menu/common/MenuButton.d.ts +0 -25
  463. package/lib/typescript/ui/components/menu/common/MenuRadioButton.d.ts +0 -33
  464. package/lib/typescript/ui/components/menu/common/MenuTitle.d.ts +0 -20
  465. package/lib/typescript/ui/components/menu/common/MenuView.d.ts +0 -21
  466. package/lib/typescript/ui/components/menu/common/ScrollableMenu.d.ts +0 -23
  467. package/lib/typescript/ui/components/menu/common/SubMenuWithButton.d.ts +0 -29
  468. package/lib/typescript/ui/components/menu/common/barrel.d.ts +0 -6
  469. package/lib/typescript/ui/components/message/CastMessage.d.ts +0 -16
  470. package/lib/typescript/ui/components/message/ErrorDisplay.d.ts +0 -12
  471. package/lib/typescript/ui/components/message/barrel.d.ts +0 -2
  472. package/lib/typescript/ui/components/seekbar/SeekBar.d.ts +0 -41
  473. package/lib/typescript/ui/components/seekbar/barrel.d.ts +0 -2
  474. package/lib/typescript/ui/components/seekbar/thumbnail/SingleThumbnailView.d.ts +0 -8
  475. package/lib/typescript/ui/components/seekbar/thumbnail/Thumbnail.d.ts +0 -56
  476. package/lib/typescript/ui/components/seekbar/thumbnail/ThumbnailView.d.ts +0 -60
  477. package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.d.ts +0 -1
  478. package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.web.d.ts +0 -1
  479. package/lib/typescript/ui/components/seekbar/thumbnail/barrel.d.ts +0 -2
  480. package/lib/typescript/ui/components/timelabel/StaticTimeLabel.d.ts +0 -24
  481. package/lib/typescript/ui/components/timelabel/TimeLabel.d.ts +0 -32
  482. package/lib/typescript/ui/components/timelabel/barrel.d.ts +0 -2
  483. package/lib/typescript/ui/components/uicontroller/UiContainer.d.ts +0 -115
  484. package/lib/typescript/ui/components/uicontroller/UiControls.d.ts +0 -14
  485. package/lib/typescript/ui/components/uicontroller/barrel.d.ts +0 -2
  486. package/lib/typescript/ui/components/util/PlayerContext.d.ts +0 -22
  487. package/lib/typescript/ui/components/util/TrackUtils.d.ts +0 -10
  488. package/lib/typescript/ui/components/util/barrel.d.ts +0 -1
  489. package/lib/typescript/ui/utils/ArrayUtils.d.ts +0 -2
  490. package/lib/typescript/ui/utils/language/Language.d.ts +0 -19
  491. package/lib/typescript/web/platform/BrowserDetection.d.ts +0 -23
  492. package/src/ui/THEOplayerDefaultUi.tsx +0 -108
  493. package/src/ui/THEOplayerTheme.ts +0 -112
  494. package/src/ui/barrel.ts +0 -3
  495. package/src/ui/components/activityindicator/CenteredDelayedActivityIndicator.tsx +0 -96
  496. package/src/ui/components/activityindicator/DelayedActivityIndicator.tsx +0 -32
  497. package/src/ui/components/activityindicator/barrel.ts +0 -2
  498. package/src/ui/components/barrel.ts +0 -9
  499. package/src/ui/components/button/AirplayButton.tsx +0 -64
  500. package/src/ui/components/button/ChromecastButton.tsx +0 -60
  501. package/src/ui/components/button/ChromecastButton.web.tsx +0 -66
  502. package/src/ui/components/button/FullscreenButton.tsx +0 -60
  503. package/src/ui/components/button/MuteButton.tsx +0 -52
  504. package/src/ui/components/button/PipButton.tsx +0 -61
  505. package/src/ui/components/button/PlayButton.tsx +0 -107
  506. package/src/ui/components/button/SkipButton.tsx +0 -112
  507. package/src/ui/components/button/actionbutton/ActionButton.tsx +0 -105
  508. package/src/ui/components/button/barrel.ts +0 -9
  509. package/src/ui/components/button/svg/AirplaySvg.tsx +0 -18
  510. package/src/ui/components/button/svg/ArrowForwardSvg.tsx +0 -18
  511. package/src/ui/components/button/svg/BackSvg.tsx +0 -18
  512. package/src/ui/components/button/svg/BackwardSvg.tsx +0 -18
  513. package/src/ui/components/button/svg/ChromecastSvg.tsx +0 -18
  514. package/src/ui/components/button/svg/ErrorSvg.tsx +0 -18
  515. package/src/ui/components/button/svg/ForwardSvg.tsx +0 -18
  516. package/src/ui/components/button/svg/FullscreenEnterSvg.tsx +0 -18
  517. package/src/ui/components/button/svg/FullscreenExitSvg.tsx +0 -18
  518. package/src/ui/components/button/svg/LanguageSvg.tsx +0 -18
  519. package/src/ui/components/button/svg/ListSvg.tsx +0 -18
  520. package/src/ui/components/button/svg/PauseSvg.tsx +0 -18
  521. package/src/ui/components/button/svg/PipEnterSvg.tsx +0 -18
  522. package/src/ui/components/button/svg/PipExitSvg.tsx +0 -18
  523. package/src/ui/components/button/svg/PlaySvg.tsx +0 -18
  524. package/src/ui/components/button/svg/ReplaySvg.tsx +0 -18
  525. package/src/ui/components/button/svg/SettingsSvg.tsx +0 -18
  526. package/src/ui/components/button/svg/SvgUtils.ts +0 -4
  527. package/src/ui/components/button/svg/VolumeOffSvg.tsx +0 -18
  528. package/src/ui/components/button/svg/VolumeUpSvg.tsx +0 -18
  529. package/src/ui/components/button/svg/barrel.ts +0 -20
  530. package/src/ui/components/button/svg/res/AirPlayButton.html +0 -6
  531. package/src/ui/components/button/svg/res/Airplay.svg +0 -1
  532. package/src/ui/components/button/svg/res/ChromecastButton.html +0 -25
  533. package/src/ui/components/button/svg/res/arrow_forward.svg +0 -1
  534. package/src/ui/components/button/svg/res/back.svg +0 -1
  535. package/src/ui/components/button/svg/res/backward.svg +0 -1
  536. package/src/ui/components/button/svg/res/chromecast-48px.svg +0 -1
  537. package/src/ui/components/button/svg/res/close.svg +0 -1
  538. package/src/ui/components/button/svg/res/error.svg +0 -1
  539. package/src/ui/components/button/svg/res/forward.svg +0 -1
  540. package/src/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
  541. package/src/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
  542. package/src/ui/components/button/svg/res/language.svg +0 -1
  543. package/src/ui/components/button/svg/res/list.svg +0 -1
  544. package/src/ui/components/button/svg/res/live.svg +0 -1
  545. package/src/ui/components/button/svg/res/pause.svg +0 -1
  546. package/src/ui/components/button/svg/res/pip_enter.svg +0 -1
  547. package/src/ui/components/button/svg/res/pip_exit.svg +0 -1
  548. package/src/ui/components/button/svg/res/play.svg +0 -1
  549. package/src/ui/components/button/svg/res/replay.svg +0 -1
  550. package/src/ui/components/button/svg/res/settings.svg +0 -1
  551. package/src/ui/components/button/svg/res/skip-next.svg +0 -1
  552. package/src/ui/components/button/svg/res/volume-high.svg +0 -1
  553. package/src/ui/components/button/svg/res/volume-low.svg +0 -1
  554. package/src/ui/components/button/svg/res/volume-off.svg +0 -1
  555. package/src/ui/components/controlbar/ControlBar.tsx +0 -69
  556. package/src/ui/components/controlbar/Spacer.tsx +0 -9
  557. package/src/ui/components/controlbar/barrel.ts +0 -2
  558. package/src/ui/components/menu/LanguageMenuButton.tsx +0 -192
  559. package/src/ui/components/menu/PlaybackRateSubMenu.tsx +0 -93
  560. package/src/ui/components/menu/QualitySubMenu.tsx +0 -148
  561. package/src/ui/components/menu/SettingsMenuButton.tsx +0 -25
  562. package/src/ui/components/menu/barrel.ts +0 -5
  563. package/src/ui/components/menu/common/MenuButton.tsx +0 -49
  564. package/src/ui/components/menu/common/MenuRadioButton.tsx +0 -65
  565. package/src/ui/components/menu/common/MenuTitle.tsx +0 -37
  566. package/src/ui/components/menu/common/MenuView.tsx +0 -62
  567. package/src/ui/components/menu/common/ScrollableMenu.tsx +0 -43
  568. package/src/ui/components/menu/common/SubMenuWithButton.tsx +0 -58
  569. package/src/ui/components/menu/common/barrel.ts +0 -6
  570. package/src/ui/components/message/CastMessage.tsx +0 -74
  571. package/src/ui/components/message/ErrorDisplay.tsx +0 -43
  572. package/src/ui/components/message/barrel.ts +0 -2
  573. package/src/ui/components/seekbar/SeekBar.tsx +0 -178
  574. package/src/ui/components/seekbar/barrel.ts +0 -2
  575. package/src/ui/components/seekbar/thumbnail/SingleThumbnailView.tsx +0 -38
  576. package/src/ui/components/seekbar/thumbnail/Thumbnail.ts +0 -72
  577. package/src/ui/components/seekbar/thumbnail/ThumbnailView.tsx +0 -266
  578. package/src/ui/components/seekbar/thumbnail/Urlpolyfill.ts +0 -1
  579. package/src/ui/components/seekbar/thumbnail/Urlpolyfill.web.ts +0 -2
  580. package/src/ui/components/seekbar/thumbnail/barrel.ts +0 -2
  581. package/src/ui/components/timelabel/StaticTimeLabel.tsx +0 -63
  582. package/src/ui/components/timelabel/TimeLabel.tsx +0 -79
  583. package/src/ui/components/timelabel/barrel.ts +0 -2
  584. package/src/ui/components/uicontroller/UiContainer.tsx +0 -355
  585. package/src/ui/components/uicontroller/UiControls.ts +0 -31
  586. package/src/ui/components/uicontroller/barrel.ts +0 -2
  587. package/src/ui/components/util/PlayerContext.ts +0 -29
  588. package/src/ui/components/util/TrackUtils.ts +0 -62
  589. package/src/ui/components/util/barrel.ts +0 -1
  590. package/src/ui/utils/ArrayUtils.ts +0 -12
  591. package/src/ui/utils/language/Language.ts +0 -38
  592. package/src/ui/utils/language/languages.json +0 -1658
  593. package/src/web/platform/BrowserDetection.ts +0 -38
package/CHANGELOG.md CHANGED
@@ -5,6 +5,46 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.9.0] - 23-06-16
9
+
10
+ ### Changed
11
+
12
+ - Moved React Native UI to separate `@theoplayer/react-native-ui` package.
13
+
14
+ ### Removed
15
+
16
+ - Removed `react-native-theoplayer` dependencies on packages `@react-native-community/slider`, `react-native-google-cast`, `react-native-svg`, `react-native-svg-web`, `react-native-url-polyfill` and `url-polyfill`.
17
+
18
+ ### Added
19
+
20
+ - Added an overview of the available React Native connectors.
21
+
22
+ ### Fixed
23
+
24
+ - Fixed an issue on Android where the background media service would crash the app in case it was started from the background.
25
+ - Fixed an issue on iOS where the delayed contentId extraction resulted in an incorrect value being passed to the license request setup.
26
+
27
+ ## [2.8.0] - 23-06-01
28
+
29
+ ### Added
30
+
31
+ - Added `ignoreAvailabilityWindow` property to `SourceDescription.dash` for Android and Web.
32
+ - Added `needsTimescaleShifting`, `desiredTimescale` and `forceSeekToSynchronize` properties to `SourceDescription.dash` for Web.
33
+
34
+ ### Fixed
35
+
36
+ - Fixed an issue where text track cue changes were not applied to the TextTrack's `cue` property.
37
+ - Fixed an issue on Android where play-out of an MP4 stream would sometimes crash the player.
38
+ - Fixed an issue on Android where a `pause` event would not be dispatched while pausing during play-out of an ad.
39
+ - Fixed an issue on Android where hardware buttons, such as `play` and `pause`, were not handled anymore after toggling background audio support.
40
+ - Fixed an issue on Android where the app would crash when toggling background playback while multiple `MediaBrowserServiceCompat` instances are registered.
41
+
42
+ ### Changed
43
+
44
+ - Improved fullscreen support to use non-native fullscreen on Safari for iPad and Mac.
45
+ - Limited the set of available media session actions on Android when an ad or live stream is playing.
46
+ - Removed pausing the stream when disabling background playback on Android.
47
+
8
48
  ## [2.7.0] - 23-05-15
9
49
 
10
50
  ### Changed
@@ -14,6 +54,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
14
54
  ### Fixed
15
55
 
16
56
  - Fixed an issue on Android where if an invalid view tag is passed to the native bridge, it would crash the player.
57
+ - Fixed an issue on Web where preview thumbnails would fail to load.
58
+
59
+ ### Added
60
+
61
+ - Updated UI documentation with necessary dependencies.
62
+ - Added improved debug logging on iOS.
17
63
 
18
64
  ## [2.6.0] - 23-05-05
19
65
 
@@ -203,13 +249,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
203
249
  - Fixed missing `volumechange` events on mobile platforms.
204
250
  - Fixed an issue on iOS where after toggling the mute state during an ad playout, succeeding mute toggles had no effect.
205
251
 
206
- ## [1.8.2]
252
+ ## [1.8.4] - 23-04-27
253
+
254
+ ### Fixed
255
+
256
+ - Fixed an issue on Android where the `pause` event was not dispatched during play-out of an ad.
257
+
258
+ ### Added
259
+
260
+ - Added a `videoAspectRatio` property on the `THEOplayerView` for iOS and Android.
261
+ - Added a `PlayerEventTypes.WAITING` event that is dispatched when play-back stops due to lack of media data.
262
+
263
+ ## [1.8.3] - 23-04-06
264
+
265
+ ### Fixed
266
+
267
+ - Fixed an issue on Android where building the SDK would fail when depending on player SDK v5.x.
268
+
269
+ ## [1.8.2] - 23-04-05
207
270
 
208
271
  ### Fixed
209
272
 
210
273
  - Fixed an issue on Android where building the SDK would fail when depending on player SDK v4.12.0.
211
274
 
212
- ## [1.8.1]
275
+ ## [1.8.1] - 23-02-09
213
276
 
214
277
  ### Changed
215
278
 
@@ -222,7 +285,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
222
285
  - Fixed an issue on iOS where the player was not destroyed correctly on the iOS bridge.
223
286
  - Added support for `DRMConfig` through `SourceDescription` for SSAI sources on iOS.
224
287
 
225
- ## [1.8.0]
288
+ ## [1.8.0] - 23-01-16
226
289
 
227
290
  ### Added
228
291
 
@@ -237,20 +300,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
237
300
  - Upgraded Web SDK to v4.6.0.
238
301
  - Updated the custom build setup to support both iOS and tvOS.
239
302
 
240
- ## [1.7.2]
303
+ ## [1.7.2] - 22-12-05
241
304
 
242
305
  ### Fixed
243
306
 
244
307
  - Fixed an issue on tvOS where a feature flag was incorrectly used for ads-related code.
245
308
 
246
- ## [1.7.1]
309
+ ## [1.7.1] - 22-11-28
247
310
 
248
311
  ### Fixed
249
312
 
250
313
  - Fixed an issue on Android where the player would consider unusable custom drm integrations.
251
314
  - Fixed missing kotlin classpath property on Android.
252
315
 
253
- ## [1.7.0]
316
+ ## [1.7.0] - 22-11-23
254
317
 
255
318
  ### Added
256
319
 
@@ -268,13 +331,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
268
331
  - Fixed an issue in the example app where it would not be possible to select a specific text track.
269
332
  - Fixed conflicting npm dependencies in the example app.
270
333
 
271
- ## [1.6.1]
334
+ ## [1.6.1] - 22-10-07
272
335
 
273
336
  ### Added
274
337
 
275
338
  - Improved source handling for iOS.
276
339
 
277
- ## [1.6.0]
340
+ ## [1.6.0] - 22-09-28
278
341
 
279
342
  ### Fixed
280
343
 
@@ -286,7 +349,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
286
349
  - Excluded folders from bob build config.
287
350
  - Upgraded gradle versions for Android.
288
351
 
289
- ## [1.5.0]
352
+ ## [1.5.0] - 22-09-26
290
353
 
291
354
  ### Fixed
292
355
 
@@ -298,7 +361,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
298
361
  - Support for DRM pre-integrations on Android.
299
362
  - Support for additional source properties on Android: `liveOffset`, `hlsDateRange`, `timeServer` and `hls`.
300
363
 
301
- ## [1.4.0]
364
+ ## [1.4.0] - 22-08-11
302
365
 
303
366
  ### Fixed
304
367
 
@@ -309,7 +372,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
309
372
 
310
373
  - Improved determination of the stream source type on Android.
311
374
 
312
- ## [1.3.0]
375
+ ## [1.3.0] - 22-07-26
313
376
 
314
377
  ### Fixed
315
378
 
@@ -318,7 +381,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
318
381
  - Fixed documentation feature matrix.
319
382
  - Fixed duration scale in loadedmetadata event properties for Web.
320
383
 
321
- ## [1.2.0]
384
+ ## [1.2.0] - 22-06-30
322
385
 
323
386
  ### Fixed
324
387
 
@@ -326,7 +389,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
326
389
  - Fixed a number of broken links in the documentation.
327
390
  - Removed unused files.
328
391
 
329
- ## [1.1.0]
392
+ ## [1.1.0] - 22-06-06
330
393
 
331
394
  ### Added
332
395
 
package/README.md CHANGED
@@ -23,7 +23,8 @@ following platforms:
23
23
  - Web (currently only HTML5 browsers are tested)
24
24
 
25
25
  This document covers the creation of a minimal app including a `THEOplayerView` component,
26
- and an overview of the included example app with the `DefaultTHEOplayerUi`.
26
+ and an overview of the accompanying example app with a user interface provided
27
+ by the `@theoplayer/react-native-ui` package.
27
28
 
28
29
  It also gives a description of the properties of the `THEOplayerView` component, and
29
30
  a list of features and known limitations.
@@ -49,6 +50,20 @@ These are guides on how to use the THEOplayer React Native SDK in your React Nat
49
50
  linearly or by searching the specific section. It is recommended that you have a basic understanding of how
50
51
  React Native works to speed up the way of working with THEOplayer React Native SDK.
51
52
 
53
+ ## Available connectors
54
+
55
+ The `react-native-theoplayer` package can be combined with any number of connectors to provide extra
56
+ functionality. Currently, the following connectors are available:
57
+
58
+ | Package name | Purpose | Registry |
59
+ |------------------------------------------------------------------------------------------------------------------|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
60
+ | [`@theoplayer/react-native-analytics-adobe`](https://github.com/THEOplayer/react-native-theoplayer-analytics) | Adobe analytics connector | [![npm](https://img.shields.io/npm/v/@theoplayer/react-native-analytics-adobe)](https://www.npmjs.com/package/@theoplayer/react-native-analytics-adobe) |
61
+ | [`@theoplayer/react-native-analytics-comscore`](https://github.com/THEOplayer/react-native-theoplayer-analytics) | Comscore analytics connector | [![npm](https://img.shields.io/npm/v/@theoplayer/react-native-analytics-comscore)](https://www.npmjs.com/package/@theoplayer/react-native-analytics-comscore) |
62
+ | [`@theoplayer/react-native-analytics-conviva`](https://github.com/THEOplayer/react-native-theoplayer-analytics) | Conviva analytics connector | [![npm](https://img.shields.io/npm/v/@theoplayer/react-native-analytics-conviva)](https://www.npmjs.com/package/@theoplayer/react-native-analytics-conviva) |
63
+ | [`@theoplayer/react-native-analytics-nielsen`](https://github.com/THEOplayer/react-native-theoplayer-analytics) | Nielsen analytics connector | [![npm](https://img.shields.io/npm/v/@theoplayer/react-native-analytics-nielsen)](https://www.npmjs.com/package/@theoplayer/react-native-analytics-nielsen) |
64
+ | [`@theoplayer/react-native-drm`](https://github.com/THEOplayer/react-native-theoplayer-drm) | Content protection (DRM) connectors | [![npm](https://img.shields.io/npm/v/@theoplayer/react-native-drm)](https://www.npmjs.com/package/@theoplayer/react-native-drm) |
65
+ | [`@theoplayer/react-native-ui`](https://github.com/THEOplayer/react-native-theoplayer-ui) | React Native user interface | [![npm](https://img.shields.io/npm/v/@theoplayer/react-native-ui)](https://www.npmjs.com/package/@theoplayer/react-native-ui) |
66
+
52
67
  ## Getting Started
53
68
 
54
69
  This section starts with creating a minimal demo app that integrates the `react-native-theoplayer` package,
@@ -61,7 +76,6 @@ and discussed in the next section. Finally, an overview of features, limitations
61
76
  - [Getting started on Android](./doc/creating-minimal-app.md#getting-started-on-android)
62
77
  - [Getting started on iOS](./doc/creating-minimal-app.md#getting-started-on-ios-and-tvos)
63
78
  - [Getting started on Web](./doc/creating-minimal-app.md#getting-started-on-web)
64
- - [Getting started with the UI](./doc/ui.md)
65
79
  - [The THEOplayerView component](./doc/theoplayerview-component.md)
66
80
  - [The example application](./doc/example-app.md)
67
81
  - [Features](./doc/features.md)
@@ -109,7 +109,7 @@ dependencies {
109
109
  def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[5.0.1,)')
110
110
 
111
111
  // def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', theoplayer_sdk_version)
112
- def theoplayer_mediasession_version = "4.12.0-local"
112
+ def theoplayer_mediasession_version = "5.2.0-local"
113
113
  def enabledV4 = theoplayer_sdk_version.toString().startsWith("4.")
114
114
  def core_prefix = enabledV4 ? 'unified' : 'core'
115
115
  def integration_prefix = enabledV4 ? 'unified' : 'integration'
@@ -3,7 +3,7 @@
3
3
  <modelVersion>4.0.0</modelVersion>
4
4
  <groupId>com.theoplayer.android-connector</groupId>
5
5
  <artifactId>mediasession</artifactId>
6
- <version>4.12.0-local</version>
6
+ <version>5.2.0-local</version>
7
7
  <packaging>aar</packaging>
8
8
  <dependencies>
9
9
  <dependency>
@@ -3,11 +3,11 @@
3
3
  <groupId>com.theoplayer.android-connector</groupId>
4
4
  <artifactId>mediasession</artifactId>
5
5
  <versioning>
6
- <latest>4.12.0-local</latest>
7
- <release>4.12.0-local</release>
6
+ <latest>5.2.0-local</latest>
7
+ <release>5.2.0-local</release>
8
8
  <versions>
9
- <version>4.12.0-local</version>
9
+ <version>5.2.0-local</version>
10
10
  </versions>
11
- <lastUpdated>20230408184844</lastUpdated>
11
+ <lastUpdated>20230531125422</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -29,7 +29,7 @@
29
29
 
30
30
  <!-- Allow background audio playback by registering this service. -->
31
31
  <service
32
- android:name="com.theoplayer.audio.MediaPlaybackService"
32
+ android:name="com.theoplayer.media.MediaPlaybackService"
33
33
  android:description="@string/background_playback_service_description"
34
34
  android:exported="false"
35
35
  android:enabled="false"
@@ -40,7 +40,7 @@
40
40
  </intent-filter>
41
41
  </service>
42
42
 
43
- <receiver android:name="androidx.media.session.MediaButtonReceiver"
43
+ <receiver android:name="com.theoplayer.media.CustomMediaButtonReceiver"
44
44
  android:exported="false">
45
45
  <intent-filter>
46
46
  <action android:name="android.intent.action.MEDIA_BUTTON" />
@@ -346,7 +346,7 @@ class PlayerEventEmitter internal constructor(
346
346
  private fun onPause() {
347
347
  val player = playerView.player
348
348
  // Do not forward the pause event in case the content player is paused because the ad player starts.
349
- if (player != null && !playerView.adsApi.isPlaying) {
349
+ if (player != null && (!playerView.adsApi.isPlaying || player.isPaused)) {
350
350
  receiveEvent(EVENT_PAUSE, null)
351
351
  }
352
352
  }
@@ -26,11 +26,20 @@ import com.theoplayer.android.api.event.player.*
26
26
  import com.theoplayer.android.api.player.Player
27
27
  import com.theoplayer.android.connector.mediasession.MediaSessionConnector
28
28
  import com.theoplayer.audio.BackgroundAudioConfig
29
- import com.theoplayer.audio.MediaPlaybackService
29
+ import com.theoplayer.media.MediaPlaybackService
30
30
  import java.util.concurrent.atomic.AtomicBoolean
31
31
 
32
32
  private const val TAG = "ReactTHEOplayerContext"
33
33
 
34
+ private const val ALLOWED_PLAYBACK_ACTIONS = (
35
+ PlaybackStateCompat.ACTION_PLAY_PAUSE or
36
+ PlaybackStateCompat.ACTION_PLAY or
37
+ PlaybackStateCompat.ACTION_PAUSE or
38
+ PlaybackStateCompat.ACTION_SEEK_TO or
39
+ PlaybackStateCompat.ACTION_FAST_FORWARD or
40
+ PlaybackStateCompat.ACTION_REWIND or
41
+ PlaybackStateCompat.ACTION_SET_PLAYBACK_SPEED)
42
+
34
43
  class ReactTHEOplayerContext private constructor(
35
44
  private val reactContext: ThemedReactContext
36
45
  ) {
@@ -59,8 +68,6 @@ class ReactTHEOplayerContext private constructor(
59
68
  get() = backgroundAudioConfig.enabled
60
69
 
61
70
  companion object {
62
- private var mediaControlledInstance: ReactTHEOplayerContext? = null
63
-
64
71
  fun create(
65
72
  reactContext: ThemedReactContext,
66
73
  playerConfig: THEOplayerConfig
@@ -75,9 +82,6 @@ class ReactTHEOplayerContext private constructor(
75
82
  override fun onServiceConnected(className: ComponentName, service: IBinder) {
76
83
  binder = service as MediaPlaybackService.MediaPlaybackBinder
77
84
 
78
- // Clean-up any existing media session connector
79
- mediaSessionConnector?.destroy()
80
-
81
85
  // Get media session connector from service
82
86
  mediaSessionConnector = binder?.mediaSessionConnector
83
87
  mediaSessionConnector?.player = player
@@ -128,12 +132,26 @@ class ReactTHEOplayerContext private constructor(
128
132
  }
129
133
  }
130
134
 
135
+ private fun applyAllowedMediaControls() {
136
+ // Reduce allowed set of remote control playback actions for ads & live streams.
137
+ val isLive = player.duration.isInfinite()
138
+ val isInAd = player.ads.isPlaying
139
+ mediaSessionConnector?.enabledPlaybackActions = if (isInAd || isLive) {
140
+ 0
141
+ } else {
142
+ ALLOWED_PLAYBACK_ACTIONS
143
+ }
144
+ }
145
+
131
146
  private fun bindMediaPlaybackService() {
132
147
  // Bind to an existing service, if available
133
148
  // A bound service runs only as long as another application component is bound to it.
134
149
  // Multiple components can bind to the service at once, but when all of them unbind, the
135
150
  // service is destroyed.
136
151
  if (!isBound.get()) {
152
+ // Clean-up any existing media session connector
153
+ mediaSessionConnector?.destroy()
154
+
137
155
  isBound.set(
138
156
  reactContext.bindService(
139
157
  Intent(reactContext, MediaPlaybackService::class.java),
@@ -179,11 +197,8 @@ class ReactTHEOplayerContext private constructor(
179
197
  addIntegrations(playerConfig)
180
198
  addListeners()
181
199
 
182
- if (mediaControlledInstance == null) {
183
- mediaControlledInstance = this
184
- if (!BuildConfig.USE_PLAYBACK_SERVICE || !isBackgroundAudioEnabled) {
185
- initDefaultMediaSession()
186
- }
200
+ if (!BuildConfig.USE_PLAYBACK_SERVICE || !isBackgroundAudioEnabled) {
201
+ initDefaultMediaSession()
187
202
  }
188
203
 
189
204
  // Apply initial backgroundPlayback config
@@ -243,10 +258,12 @@ class ReactTHEOplayerContext private constructor(
243
258
  private val onSourceChange = EventListener<SourceChangeEvent> {
244
259
  mediaSessionConnector?.setMediaSessionMetadata(player.source)
245
260
  binder?.updateNotification()
261
+ applyAllowedMediaControls()
246
262
  }
247
263
 
248
264
  private val onLoadedMetadata = EventListener<LoadedMetadataEvent> {
249
265
  binder?.updateNotification()
266
+ applyAllowedMediaControls()
250
267
  }
251
268
 
252
269
  private val onPlay = EventListener<PlayEvent> {
@@ -254,10 +271,12 @@ class ReactTHEOplayerContext private constructor(
254
271
  bindMediaPlaybackService()
255
272
  }
256
273
  binder?.updateNotification(PlaybackStateCompat.STATE_PLAYING)
274
+ applyAllowedMediaControls()
257
275
  }
258
276
 
259
277
  private val onPause = EventListener<PauseEvent> {
260
278
  binder?.updateNotification(PlaybackStateCompat.STATE_PAUSED)
279
+ applyAllowedMediaControls()
261
280
  }
262
281
 
263
282
  private fun addListeners() {
@@ -310,17 +329,14 @@ class ReactTHEOplayerContext private constructor(
310
329
  }
311
330
 
312
331
  fun destroy() {
313
- if (mediaControlledInstance == this) {
314
- if (BuildConfig.USE_PLAYBACK_SERVICE) {
315
- removeListeners()
332
+ if (BuildConfig.USE_PLAYBACK_SERVICE) {
333
+ removeListeners()
316
334
 
317
- // Remove service from foreground
318
- binder?.stopForegroundService()
335
+ // Remove service from foreground
336
+ binder?.stopForegroundService()
319
337
 
320
- // Unbind client from background service so it can stop
321
- unbindMediaPlaybackService()
322
- }
323
- mediaControlledInstance = null
338
+ // Unbind client from background service so it can stop
339
+ unbindMediaPlaybackService()
324
340
  }
325
341
  mediaSessionConnector?.destroy()
326
342
  playerView.onDestroy()
@@ -0,0 +1,25 @@
1
+ package com.theoplayer.media
2
+
3
+ import android.content.Context
4
+ import android.content.Intent
5
+ import android.util.Log
6
+ import androidx.media.session.MediaButtonReceiver
7
+
8
+ private const val TAG = "MediaButtonReceiver"
9
+
10
+ class CustomMediaButtonReceiver : MediaButtonReceiver() {
11
+
12
+ override fun onReceive(context: Context?, intent: Intent?) {
13
+ // MediaButtonReceiver will throw an IllegalStateException in case there are
14
+ // none, or more than one MediaBrowserServiceCompat instances registered.
15
+ // Handle and ignore the exception here.
16
+ try {
17
+ super.onReceive(context, intent)
18
+ } catch (e: IllegalStateException) {
19
+ Log.e(
20
+ TAG,
21
+ e.message ?: "Failed to handle media playback button action."
22
+ )
23
+ }
24
+ }
25
+ }
@@ -1,4 +1,4 @@
1
- package com.theoplayer.audio
1
+ package com.theoplayer.media
2
2
 
3
3
  import android.app.Notification
4
4
  import android.app.NotificationChannel
@@ -11,6 +11,7 @@ import android.support.v4.media.session.MediaSessionCompat
11
11
  import android.support.v4.media.session.PlaybackStateCompat
12
12
  import android.util.Log
13
13
  import androidx.core.app.NotificationCompat
14
+ import androidx.core.app.NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE
14
15
  import androidx.core.content.ContextCompat
15
16
  import androidx.media.session.MediaButtonReceiver
16
17
  import com.facebook.common.executors.UiThreadImmediateExecutorService
@@ -81,6 +82,10 @@ class MediaNotificationBuilder(
81
82
  }
82
83
  builder.apply {
83
84
 
85
+ // Fix for a bug where ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK that was passed
86
+ // with the startForeground call got ignored.
87
+ foregroundServiceBehavior = FOREGROUND_SERVICE_IMMEDIATE
88
+
84
89
  // Add the metadata for the currently playing track
85
90
  mediaSession.controller.metadata?.description?.let {
86
91
  setContentTitle(it.title)
@@ -1,9 +1,8 @@
1
- package com.theoplayer.audio
1
+ package com.theoplayer.media
2
2
 
3
- import android.app.NotificationManager
4
- import android.app.PendingIntent
5
- import android.app.Service
3
+ import android.app.*
6
4
  import android.content.Intent
5
+ import android.content.pm.ServiceInfo
7
6
  import android.os.Binder
8
7
  import android.os.Build
9
8
  import android.os.Bundle
@@ -12,6 +11,7 @@ import android.support.v4.media.MediaBrowserCompat
12
11
  import android.support.v4.media.session.MediaSessionCompat
13
12
  import android.support.v4.media.session.PlaybackStateCompat
14
13
  import android.text.TextUtils
14
+ import android.util.Log
15
15
  import androidx.core.content.ContextCompat
16
16
  import androidx.media.MediaBrowserServiceCompat
17
17
  import androidx.media.session.MediaButtonReceiver
@@ -85,10 +85,16 @@ class MediaPlaybackService : MediaBrowserServiceCompat() {
85
85
 
86
86
  // This ensures that the service starts and continues to run, even when all
87
87
  // UI MediaBrowser activities that are bound to it unbind.
88
- ContextCompat.startForegroundService(
89
- applicationContext,
90
- Intent(applicationContext, MediaPlaybackService::class.java)
91
- )
88
+ try {
89
+ ContextCompat.startForegroundService(
90
+ applicationContext,
91
+ Intent(applicationContext, MediaPlaybackService::class.java)
92
+ )
93
+ } catch (e: IllegalStateException) {
94
+ // Make sure that app does not crash in case anything goes wrong with starting the service.
95
+ // https://issuetracker.google.com/issues/229000935
96
+ Log.w(TAG, "Failed to start foreground service: ${e.message}")
97
+ }
92
98
 
93
99
  updateNotification(PlaybackStateCompat.STATE_PLAYING)
94
100
  }
@@ -98,6 +104,9 @@ class MediaPlaybackService : MediaBrowserServiceCompat() {
98
104
  }
99
105
 
100
106
  override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
107
+ // This ensures that the correct callbacks to MediaSessionCompat.Callback will be triggered
108
+ // based on the incoming KeyEvent.
109
+ // https://developer.android.com/reference/androidx/media/session/MediaButtonReceiver
101
110
  MediaButtonReceiver.handleIntent(mediaSession, intent)
102
111
  return super.onStartCommand(intent, flags, startId)
103
112
  }
@@ -155,17 +164,19 @@ class MediaPlaybackService : MediaBrowserServiceCompat() {
155
164
  setMediaButtonReceiver(mediaButtonPendingIntent)
156
165
  }
157
166
 
158
- // Create a MediaSessionConnector and attach the THEOplayer instance.
167
+ // Create a MediaSessionConnector.
159
168
  mediaSessionConnector = MediaSessionConnector(mediaSession).apply {
160
169
  debug = BuildConfig.LOG_MEDIASESSION_EVENTS
161
170
 
162
171
  // Set mediaSession active
163
172
  setActive(true)
164
173
  }
174
+
175
+ // Set the MediaBrowserServiceCompat's media session.
176
+ sessionToken = mediaSession.sessionToken
165
177
  }
166
178
 
167
179
  private fun stopForegroundService() {
168
- player?.pause()
169
180
  updateNotification(PlaybackStateCompat.STATE_STOPPED)
170
181
  stopSelf()
171
182
  }
@@ -255,7 +266,24 @@ class MediaPlaybackService : MediaBrowserServiceCompat() {
255
266
  // information from the session's metadata.
256
267
  // Fetch large icon asynchronously
257
268
  fetchImageFromUri(mediaSession.controller.metadata?.description?.iconUri) { largeIcon ->
258
- startForeground(NOTIFICATION_ID, notificationBuilder.build(playbackState, largeIcon, enableMediaControls))
269
+ try {
270
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
271
+ startForeground(
272
+ NOTIFICATION_ID,
273
+ notificationBuilder.build(playbackState, largeIcon, enableMediaControls),
274
+ ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
275
+ )
276
+ } else {
277
+ startForeground(
278
+ NOTIFICATION_ID,
279
+ notificationBuilder.build(playbackState, largeIcon, enableMediaControls)
280
+ )
281
+ }
282
+ } catch (e: IllegalStateException) {
283
+ // Make sure that app does not crash in case anything goes wrong with starting the service.
284
+ // https://issuetracker.google.com/issues/229000935
285
+ Log.w(TAG, "Failed to start foreground service: ${e.message}")
286
+ }
259
287
  }
260
288
  }
261
289
  PlaybackStateCompat.STATE_STOPPED -> {
@@ -24,6 +24,7 @@ import com.theoplayer.android.api.source.metadata.ChromecastMetadataImage
24
24
  import com.facebook.react.bridge.ReadableArray
25
25
  import com.theoplayer.BuildConfig
26
26
  import com.theoplayer.android.api.error.ErrorCode
27
+ import com.theoplayer.android.api.source.dash.DashPlaybackConfiguration
27
28
  import com.theoplayer.drm.ContentProtectionAdapter
28
29
  import org.json.JSONArray
29
30
  import org.json.JSONException
@@ -51,6 +52,8 @@ private const val PROP_TEXT_TRACKS = "textTracks"
51
52
  private const val PROP_POSTER = "poster"
52
53
  private const val PROP_ADS = "ads"
53
54
  private const val PROP_AVAILABILITY_TYPE = "availabilityType"
55
+ private const val PROP_DASH = "dash"
56
+ private const val PROP_DASH_IGNORE_AVAILABILITYWINDOW = "ignoreAvailabilityWindow"
54
57
  private const val ERROR_DAI_NOT_ENABLED = "Google DAI support not enabled."
55
58
  private const val ERROR_UNSUPPORTED_SSAI_INTEGRATION = "Unsupported SSAI integration"
56
59
  private const val ERROR_MISSING_SSAI_INTEGRATION = "Missing SSAI integration"
@@ -186,6 +189,9 @@ class SourceAdapter {
186
189
  if (sourceType != null) {
187
190
  tsBuilder.type(sourceType)
188
191
  }
192
+ if (jsonTypedSource.has(PROP_DASH)) {
193
+ tsBuilder.dash(parseDashConfig(jsonTypedSource.getJSONObject(PROP_DASH)))
194
+ }
189
195
  if (jsonTypedSource.has(PROP_LIVE_OFFSET)) {
190
196
  tsBuilder.liveOffset(jsonTypedSource.getDouble(PROP_LIVE_OFFSET))
191
197
  }
@@ -358,6 +364,12 @@ class SourceAdapter {
358
364
  return MetadataDescription(metadata)
359
365
  }
360
366
 
367
+ private fun parseDashConfig(dashConfig: JSONObject): DashPlaybackConfiguration {
368
+ return DashPlaybackConfiguration.Builder()
369
+ .ignoreAvailabilityWindow(dashConfig.optBoolean(PROP_DASH_IGNORE_AVAILABILITYWINDOW))
370
+ .build()
371
+ }
372
+
361
373
  @Throws(JSONException::class)
362
374
  private fun parseMetadataImages(metadataImages: JSONArray): List<ChromecastMetadataImage> {
363
375
  val imageList: MutableList<ChromecastMetadataImage> = ArrayList()
@@ -124,9 +124,11 @@ object TrackListAdapter {
124
124
  audioTrackPayload.putString(PROP_LANGUAGE, audioTrack.language)
125
125
  val qualityList = audioTrack.qualities
126
126
  val qualities = Arguments.createArray()
127
- qualityList?.forEach { quality ->
128
- qualities.pushMap(fromAudioQuality(quality))
129
- }
127
+ try {
128
+ qualityList?.forEach { quality ->
129
+ qualities.pushMap(fromAudioQuality(quality))
130
+ }
131
+ } catch (ignore: NullPointerException) {}
130
132
  audioTrackPayload.putArray(PROP_QUALITIES, qualities)
131
133
  val activeQuality = audioTrack.activeQuality
132
134
  if (activeQuality != null) {
@@ -163,18 +165,20 @@ object TrackListAdapter {
163
165
  videoTrackPayload.putString(PROP_KIND, videoTrack.kind)
164
166
  videoTrackPayload.putString(PROP_LABEL, videoTrack.label)
165
167
  videoTrackPayload.putString(PROP_LANGUAGE, videoTrack.language)
166
- val qualityList = videoTrack.qualities
167
168
  val qualities = Arguments.createArray()
168
- if (qualityList != null) {
169
- // Sort qualities according to (height, bandwidth)
170
- val sortedQualityList = QualityListAdapter(qualityList)
171
- sortedQualityList.sort { o: VideoQuality, t1: VideoQuality ->
172
- if (o.height == t1.height) t1.bandwidth.compareTo(o.bandwidth) else t1.height.compareTo(o.height)
169
+ try {
170
+ val qualityList = videoTrack.qualities
171
+ if (qualityList != null) {
172
+ // Sort qualities according to (height, bandwidth)
173
+ val sortedQualityList = QualityListAdapter(qualityList)
174
+ sortedQualityList.sort { o: VideoQuality, t1: VideoQuality ->
175
+ if (o.height == t1.height) t1.bandwidth.compareTo(o.bandwidth) else t1.height.compareTo(o.height)
176
+ }
177
+ for (quality in sortedQualityList) {
178
+ qualities.pushMap(fromVideoQuality(quality as VideoQuality))
179
+ }
173
180
  }
174
- for (quality in sortedQualityList) {
175
- qualities.pushMap(fromVideoQuality(quality as VideoQuality))
176
- }
177
- }
181
+ } catch (ignore: java.lang.NullPointerException) {}
178
182
  videoTrackPayload.putArray(PROP_QUALITIES, qualities)
179
183
  val activeQuality = videoTrack.activeQuality
180
184
  if (activeQuality != null) {