react-native-theoplayer 2.10.0 → 2.12.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 (75) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/README.md +12 -9
  3. package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +1 -1
  4. package/android/src/main/java/com/theoplayer/ReactTHEOplayerContext.kt +14 -0
  5. package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +1 -3
  6. package/android/src/main/java/com/theoplayer/audio/AudioFocusManager.kt +145 -0
  7. package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +1 -1
  8. package/android/src/main/java/com/theoplayer/player/PlayerModule.kt +10 -0
  9. package/android/src/main/java/com/theoplayer/presentation/PipUtils.kt +16 -9
  10. package/android/src/main/java/com/theoplayer/track/TextTrackStyleAdapter.kt +79 -0
  11. package/android/src/main/java/com/theoplayer/util/ViewResolver.kt +6 -0
  12. package/ios/THEOplayerRCTBridge.m +3 -0
  13. package/ios/THEOplayerRCTPlayerAPI.swift +66 -2
  14. package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +2 -0
  15. package/ios/THEOplayerRCTTextTrackEventHandler.swift +32 -4
  16. package/ios/THEOplayerRCTTypeUtils.swift +15 -0
  17. package/ios/ads/THEOplayerRCTAdsAPI+DAI.swift +1 -1
  18. package/ios/ads/THEOplayerRCTSourceDescriptionBuilder+Ads.swift +1 -1
  19. package/ios/ads/THEOplayerRCTView+AdsConfig.swift +1 -1
  20. package/ios/backgroundAudio/THEOplayerRCTNowPlayingManager.swift +3 -3
  21. package/ios/backgroundAudio/THEOplayerRCTRemoteCommandsManager.swift +51 -36
  22. package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
  23. package/lib/commonjs/api/source/analytics/AnalyticsDescription.js +2 -0
  24. package/lib/commonjs/api/source/analytics/AnalyticsDescription.js.map +1 -0
  25. package/lib/commonjs/api/source/analytics/barrel.js +17 -0
  26. package/lib/commonjs/api/source/analytics/barrel.js.map +1 -0
  27. package/lib/commonjs/api/source/barrel.js +15 -4
  28. package/lib/commonjs/api/source/barrel.js.map +1 -1
  29. package/lib/commonjs/api/track/TextTrack.js +1 -1
  30. package/lib/commonjs/api/track/TextTrack.js.map +1 -1
  31. package/lib/commonjs/api/track/TextTrackStyle.js +29 -0
  32. package/lib/commonjs/api/track/TextTrackStyle.js.map +1 -1
  33. package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
  34. package/lib/commonjs/internal/adapter/track/NamedColors.json +143 -0
  35. package/lib/commonjs/internal/adapter/track/TextTrackStyleAdapter.js +118 -22
  36. package/lib/commonjs/internal/adapter/track/TextTrackStyleAdapter.js.map +1 -1
  37. package/lib/commonjs/internal/adapter/web/WebMediaSession.js +1 -1
  38. package/lib/commonjs/internal/adapter/web/WebMediaSession.js.map +1 -1
  39. package/lib/module/api/source/SourceDescription.js.map +1 -1
  40. package/lib/module/api/source/analytics/AnalyticsDescription.js +2 -0
  41. package/lib/module/api/source/analytics/AnalyticsDescription.js.map +1 -0
  42. package/lib/module/api/source/analytics/barrel.js +2 -0
  43. package/lib/module/api/source/analytics/barrel.js.map +1 -0
  44. package/lib/module/api/source/barrel.js +1 -0
  45. package/lib/module/api/source/barrel.js.map +1 -1
  46. package/lib/module/api/track/TextTrack.js +1 -1
  47. package/lib/module/api/track/TextTrack.js.map +1 -1
  48. package/lib/module/api/track/TextTrackStyle.js +23 -0
  49. package/lib/module/api/track/TextTrackStyle.js.map +1 -1
  50. package/lib/module/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
  51. package/lib/module/internal/adapter/track/NamedColors.json +143 -0
  52. package/lib/module/internal/adapter/track/TextTrackStyleAdapter.js +117 -22
  53. package/lib/module/internal/adapter/track/TextTrackStyleAdapter.js.map +1 -1
  54. package/lib/module/internal/adapter/web/WebMediaSession.js +1 -1
  55. package/lib/module/internal/adapter/web/WebMediaSession.js.map +1 -1
  56. package/lib/typescript/api/source/SourceDescription.d.ts +5 -0
  57. package/lib/typescript/api/source/analytics/AnalyticsDescription.d.ts +15 -0
  58. package/lib/typescript/api/source/analytics/barrel.d.ts +1 -0
  59. package/lib/typescript/api/source/barrel.d.ts +1 -0
  60. package/lib/typescript/api/track/TextTrack.d.ts +1 -1
  61. package/lib/typescript/api/track/TextTrackStyle.d.ts +43 -5
  62. package/lib/typescript/internal/adapter/track/TextTrackStyleAdapter.d.ts +26 -8
  63. package/package.json +1 -1
  64. package/react-native-theoplayer.json +2 -1
  65. package/react-native-theoplayer.podspec +5 -1
  66. package/src/api/source/SourceDescription.ts +6 -0
  67. package/src/api/source/analytics/AnalyticsDescription.ts +16 -0
  68. package/src/api/source/analytics/barrel.ts +1 -0
  69. package/src/api/source/barrel.ts +1 -0
  70. package/src/api/track/TextTrack.ts +2 -2
  71. package/src/api/track/TextTrackStyle.ts +45 -5
  72. package/src/internal/adapter/THEOplayerWebAdapter.ts +1 -1
  73. package/src/internal/adapter/track/NamedColors.json +143 -0
  74. package/src/internal/adapter/track/TextTrackStyleAdapter.ts +132 -21
  75. package/src/internal/adapter/web/WebMediaSession.ts +1 -1
@@ -79,16 +79,19 @@ class THEOplayerRCTTextTrackEventHandler {
79
79
  "type" : TrackListEventType.REMOVE_TRACK.rawValue
80
80
  ])
81
81
  // stop listening for cue events on this track
82
- if let addCueListener = welf.addCueListeners[textTrack.uid],
83
- let removeCueListener = welf.removeCueListeners[textTrack.uid],
84
- let enterCueListener = welf.enterCueListeners[textTrack.uid],
85
- let exitCueListener = welf.exitCueListeners[textTrack.uid] {
82
+ if let addCueListener = welf.addCueListeners.removeValue(forKey: textTrack.uid) {
86
83
  textTrack.removeEventListener(type: TextTrackEventTypes.ADD_CUE, listener: addCueListener)
87
84
  if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] AddCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
85
+ }
86
+ if let removeCueListener = welf.removeCueListeners.removeValue(forKey: textTrack.uid) {
88
87
  textTrack.removeEventListener(type: TextTrackEventTypes.REMOVE_CUE, listener: removeCueListener)
89
88
  if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] RemoveCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
89
+ }
90
+ if let enterCueListener = welf.enterCueListeners.removeValue(forKey: textTrack.uid) {
90
91
  textTrack.removeEventListener(type: TextTrackEventTypes.ENTER_CUE, listener: enterCueListener)
91
92
  if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] EnterCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
93
+ }
94
+ if let exitCueListener = welf.exitCueListeners.removeValue(forKey: textTrack.uid) {
92
95
  textTrack.removeEventListener(type: TextTrackEventTypes.EXIT_CUE, listener: exitCueListener)
93
96
  if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] ExitCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
94
97
  }
@@ -134,6 +137,31 @@ class THEOplayerRCTTextTrackEventHandler {
134
137
  player.textTracks.removeEventListener(type: TextTrackListEventTypes.CHANGE, listener: changeTrackListener)
135
138
  if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] ChangeTrack listener dettached from THEOplayer textTrack list") }
136
139
  }
140
+
141
+ // ADD_CUE, REMOVE_CUE, ENTER_CUE, EXIT_CUE
142
+ let textTrackCount = player.textTracks.count
143
+ if textTrackCount > 0 {
144
+ for i in 0..<textTrackCount {
145
+ let textTrack = player.textTracks[i]
146
+ // stop listening for cue events on this track
147
+ if let addCueListener = self.addCueListeners.removeValue(forKey: textTrack.uid) {
148
+ textTrack.removeEventListener(type: TextTrackEventTypes.ADD_CUE, listener: addCueListener)
149
+ if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] AddCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
150
+ }
151
+ if let removeCueListener = self.removeCueListeners.removeValue(forKey: textTrack.uid) {
152
+ textTrack.removeEventListener(type: TextTrackEventTypes.REMOVE_CUE, listener: removeCueListener)
153
+ if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] RemoveCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
154
+ }
155
+ if let enterCueListener = self.enterCueListeners.removeValue(forKey: textTrack.uid) {
156
+ textTrack.removeEventListener(type: TextTrackEventTypes.ENTER_CUE, listener: enterCueListener)
157
+ if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] EnterCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
158
+ }
159
+ if let exitCueListener = self.exitCueListeners.removeValue(forKey: textTrack.uid) {
160
+ textTrack.removeEventListener(type: TextTrackEventTypes.EXIT_CUE, listener: exitCueListener)
161
+ if DEBUG_EVENTHANDLER { PrintUtils.printLog(logText: "[NATIVE] ExitCue listener removed from THEOplayer textTrack with uid \(textTrack.uid)") }
162
+ }
163
+ }
164
+ }
137
165
  }
138
166
 
139
167
  // MARK: - dynamic textTrack Listeners
@@ -83,4 +83,19 @@ class THEOplayerRCTTypeUtils {
83
83
  return "fit"
84
84
  }
85
85
  }
86
+
87
+ class func textTrackEdgeStyleStringFromString(_ style: String) -> String {
88
+ switch style {
89
+ case "dropshadow":
90
+ return TextTrackStyleEdgeStyle.dropShadow
91
+ case "raised":
92
+ return TextTrackStyleEdgeStyle.raised
93
+ case "depressed":
94
+ return TextTrackStyleEdgeStyle.depressed
95
+ case "uniform":
96
+ return TextTrackStyleEdgeStyle.uniform
97
+ default:
98
+ return TextTrackStyleEdgeStyle.none
99
+ }
100
+ }
86
101
  }
@@ -11,7 +11,7 @@ let ERROR_MESSAGE_DAI_GET_SNAPBACK_UNDEFINED = "Undefined dai snapback"
11
11
 
12
12
  extension THEOplayerRCTAdsAPI {
13
13
 
14
- #if GOOGLE_DAI
14
+ #if GOOGLE_DAI || canImport(THEOplayerGoogleIMAIntegration)
15
15
  @objc(daiSnapback:resolver:rejecter:)
16
16
  func daiSnapback(_ node: NSNumber, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) -> Void {
17
17
  DispatchQueue.main.async {
@@ -77,7 +77,7 @@ extension THEOplayerRCTSourceDescriptionBuilder {
77
77
  }
78
78
 
79
79
  static func buildDAITypedSource(_ typedSourceData: [String:Any], contentProtection: MultiplatformDRMConfiguration?) -> TypedSource? {
80
- #if GOOGLE_DAI
80
+ #if GOOGLE_DAI || canImport(THEOplayerGoogleIMAIntegration)
81
81
  // check for alternative Google DAI SSAI
82
82
  if let ssaiData = typedSourceData[SD_PROP_SSAI] as? [String:Any] {
83
83
  if let integration = ssaiData[SD_PROP_INTEGRATION] as? String,
@@ -72,7 +72,7 @@ extension THEOplayerRCTView {
72
72
 
73
73
  func parseAdsConfig(configDict: NSDictionary) {}
74
74
 
75
- #if GOOGLE_IMA || canImport(THEOplayerGoogleIMAIntegration)
75
+ #if (GOOGLE_IMA || GOOGLE_DAI) || canImport(THEOplayerGoogleIMAIntegration)
76
76
  func playerAdsConfiguration() -> AdsConfiguration? { return AdsConfiguration() }
77
77
  #else
78
78
  func playerAdsConfiguration() -> AdsConfiguration? { return nil }
@@ -79,13 +79,13 @@ class THEOplayerRCTNowPlayingManager {
79
79
  }
80
80
 
81
81
  private func getArtWorkUrlStringFromSourceDescription(_ sourceDescription: SourceDescription) -> String? {
82
- if let posterUrlString = sourceDescription.poster?.absoluteString {
83
- return posterUrlString
84
- }
85
82
  if let metadata = sourceDescription.metadata,
86
83
  let displayIconUrlString = metadata.metadataKeys?["displayIconUri"] as? String {
87
84
  return displayIconUrlString
88
85
  }
86
+ if let posterUrlString = sourceDescription.poster?.absoluteString {
87
+ return posterUrlString
88
+ }
89
89
 
90
90
  return nil
91
91
  }
@@ -72,100 +72,113 @@ class THEOplayerRCTRemoteCommandsManager: NSObject {
72
72
 
73
73
  func updateRemoteCommands() {
74
74
  let commandCenter = MPRemoteCommandCenter.shared()
75
+
76
+ // update the enabled state to have correct visual representation in the lockscreen
75
77
  commandCenter.playCommand.isEnabled = !self.inAd && self.backgroundaudioConfig.enabled
76
78
  commandCenter.pauseCommand.isEnabled = !self.inAd && self.backgroundaudioConfig.enabled
77
79
  commandCenter.togglePlayPauseCommand.isEnabled = !self.inAd && self.backgroundaudioConfig.enabled
78
80
  commandCenter.stopCommand.isEnabled = !self.inAd && self.backgroundaudioConfig.enabled
79
- commandCenter.changePlaybackPositionCommand.isEnabled = !isLive && !self.inAd && self.backgroundaudioConfig.enabled
80
- commandCenter.skipForwardCommand.isEnabled = !isLive && !self.inAd && self.backgroundaudioConfig.enabled
81
- commandCenter.skipBackwardCommand.isEnabled = !isLive && !self.inAd && self.backgroundaudioConfig.enabled
81
+ commandCenter.changePlaybackPositionCommand.isEnabled = !self.isLive && !self.inAd && self.backgroundaudioConfig.enabled
82
+ commandCenter.skipForwardCommand.isEnabled = !self.isLive && !self.inAd && self.backgroundaudioConfig.enabled
83
+ commandCenter.skipBackwardCommand.isEnabled = !self.isLive && !self.inAd && self.backgroundaudioConfig.enabled
84
+
82
85
  if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Remote commands updated for \(self.isLive ? "LIVE" : "VOD") (\(self.inAd ? "AD IS PLAYING" : "NO AD PLAYING"), \(self.backgroundaudioConfig.enabled ? "BGAUDIO ENABLED" : "BGAUDIO DISABLED") ).") }
83
86
  }
84
87
 
85
88
  @objc private func onPlayCommand(_ event: MPRemoteCommandEvent) -> MPRemoteCommandHandlerStatus {
86
89
  if let player = self.player,
90
+ !self.inAd,
87
91
  player.paused {
88
92
  player.play()
89
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Play command triggered.") }
90
- return .success
93
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Play command handled.") }
94
+ } else {
95
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Play command not handled.") }
91
96
  }
92
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Play command Failed.") }
93
- return .commandFailed
97
+ return .success
94
98
  }
95
99
 
96
100
  @objc private func onPauseCommand(_ event: MPRemoteCommandEvent) -> MPRemoteCommandHandlerStatus {
97
101
  if let player = self.player,
102
+ !self.inAd,
98
103
  !player.paused {
99
104
  player.pause()
100
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Pause command triggered.") }
101
- return .success
105
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Pause command handled.") }
106
+ } else {
107
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Pause command not handled.") }
102
108
  }
103
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Pause command Failed.") }
104
- return .commandFailed
109
+ return .success
105
110
  }
106
111
 
107
112
  @objc private func onTogglePlayPauseCommand(_ event: MPRemoteCommandEvent) -> MPRemoteCommandHandlerStatus {
108
- if let player = self.player {
113
+ if let player = self.player,
114
+ !self.inAd {
109
115
  if player.paused {
110
116
  player.play()
111
117
  } else {
112
118
  player.pause()
113
119
  }
114
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Toggle play/pause command triggered.") }
115
- return .success
120
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Toggle play/pause command handled.") }
121
+ } else {
122
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Toggle play/pause command not handled.") }
116
123
  }
117
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Toggle play/pause command Failed.") }
118
- return .commandFailed
124
+ return .success
119
125
  }
120
126
 
121
127
  @objc private func onStopCommand(_ event: MPRemoteCommandEvent) -> MPRemoteCommandHandlerStatus {
122
- if let player = self.player {
128
+ if let player = self.player,
129
+ !self.inAd {
123
130
  if !player.paused {
124
131
  player.pause()
125
132
  }
126
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Stop command triggered.") }
127
- return .success
133
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Stop command handled.") }
134
+ } else {
135
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Stop command not handled.") }
128
136
  }
129
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Stop command Failed.") }
130
- return .commandFailed
137
+ return .success
131
138
  }
132
139
 
133
140
  @objc private func onScrubCommand(_ event: MPChangePlaybackPositionCommandEvent) -> MPRemoteCommandHandlerStatus {
134
- if let player = self.player {
141
+ if let player = self.player,
142
+ !self.isLive,
143
+ !self.inAd {
135
144
  player.setCurrentTime(event.positionTime)
136
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Scrub command triggered.") }
137
- return .success
145
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Scrub command handled.") }
146
+ } else {
147
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Scrub command not handled.") }
138
148
  }
139
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Scrub command Failed.") }
140
- return .commandFailed
149
+ return .success
141
150
  }
142
151
 
143
152
  @objc private func onSkipForwardCommand(_ event: MPSkipIntervalCommandEvent) -> MPRemoteCommandHandlerStatus {
144
- if let player = self.player {
153
+ if let player = self.player,
154
+ !self.isLive,
155
+ !self.inAd {
145
156
  player.requestCurrentTime(completionHandler: { time, error in
146
157
  if let currentTime = time {
147
158
  player.setCurrentTime(currentTime + event.interval)
148
159
  }
149
160
  })
150
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip forward command triggered.") }
151
- return .success
161
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip forward command handled.") }
162
+ } else {
163
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip forward command not handled.") }
152
164
  }
153
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip forward command Failed.") }
154
- return .commandFailed
165
+ return .success
155
166
  }
156
167
 
157
168
  @objc private func onSkipBackwardCommand(_ event: MPSkipIntervalCommandEvent) -> MPRemoteCommandHandlerStatus {
158
- if let player = self.player {
169
+ if let player = self.player ,
170
+ !self.isLive,
171
+ !self.inAd {
159
172
  player.requestCurrentTime(completionHandler: { time, error in
160
173
  if let currentTime = time {
161
174
  player.setCurrentTime(currentTime - event.interval)
162
175
  }
163
176
  })
164
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip backward command triggered.") }
165
- return .success
177
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip backward command handled.") }
178
+ } else {
179
+ if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip backward command not handled.") }
166
180
  }
167
- if DEBUG_REMOTECOMMANDS { PrintUtils.printLog(logText: "[NATIVE] Skip backward command Failed.") }
168
- return .commandFailed
181
+ return .success
169
182
  }
170
183
 
171
184
  private func attachListeners() {
@@ -193,11 +206,13 @@ class THEOplayerRCTRemoteCommandsManager: NSObject {
193
206
  // ADBREAK_BEGIN
194
207
  self.adBreakBeginListener = player.ads.addEventListener(type: AdsEventTypes.AD_BREAK_BEGIN) { [weak self] event in
195
208
  self?.inAd = true
209
+ self?.updateRemoteCommands()
196
210
  }
197
211
 
198
212
  // ADBREAK_END
199
213
  self.adBreakEndListener = player.ads.addEventListener(type: AdsEventTypes.AD_BREAK_END) { [weak self] event in
200
214
  self?.inAd = false
215
+ self?.updateRemoteCommands()
201
216
  }
202
217
 
203
218
  #endif
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["SourceDescription.ts"],"sourcesContent":["/**\n * Represents a media resource.\n *\n * @remarks\n * <br/> - Can be a string value representing the URL of a media resource, a {@link TypedSource}.\n *\n * @public\n */\nimport type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration';\nimport type { DRMConfiguration } from './drm/DRMConfiguration';\nimport type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';\nimport type { AdDescription } from './ads/Ads';\nimport type { MetadataDescription } from './metadata/MetadataDescription';\nimport type { ServerSideAdInsertionConfiguration } from \"./ads/ssai/ServerSideAdInsertionConfiguration\";\n\nexport type Source = TypedSource;\n\n/**\n * A media resource or list of media resources.\n *\n * @remarks\n * <br/> - The order of sources when using a list determines their priority when attempting playback.\n *\n * @public\n */\nexport type Sources = Source | Source[];\n\n/**\n * The cross-origin setting of a source, represented by a value from the following list:\n * <br/> - `'anonymous'`: CORS requests will have the credentials flag set to 'same-origin'.\n * <br/> - `'use-credentials'`: CORS requests will have the credentials flag set to 'include'.\n * <br/> - `''`: Setting the empty string is the same as `'anonymous'`\n *\n * @remarks\n * <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes | The crossorigin attribute: Requesting CORS access to content}\n *\n * @public\n */\nexport type CrossOriginSetting = '' | 'anonymous' | 'use-credentials';\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceConfiguration {\n /**\n * List of {@link AdDescription}s to be queued for playback.\n */\n ads?: AdDescription[];\n\n /**\n * Content protection configuration.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The poster of the media source.\n *\n * @remarks\n * <br/> - An empty string (`''`) clears the current poster.\n * <br/> - This poster has priority over {@link ChromelessPlayer.poster}.\n */\n poster?: string;\n\n /**\n * List of text tracks to be side-loaded with the media source.\n *\n * @remarks\n * <br/> - A source change will reset side-loaded text tracks.\n */\n textTracks?: TextTrackDescription[];\n\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.\n */\n timeServer?: string;\n\n /**\n * Describes the metadata of a source.\n *\n * @public\n */\n metadata?: MetadataDescription;\n}\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceDescription extends SourceConfiguration {\n /**\n * One or more media resources for playback.\n *\n * @remarks\n * <br/> - Multiple media sources should be used to increase platform compatibility. See examples below for important use cases.\n * <br/> - The player will try each source in the provided order.\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://www.widevine.com/ | Widevine} or {@link https://www.microsoft.com/playready/ | PlayReady} CDM, for example on Safari.\n * In that case, the player will try to play the HLS source instead.\n *\n * ```\n * [{\n * src: 'dash-source-with-drm.mpd'\n * contentProtection: {\n * widevine: {\n * licenseAcquisitionURL: 'https://license.company.com/wv'\n * },\n * playready: {\n * licenseAcquisitionURL: 'https://license.company.com/pr'\n * }\n * }\n * },{\n * src: 'hls-source-with-drm.m3u8',\n * contentProtection: {\n * fairplay: {\n * certificateURL: 'https://license.company.com/fp'\n * }\n * }\n * }]\n * ```\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API | Media Source Extensions API}.\n * In that case, the player will try to play the MP4 source instead, though without features such as adaptive bitrate switching.\n *\n * ```\n * [{\n * src: 'source.mpd'\n * },{\n * src: 'source.mp4'\n * }]\n * ```\n */\n sources?: Sources;\n}\n\n/**\n * Describes the configuration of a side-loaded text track.\n *\n * @public\n */\nexport interface TextTrackDescription {\n /**\n * Whether the text track should be enabled by default.\n *\n * @remarks\n * <br/> - Only one text track per {@link TextTrack.kind} may be marked as default.\n *\n * @defaultValue `false`\n */\n default?: boolean;\n\n /**\n * The kind of the text track, represented by a value from the following list:\n * <br/> - `'subtitles'`: The track provides subtitles, used to display subtitles in a video.\n * <br/> - `'captions'`: The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).\n * <br/> - `'descriptions'`: The track provides a textual description of the video (suitable for users with a vision impairment).\n * <br/> - `'chapters'`: The track provides chapter titles (suitable for navigating the media resource).\n * <br/> - `'metadata'`: The track provides content used by scripts and is not visible for users.\n *\n * @remarks\n * <br/> - If an unrecognized value is provided, the player will interpret it as `'metadata'`.\n *\n * @defaultValue `'subtitles'`\n */\n kind?: string;\n\n /**\n * The format of the track, represented by a value from the following list:\n * <br/> - `'srt'`\n * <br/> - `'ttml'`\n * <br/> - `'webvtt'`\n * <br/> - `'emsg'`\n * <br/> - `'eventstream'`\n * <br/> - `'id3'`\n * <br/> - `'cea608'`\n * <br/> - `'daterange'`\n *\n * @defaultValue `''`\n */\n format?: string;\n\n /**\n * The source URL of the text track.\n */\n src: string;\n\n /**\n * The language of the text track.\n */\n srclang?: string;\n\n /**\n * A label for the text track.\n *\n * @remarks\n * <br/> - This will be used as an identifier on the player API and in the UI.\n */\n label?: string;\n\n /**\n * The identifier of this text track.\n *\n * @internal\n */\n // Note: This works for HLS, but not for DASH.\n id?: string;\n}\n\n/**\n * Represents the common properties of a media resource.\n *\n * @public\n */\nexport interface BaseSource {\n\n /**\n * The cross-origin setting of the source.\n *\n * @defaultValue `''`\n */\n crossOrigin?: CrossOriginSetting;\n\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - Available since v2.47.0.\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - Only this source will use the time server. Alternatively, for all source use {@link SourceConfiguration.timeServer}.\n */\n timeServer?: string;\n\n /**\n * Whether the source should be played in the low-latency-mode of the player.\n *\n * @defaultValue `false`\n *\n * @remarks\n * <br/> - This setting must be `true` when using Low-Latency CMAF with ABR.\n * <br/> - Available since v2.62.0.\n */\n lowLatency?: boolean;\n\n /**\n * The configuration for controlling playback of an MPEG-DASH stream.\n *\n * @remarks\n * <br/> - Available since v2.79.0.\n * <br/> - Ignored for non-DASH streams.\n */\n dash?: DashPlaybackConfiguration;\n\n /**\n * The configuration for controlling playback of an HLS stream.\n *\n * @remarks\n * <br/> - Available since v2.82.0.\n * <br/> - Ignored for non-HLS streams.\n */\n hls?: HlsPlaybackConfiguration;\n}\n\n/**\n * Represents a media resource characterized by a URL to the resource and optionally information about the resource.\n *\n * @public\n */\nexport interface TypedSource extends BaseSource {\n /**\n * The source URL of the media resource.\n *\n * @remarks\n * <br/> - Required if the `ssai` property is absent.\n * <br/> - Available since v2.4.0.\n */\n src?: string;\n\n /**\n * The content type (MIME type) of the media resource, represented by a value from the following list:\n * <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.\n * <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.\n * <br/> - `'video/mp4'`, `'video/webm'` and other formats: The media resource should use native HTML5 playback if supported by the browser.\n * <br/> - `'application/vnd.theo.hesp+json'`: The media resource is an HESP stream.\n *\n * @remarks\n * <br/> - Available since v2.4.0.\n */\n type?: string;\n\n /**\n * The content protection parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.15.0.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The Server-side Ad Insertion parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.12.0.\n */\n ssai?: ServerSideAdInsertionConfiguration;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["SourceDescription.ts"],"sourcesContent":["/**\n * Represents a media resource.\n *\n * @remarks\n * <br/> - Can be a string value representing the URL of a media resource, a {@link TypedSource}.\n *\n * @public\n */\nimport type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration';\nimport type { DRMConfiguration } from './drm/DRMConfiguration';\nimport type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';\nimport type { AdDescription } from './ads/Ads';\nimport type { MetadataDescription } from './metadata/MetadataDescription';\nimport type { ServerSideAdInsertionConfiguration } from \"./ads/ssai/ServerSideAdInsertionConfiguration\";\nimport type { AnalyticsDescription } from \"./analytics/AnalyticsDescription\";\n\nexport type Source = TypedSource;\n\n/**\n * A media resource or list of media resources.\n *\n * @remarks\n * <br/> - The order of sources when using a list determines their priority when attempting playback.\n *\n * @public\n */\nexport type Sources = Source | Source[];\n\n/**\n * The cross-origin setting of a source, represented by a value from the following list:\n * <br/> - `'anonymous'`: CORS requests will have the credentials flag set to 'same-origin'.\n * <br/> - `'use-credentials'`: CORS requests will have the credentials flag set to 'include'.\n * <br/> - `''`: Setting the empty string is the same as `'anonymous'`\n *\n * @remarks\n * <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes | The crossorigin attribute: Requesting CORS access to content}\n *\n * @public\n */\nexport type CrossOriginSetting = '' | 'anonymous' | 'use-credentials';\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceConfiguration {\n /**\n * List of {@link AdDescription}s to be queued for playback.\n */\n ads?: AdDescription[];\n\n /**\n * Content protection configuration.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The poster of the media source.\n *\n * @remarks\n * <br/> - An empty string (`''`) clears the current poster.\n * <br/> - This poster has priority over {@link ChromelessPlayer.poster}.\n */\n poster?: string;\n\n /**\n * List of text tracks to be side-loaded with the media source.\n *\n * @remarks\n * <br/> - A source change will reset side-loaded text tracks.\n */\n textTracks?: TextTrackDescription[];\n\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.\n */\n timeServer?: string;\n\n /**\n * Describes the metadata of a source.\n *\n * @public\n */\n metadata?: MetadataDescription;\n\n /**\n * List of {@link AnalyticsDescription}s to configure source-related properties for analytics connectors.\n */\n analytics?: AnalyticsDescription[];\n}\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceDescription extends SourceConfiguration {\n /**\n * One or more media resources for playback.\n *\n * @remarks\n * <br/> - Multiple media sources should be used to increase platform compatibility. See examples below for important use cases.\n * <br/> - The player will try each source in the provided order.\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://www.widevine.com/ | Widevine} or {@link https://www.microsoft.com/playready/ | PlayReady} CDM, for example on Safari.\n * In that case, the player will try to play the HLS source instead.\n *\n * ```\n * [{\n * src: 'dash-source-with-drm.mpd'\n * contentProtection: {\n * widevine: {\n * licenseAcquisitionURL: 'https://license.company.com/wv'\n * },\n * playready: {\n * licenseAcquisitionURL: 'https://license.company.com/pr'\n * }\n * }\n * },{\n * src: 'hls-source-with-drm.m3u8',\n * contentProtection: {\n * fairplay: {\n * certificateURL: 'https://license.company.com/fp'\n * }\n * }\n * }]\n * ```\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API | Media Source Extensions API}.\n * In that case, the player will try to play the MP4 source instead, though without features such as adaptive bitrate switching.\n *\n * ```\n * [{\n * src: 'source.mpd'\n * },{\n * src: 'source.mp4'\n * }]\n * ```\n */\n sources?: Sources;\n}\n\n/**\n * Describes the configuration of a side-loaded text track.\n *\n * @public\n */\nexport interface TextTrackDescription {\n /**\n * Whether the text track should be enabled by default.\n *\n * @remarks\n * <br/> - Only one text track per {@link TextTrack.kind} may be marked as default.\n *\n * @defaultValue `false`\n */\n default?: boolean;\n\n /**\n * The kind of the text track, represented by a value from the following list:\n * <br/> - `'subtitles'`: The track provides subtitles, used to display subtitles in a video.\n * <br/> - `'captions'`: The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).\n * <br/> - `'descriptions'`: The track provides a textual description of the video (suitable for users with a vision impairment).\n * <br/> - `'chapters'`: The track provides chapter titles (suitable for navigating the media resource).\n * <br/> - `'metadata'`: The track provides content used by scripts and is not visible for users.\n *\n * @remarks\n * <br/> - If an unrecognized value is provided, the player will interpret it as `'metadata'`.\n *\n * @defaultValue `'subtitles'`\n */\n kind?: string;\n\n /**\n * The format of the track, represented by a value from the following list:\n * <br/> - `'srt'`\n * <br/> - `'ttml'`\n * <br/> - `'webvtt'`\n * <br/> - `'emsg'`\n * <br/> - `'eventstream'`\n * <br/> - `'id3'`\n * <br/> - `'cea608'`\n * <br/> - `'daterange'`\n *\n * @defaultValue `''`\n */\n format?: string;\n\n /**\n * The source URL of the text track.\n */\n src: string;\n\n /**\n * The language of the text track.\n */\n srclang?: string;\n\n /**\n * A label for the text track.\n *\n * @remarks\n * <br/> - This will be used as an identifier on the player API and in the UI.\n */\n label?: string;\n\n /**\n * The identifier of this text track.\n *\n * @internal\n */\n // Note: This works for HLS, but not for DASH.\n id?: string;\n}\n\n/**\n * Represents the common properties of a media resource.\n *\n * @public\n */\nexport interface BaseSource {\n\n /**\n * The cross-origin setting of the source.\n *\n * @defaultValue `''`\n */\n crossOrigin?: CrossOriginSetting;\n\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - Available since v2.47.0.\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - Only this source will use the time server. Alternatively, for all source use {@link SourceConfiguration.timeServer}.\n */\n timeServer?: string;\n\n /**\n * Whether the source should be played in the low-latency-mode of the player.\n *\n * @defaultValue `false`\n *\n * @remarks\n * <br/> - This setting must be `true` when using Low-Latency CMAF with ABR.\n * <br/> - Available since v2.62.0.\n */\n lowLatency?: boolean;\n\n /**\n * The configuration for controlling playback of an MPEG-DASH stream.\n *\n * @remarks\n * <br/> - Available since v2.79.0.\n * <br/> - Ignored for non-DASH streams.\n */\n dash?: DashPlaybackConfiguration;\n\n /**\n * The configuration for controlling playback of an HLS stream.\n *\n * @remarks\n * <br/> - Available since v2.82.0.\n * <br/> - Ignored for non-HLS streams.\n */\n hls?: HlsPlaybackConfiguration;\n}\n\n/**\n * Represents a media resource characterized by a URL to the resource and optionally information about the resource.\n *\n * @public\n */\nexport interface TypedSource extends BaseSource {\n /**\n * The source URL of the media resource.\n *\n * @remarks\n * <br/> - Required if the `ssai` property is absent.\n * <br/> - Available since v2.4.0.\n */\n src?: string;\n\n /**\n * The content type (MIME type) of the media resource, represented by a value from the following list:\n * <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.\n * <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.\n * <br/> - `'video/mp4'`, `'video/webm'` and other formats: The media resource should use native HTML5 playback if supported by the browser.\n * <br/> - `'application/vnd.theo.hesp+json'`: The media resource is an HESP stream.\n *\n * @remarks\n * <br/> - Available since v2.4.0.\n */\n type?: string;\n\n /**\n * The content protection parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.15.0.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The Server-side Ad Insertion parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.12.0.\n */\n ssai?: ServerSideAdInsertionConfiguration;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=AnalyticsDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["AnalyticsDescription.ts"],"sourcesContent":["/**\n * Describes the configuration of an analytics integration as part of the SourceDescription.\n *\n * @public\n */\nexport interface AnalyticsDescription {\n /**\n * The identifier of the analytics integration.\n */\n integration: string;\n\n /**\n * Analytics extensions can define any custom set of fields.\n */\n [key: string]: unknown;\n}\n"],"mappings":""}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _AnalyticsDescription = require("./AnalyticsDescription");
7
+ Object.keys(_AnalyticsDescription).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _AnalyticsDescription[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _AnalyticsDescription[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=barrel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_AnalyticsDescription","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["barrel.ts"],"sourcesContent":["export * from './AnalyticsDescription';\n"],"mappings":";;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,qBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,qBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,qBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
@@ -14,7 +14,7 @@ Object.keys(_barrel).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
- var _barrel2 = require("./drm/barrel");
17
+ var _barrel2 = require("./analytics/barrel");
18
18
  Object.keys(_barrel2).forEach(function (key) {
19
19
  if (key === "default" || key === "__esModule") return;
20
20
  if (key in exports && exports[key] === _barrel2[key]) return;
@@ -25,7 +25,7 @@ Object.keys(_barrel2).forEach(function (key) {
25
25
  }
26
26
  });
27
27
  });
28
- var _barrel3 = require("./dash/barrel");
28
+ var _barrel3 = require("./drm/barrel");
29
29
  Object.keys(_barrel3).forEach(function (key) {
30
30
  if (key === "default" || key === "__esModule") return;
31
31
  if (key in exports && exports[key] === _barrel3[key]) return;
@@ -36,7 +36,7 @@ Object.keys(_barrel3).forEach(function (key) {
36
36
  }
37
37
  });
38
38
  });
39
- var _barrel4 = require("./hls/barrel");
39
+ var _barrel4 = require("./dash/barrel");
40
40
  Object.keys(_barrel4).forEach(function (key) {
41
41
  if (key === "default" || key === "__esModule") return;
42
42
  if (key in exports && exports[key] === _barrel4[key]) return;
@@ -47,7 +47,7 @@ Object.keys(_barrel4).forEach(function (key) {
47
47
  }
48
48
  });
49
49
  });
50
- var _barrel5 = require("./metadata/barrel");
50
+ var _barrel5 = require("./hls/barrel");
51
51
  Object.keys(_barrel5).forEach(function (key) {
52
52
  if (key === "default" || key === "__esModule") return;
53
53
  if (key in exports && exports[key] === _barrel5[key]) return;
@@ -58,6 +58,17 @@ Object.keys(_barrel5).forEach(function (key) {
58
58
  }
59
59
  });
60
60
  });
61
+ var _barrel6 = require("./metadata/barrel");
62
+ Object.keys(_barrel6).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _barrel6[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _barrel6[key];
69
+ }
70
+ });
71
+ });
61
72
  var _SourceDescription = require("./SourceDescription");
62
73
  Object.keys(_SourceDescription).forEach(function (key) {
63
74
  if (key === "default" || key === "__esModule") return;
@@ -1 +1 @@
1
- {"version":3,"names":["_barrel","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_barrel2","_barrel3","_barrel4","_barrel5","_SourceDescription"],"sources":["barrel.ts"],"sourcesContent":["export * from './ads/barrel';\nexport * from './drm/barrel';\nexport * from './dash/barrel';\nexport * from './hls/barrel';\nexport * from './metadata/barrel';\nexport * from './SourceDescription';\n"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,QAAA,GAAA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AAA,CAAAD,GAAA,MAAAQ,QAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,QAAA,CAAAR,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,kBAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,kBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,kBAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,kBAAA,CAAAT,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_barrel","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_barrel2","_barrel3","_barrel4","_barrel5","_barrel6","_SourceDescription"],"sources":["barrel.ts"],"sourcesContent":["export * from './ads/barrel';\nexport * from './analytics/barrel';\nexport * from './drm/barrel';\nexport * from './dash/barrel';\nexport * from './hls/barrel';\nexport * from './metadata/barrel';\nexport * from './SourceDescription';\n"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,QAAA,GAAAT,OAAA;AAAAC,MAAA,CAAA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QAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,QAAA,CAAAR,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,QAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,QAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,QAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,QAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,kBAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,kBAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,kBAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,kBAAA,CAAAV,GAAA;IAAA;EAAA;AAAA"}
@@ -62,7 +62,7 @@ function hasTextTrackCue(textTrack, cue) {
62
62
  return !!(textTrack.cues && cue && textTrack.cues.find(c => cue.uid === c.uid));
63
63
  }
64
64
  function removeTextTrackCue(textTrack, cue) {
65
- if (textTrack && textTrack.cues && cue && !hasTextTrackCue(textTrack, cue)) {
65
+ if (textTrack && textTrack.cues && cue && hasTextTrackCue(textTrack, cue)) {
66
66
  textTrack.cues = textTrack.cues.filter(c => c.uid !== cue.uid);
67
67
  }
68
68
  }
@@ -1 +1 @@
1
- {"version":3,"names":["TextTrackType","exports","TextTrackKind","TextTrackMode","filterRenderableTracks","textTracks","filter","textTrack","kind","filterThumbnailTracks","find","isThumbnailTrack","label","hasTextTrackCue","cue","cues","c","uid","removeTextTrackCue","addTextTrackCue","push","findTextTrackByUid","t"],"sources":["TextTrack.ts"],"sourcesContent":["import type { Track } from './Track';\nimport type { TextTrackCue } from './TextTrackCue';\n\nexport enum TextTrackType {\n cea608 = 'cea608',\n id3 = 'id3',\n srt = 'srt',\n ttml = 'ttml',\n webvtt = 'webvtt',\n}\n\nexport enum TextTrackKind {\n captions = 'captions',\n chapters = 'chapters',\n descriptions = 'descriptions',\n metadata = 'metadata',\n subtitles = 'subtitles',\n thumbnails = 'thumbnails',\n}\n\nexport enum TextTrackMode {\n disabled = 'disabled',\n showing = 'showing',\n hidden = 'hidden',\n}\n\nexport interface TextTrack extends Track {\n /**\n * The kind of the text track, represented by a value from the following list:\n * <br/> - `'subtitles'`: The track contains subtitles.\n * <br/> - `'captions'`: The track contains closed captions, a translation of dialogue and sound effects.\n * <br/> - `'descriptions'`: The track contains descriptions, a textual description of the video.\n * <br/> - `'chapters'`: The track contains chapter titles.\n * <br/> - `'metadata'`: The track contains metadata. This track will not serve display purposes.\n */\n readonly kind: TextTrackKind;\n\n /**\n * The label of the text track.\n */\n label: string;\n\n /**\n * The language of the text track.\n */\n readonly language: string;\n\n /**\n * The identifier of the text track.\n *\n * @remarks\n * <br/> - This identifier can be used to distinguish between related tracks, e.g. tracks in the same list.\n */\n readonly id: string;\n\n /**\n * A unique identifier of the text track.\n *\n * @remarks\n * <br/> - This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.\n */\n readonly uid: number;\n\n /**\n * The mode of the text track, represented by a value from the following list:\n * <br/> - `'disabled'`: The track is disabled.\n * <br/> - `'showing'`: The track is showing.\n */\n mode: TextTrackMode;\n\n /**\n * The content type of the text track.\n */\n readonly type: TextTrackType;\n\n /**\n * The list of cues of the track.\n *\n * @remarks\n * <br/> - If the {@link TextTrack.mode} is `'disabled'`, this property is `null`.\n */\n cues: TextTrackCue[] | null;\n\n /**\n * The source of the text track.\n */\n readonly src: string;\n\n /**\n * Indicates whether the track contains Forced Narrative cues.\n * This may only be true for subtitle tracks where\n * <br/> - For DASH: the corresponding AdaptationSet contains a child Role with its value attribute equal to `'forced_subtitle'`\n * <br/> - For HLS: the corresponding #EXT-X-MEDIA tag contains the attributes TYPE=SUBTITLES and FORCED=YES (not supported yet)\n */\n readonly forced: boolean;\n}\n\n/**\n * Retain renderable tracks.\n * https://html.spec.whatwg.org/multipage/embedded-content.html#text-track-showing\n */\nexport function filterRenderableTracks(textTracks: TextTrack[] | undefined): TextTrack[] | undefined {\n return textTracks && textTracks.filter((textTrack) => textTrack.kind === 'subtitles' || textTrack.kind === 'captions');\n}\n\n/**\n * Retain first thumbnail track encountered in the textTracks list.\n */\nexport function filterThumbnailTracks(textTracks: TextTrack[] | undefined): TextTrack | undefined {\n return textTracks && textTracks.find(isThumbnailTrack);\n}\n\n/**\n * Query whether a track is a valid thumbnail track.\n */\nexport function isThumbnailTrack(textTrack: TextTrack | undefined): boolean {\n return !!textTrack && (textTrack.kind === 'thumbnails' || (textTrack.kind === 'metadata' && textTrack.label === 'thumbnails'));\n}\n\nexport function hasTextTrackCue(textTrack: TextTrack, cue: TextTrackCue): boolean {\n return !!(textTrack.cues && cue && textTrack.cues.find((c) => cue.uid === c.uid));\n}\n\nexport function removeTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {\n if (textTrack && textTrack.cues && cue && !hasTextTrackCue(textTrack, cue)) {\n textTrack.cues = textTrack.cues.filter((c) => c.uid !== cue.uid);\n }\n}\n\nexport function addTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {\n if (textTrack && textTrack.cues && cue && !hasTextTrackCue(textTrack, cue)) {\n textTrack.cues.push(cue);\n }\n}\n\nexport function findTextTrackByUid(textTracks: TextTrack[], uid: number): TextTrack | undefined {\n return textTracks.find((t) => t.uid === uid);\n}\n"],"mappings":";;;;;;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AACQ,IAAI,IAAID,GAAG,IAAIP,SAAS,CAACQ,IAAI,CAACL,IAAI,CAAEM,CAAC,IAAKF,GAAG,CAACG,GAAG,KAAKD,CAAC,CAACC,GAAG,CAAC,CAAC;AACnF;AAEO,SAASC,kBAAkBA,CAACX,SAAqB,EAAEO,GAAkB,EAAE;EAC5E,IAAIP,SAAS,IAAIA,SAAS,CAACQ,IAAI,IAAID,GAAG,IAAI,CAACD,eAAe,CAACN,SAAS,EAAEO,GAAG,CAAC,EAAE;IAC1EP,SAAS,CAACQ,IAAI,GAAGR,SAAS,CAACQ,IAAI,CAACT,MAAM,CAAEU,CAAC,IAAKA,CAAC,CAACC,GAAG,KAAKH,GAAG,CAACG,GAAG,CAAC;EAClE;AACF;AAEO,SAASE,eAAeA,CAACZ,SAAqB,EAAEO,GAAkB,EAAE;EACzE,IAAIP,SAAS,IAAIA,SAAS,CAACQ,IAAI,IAAID,GAAG,IAAI,CAACD,eAAe,CAACN,SAAS,EAAEO,GAAG,CAAC,EAAE;IAC1EP,SAAS,CAACQ,IAAI,CAACK,IAAI,CAACN,GAAG,CAAC;EAC1B;AACF;AAEO,SAASO,kBAAkBA,CAAChB,UAAuB,EAAEY,GAAW,EAAyB;EAC9F,OAAOZ,UAAU,CAACK,IAAI,CAAEY,CAAC,IAAKA,CAAC,CAACL,GAAG,KAAKA,GAAG,CAAC;AAC9C"}
1
+ {"version":3,"names":["TextTrackType","exports","TextTrackKind","TextTrackMode","filterRenderableTracks","textTracks","filter","textTrack","kind","filterThumbnailTracks","find","isThumbnailTrack","label","hasTextTrackCue","cue","cues","c","uid","removeTextTrackCue","addTextTrackCue","push","findTextTrackByUid","t"],"sources":["TextTrack.ts"],"sourcesContent":["import type { Track } from './Track';\nimport type { TextTrackCue } from './TextTrackCue';\n\nexport enum TextTrackType {\n cea608 = 'cea608',\n id3 = 'id3',\n srt = 'srt',\n ttml = 'ttml',\n webvtt = 'webvtt',\n}\n\nexport enum TextTrackKind {\n captions = 'captions',\n chapters = 'chapters',\n descriptions = 'descriptions',\n metadata = 'metadata',\n subtitles = 'subtitles',\n thumbnails = 'thumbnails',\n}\n\nexport enum TextTrackMode {\n disabled = 'disabled',\n showing = 'showing',\n hidden = 'hidden',\n}\n\nexport interface TextTrack extends Track {\n /**\n * The kind of the text track, represented by a value from the following list:\n * <br/> - `'subtitles'`: The track contains subtitles.\n * <br/> - `'captions'`: The track contains closed captions, a translation of dialogue and sound effects.\n * <br/> - `'descriptions'`: The track contains descriptions, a textual description of the video.\n * <br/> - `'chapters'`: The track contains chapter titles.\n * <br/> - `'metadata'`: The track contains metadata. This track will not serve display purposes.\n */\n readonly kind: TextTrackKind;\n\n /**\n * The label of the text track.\n */\n readonly label: string;\n\n /**\n * The language of the text track.\n */\n readonly language: string;\n\n /**\n * The identifier of the text track.\n *\n * @remarks\n * <br/> - This identifier can be used to distinguish between related tracks, e.g. tracks in the same list.\n */\n readonly id: string;\n\n /**\n * A unique identifier of the text track.\n *\n * @remarks\n * <br/> - This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.\n */\n readonly uid: number;\n\n /**\n * The mode of the text track, represented by a value from the following list:\n * <br/> - `'disabled'`: The track is disabled.\n * <br/> - `'showing'`: The track is showing.\n */\n mode: TextTrackMode;\n\n /**\n * The content type of the text track.\n */\n readonly type: TextTrackType;\n\n /**\n * The list of cues of the track.\n *\n * @remarks\n * <br/> - If the {@link TextTrack.mode} is `'disabled'`, this property is `null`.\n */\n cues: TextTrackCue[] | null;\n\n /**\n * The source of the text track.\n */\n readonly src: string;\n\n /**\n * Indicates whether the track contains Forced Narrative cues.\n * This may only be true for subtitle tracks where\n * <br/> - For DASH: the corresponding AdaptationSet contains a child Role with its value attribute equal to `'forced_subtitle'`\n * <br/> - For HLS: the corresponding #EXT-X-MEDIA tag contains the attributes TYPE=SUBTITLES and FORCED=YES (not supported yet)\n */\n readonly forced: boolean;\n}\n\n/**\n * Retain renderable tracks.\n * https://html.spec.whatwg.org/multipage/embedded-content.html#text-track-showing\n */\nexport function filterRenderableTracks(textTracks: TextTrack[] | undefined): TextTrack[] | undefined {\n return textTracks && textTracks.filter((textTrack) => textTrack.kind === 'subtitles' || textTrack.kind === 'captions');\n}\n\n/**\n * Retain first thumbnail track encountered in the textTracks list.\n */\nexport function filterThumbnailTracks(textTracks: TextTrack[] | undefined): TextTrack | undefined {\n return textTracks && textTracks.find(isThumbnailTrack);\n}\n\n/**\n * Query whether a track is a valid thumbnail track.\n */\nexport function isThumbnailTrack(textTrack: TextTrack | undefined): boolean {\n return !!textTrack && (textTrack.kind === 'thumbnails' || (textTrack.kind === 'metadata' && textTrack.label === 'thumbnails'));\n}\n\nexport function hasTextTrackCue(textTrack: TextTrack, cue: TextTrackCue): boolean {\n return !!(textTrack.cues && cue && textTrack.cues.find((c) => cue.uid === c.uid));\n}\n\nexport function removeTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {\n if (textTrack && textTrack.cues && cue && hasTextTrackCue(textTrack, cue)) {\n textTrack.cues = textTrack.cues.filter((c) => c.uid !== cue.uid);\n }\n}\n\nexport function addTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {\n if (textTrack && textTrack.cues && cue && !hasTextTrackCue(textTrack, cue)) {\n textTrack.cues.push(cue);\n }\n}\n\nexport function findTextTrackByUid(textTracks: TextTrack[], uid: number): TextTrack | undefined {\n return textTracks.find((t) => t.uid === uid);\n}\n"],"mappings":";;;;;;;;;;;;;IAGYA,aAAa;AAAAC,OAAA,CAAAD,aAAA,GAAAA,aAAA;AAAA,WAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAAC,OAAA,CAAAD,aAAA,GAAbA,aAAa;AAAA,IAQbE,aAAa;AAAAD,OAAA,CAAAC,aAAA,GAAAA,aAAA;AAAA,WAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa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AACQ,IAAI,CAACT,MAAM,CAAEU,CAAC,IAAKA,CAAC,CAACC,GAAG,KAAKH,GAAG,CAACG,GAAG,CAAC;EAClE;AACF;AAEO,SAASE,eAAeA,CAACZ,SAAqB,EAAEO,GAAkB,EAAE;EACzE,IAAIP,SAAS,IAAIA,SAAS,CAACQ,IAAI,IAAID,GAAG,IAAI,CAACD,eAAe,CAACN,SAAS,EAAEO,GAAG,CAAC,EAAE;IAC1EP,SAAS,CAACQ,IAAI,CAACK,IAAI,CAACN,GAAG,CAAC;EAC1B;AACF;AAEO,SAASO,kBAAkBA,CAAChB,UAAuB,EAAEY,GAAW,EAAyB;EAC9F,OAAOZ,UAAU,CAACK,IAAI,CAAEY,CAAC,IAAKA,CAAC,CAACL,GAAG,KAAKA,GAAG,CAAC;AAC9C"}
@@ -1,2 +1,31 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.EdgeStyle = void 0;
7
+ /**
8
+ * The text track style API.
9
+ *
10
+ * @public
11
+ */
12
+ /**
13
+ * The style of the edge, represented by a value from the following list:
14
+ * <br/> - `'none'`
15
+ * <br/> - `'dropshadow'`
16
+ * <br/> - `'raised'`
17
+ * <br/> - `'depressed'`
18
+ * <br/> - `'uniform'`
19
+ *
20
+ * @public
21
+ */
22
+ let EdgeStyle;
23
+ exports.EdgeStyle = EdgeStyle;
24
+ (function (EdgeStyle) {
25
+ EdgeStyle["none"] = "none";
26
+ EdgeStyle["dropshadow"] = "dropshadow";
27
+ EdgeStyle["raised"] = "raised";
28
+ EdgeStyle["depressed"] = "depressed";
29
+ EdgeStyle["uniform"] = "uniform";
30
+ })(EdgeStyle || (exports.EdgeStyle = EdgeStyle = {}));
2
31
  //# sourceMappingURL=TextTrackStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["TextTrackStyle.ts"],"sourcesContent":["/**\n * The text track style API.\n *\n * @public\n */\nexport interface TextTrackStyle {\n /**\n * The font family for the text track.\n */\n fontFamily: string | undefined;\n\n /**\n * The font color for the text track.\n *\n * @example\n * <br/> - `red` will set the color of the text to red.\n * <br/> - `#ff0000` will set the color of the text to red.\n * <br/> - `rgba(255,0,0,0.5)` will set the color of the text to red, with 50% opacity.\n */\n fontColor: string | undefined;\n\n /**\n * The font size for the text track.\n *\n * @remarks\n * Can be a percentage value such as '50%', '75%', '100%', '150%' or '200%'.\n */\n fontSize: string | undefined;\n\n /**\n * The background color for the text track.\n *\n * @remarks\n * This targets the area directly behind the text.\n *\n * @example\n * <br/> - `red` will set the background color of the text track to red.\n * <br/> - `#ff0000` will set the background color of the text track to red.\n * <br/> - `rgba(255,0,0,0.5)` will set the background color of the text track to red, with 50% opacity.\n */\n backgroundColor: string | undefined;\n\n /**\n * The window color for the text track.\n *\n * @remarks\n * This targets the area covering the full width of the text track.\n *\n * @example\n * <br/> - `red` will set the background color of the window of the text track to red.\n * <br/> - `#ff0000` will set the background color of the window of the text track to red.\n * <br/> - `rgba(255,0,0,0.5)` will set the background color of the window of the text track to red, with 50% opacity.\n */\n windowColor: string | undefined;\n\n /**\n * The edge style of the text, represented by a value from the following list:\n * <br/> - `'none'`\n * <br/> - `'dropshadow'`\n * <br/> - `'raised'`\n * <br/> - `'depressed'`\n * <br/> - `'uniform`\n */\n edgeStyle: EdgeStyle | undefined;\n}\n\n/**\n * The style of the edge, represented by a value from the following list:\n * <br/> - `'none'`\n * <br/> - `'dropshadow'`\n * <br/> - `'raised'`\n * <br/> - `'depressed'`\n * <br/> - `'uniform'`\n *\n * @public\n */\nexport type EdgeStyle = 'none' | 'dropshadow' | 'raised' | 'depressed' | 'uniform';\n"],"mappings":""}
1
+ {"version":3,"names":["EdgeStyle","exports"],"sources":["TextTrackStyle.ts"],"sourcesContent":["/**\n * The text track style API.\n *\n * @public\n */\nexport interface TextTrackStyle {\n /**\n * The font family for the text track.\n */\n fontFamily: string | undefined;\n\n /**\n * The font color for the text track.\n *\n * @example\n * <br/> - `red` will set the color of the text to red.\n * <br/> - `#ff0000` will set the color of the text to red.\n * <br/> - Available on Web only: `rgba(255,0,0,0.5)` will set the color of the text to red, with 50% opacity.\n */\n fontColor: string | undefined;\n\n /**\n * The font size for the text track.\n *\n * @remarks\n * Can be a percentage value such as '50%', '75%', '100%', '150%' or '200%'.\n */\n fontSize: string | undefined;\n\n /**\n * The background color for the text track.\n *\n * @remarks\n * This targets the area directly behind the text.\n *\n * @example\n * <br/> - `red` will set the background color of the text track to red.\n * <br/> - `#ff0000` will set the background color of the text track to red.\n * <br/> - Available on Web only: `rgba(255,0,0,0.5)` will set the background color of the text track to red, with 50% opacity.\n */\n backgroundColor: string | undefined;\n\n /**\n * The window color for the text track.\n *\n * @remarks\n * <br/> - This targets the area covering the full width of the text track.\n * <br/> - Available on Web and Android only.\n *\n * @example\n * <br/> - `red` will set the background color of the window of the text track to red.\n * <br/> - `#ff0000` will set the background color of the window of the text track to red.\n * <br/> - Available on Web only: `rgba(255,0,0,0.5)` will set the background color of the window of the text track to red, with 50% opacity.\n */\n windowColor: string | undefined;\n\n /**\n * The edge style of the text, represented by a value from the following list:\n * <br/> - `'none'`\n * <br/> - `'dropshadow'`\n * <br/> - `'raised'`\n * <br/> - `'depressed'`\n * <br/> - `'uniform`\n */\n edgeStyle: EdgeStyle | undefined;\n\n /**\n * The top margin of the area where subtitles are being rendered.\n *\n * @remarks\n * <br/> - The margin is in number of pixels.\n */\n marginTop: number | undefined;\n\n /**\n * The bottom margin of the area where subtitles are being rendered.\n *\n * @remarks\n * <br/> - The margin is in number of pixels.\n * <br/> - Available on Web only.\n */\n marginBottom: number | undefined;\n /**\n * The left margin of the area where subtitles are being rendered.\n *\n * @remarks\n * <br/> - The margin is in number of pixels.\n */\n marginLeft: number | undefined;\n /**\n * The right margin of the area where subtitles are being rendered.\n *\n * @remarks\n * <br/> - The margin is in number of pixels.\n * <br/> - Useful for pushing the subtitles left, so they don't overlap with the UI.\n * <br/> - Available on Web only.\n */\n marginRight: number | undefined;\n}\n\n/**\n * The style of the edge, represented by a value from the following list:\n * <br/> - `'none'`\n * <br/> - `'dropshadow'`\n * <br/> - `'raised'`\n * <br/> - `'depressed'`\n * <br/> - `'uniform'`\n *\n * @public\n */\nexport enum EdgeStyle {\n none = 'none',\n dropshadow = 'dropshadow',\n raised = 'raised',\n depressed = 'depressed',\n uniform = 'uniform',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAgGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA,IAUYA,SAAS;AAAAC,OAAA,CAAAD,SAAA,GAAAA,SAAA;AAAA,WAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;AAAA,GAATA,SAAS,KAAAC,OAAA,CAAAD,SAAA,GAATA,SAAS"}