@tivio/sdk-react 9.2.0-alpha.4 → 9.2.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.
package/README.md CHANGED
@@ -4,320 +4,6 @@
4
4
  above Tivio Studio. You can comfortably manage all you videos, settings such as application's screens and rows and also monetization
5
5
  settings in the administration of Tivio Studio while having the freedom to build your own application.
6
6
 
7
- ## Changelog
8
- * 9.2.0-alpha.4
9
- * patch: expose getUser, resetPassword and signOut methods in RemoteBundleState type
10
- * patch: more precise types for user profile fields and methods
11
- * patch: add missing jsdocs for some User type fields
12
-
13
- * 9.2.0-alpha.0
14
- * minor: add renderWebPlayer method for rendering outside of React
15
- * minor: "expose createTivio"
16
-
17
- * 9.1.7
18
- * patch: update remote controller component API
19
-
20
- * 9.1.6
21
- * minor: add remote controller
22
-
23
- * 9.1.5
24
- * patch: expose purchase loyalty points through types
25
- * patch: enable setUser check
26
-
27
- * 9.1.4
28
- * patch: disable setUser check
29
- * patch: rollback "add renderWebPlayer method for rendering outside of React"
30
- * patch: rollback "expose createTivio"
31
-
32
- * 9.1.3
33
- * patch: add renderWebPlayer method for rendering outside of React
34
- * patch: expose createTivio
35
-
36
- * 9.1.4
37
- * patch: disable setUser check
38
-
39
- * 9.1.3
40
- * minor: add renderWebPlayer method for rendering outside of React
41
- * minor: expose createTivio
42
-
43
- * 9.1.2
44
- * patch: update PurchaseEndpointPayload type (cityName, externalId, geoPoint)
45
-
46
- * 9.1.1
47
- * patch: fix changelog
48
-
49
- * 9.1.0
50
- * patch: add gateway to Purchase type
51
- * minor: add QerkoPaymentWebhookByApiKeyRequest to exported types
52
-
53
- * 9.0.0
54
- * patch: remove i18next and react-i18next from externals and dependencies
55
- * patch: do not send react-spring to core-react-dom bundle, remove react-spring from dependencies
56
- * patch: clean-up externals in webpack config
57
- * patch: send only required dependencies to the bundle
58
- * major: change purchase statuses lifecycle
59
- * minor: add originalPurchaseId to PurchaseEndpointPayload
60
-
61
- * 8.0.0
62
- * major: deprecated usePurchasesWithVideos hook removed
63
- * patch: add id to user type
64
- * patch: add @types/react to peerDependencies
65
-
66
- * 7.1.0
67
- * minor: export useTvChannelHook
68
- * patch: bump "react-i18next", "i18next" versions.
69
-
70
- * 7.0.1
71
- * patch: fix dependency to @tivio/common
72
-
73
- * 7.0.0
74
- * major: delete deprecated useWatchWithoutAdsOffer hook
75
- * major: consolidate duplicated source types
76
- * patch: add new properties to PlayerInterface
77
- * patch: expose getSeekingMatrixPreviewByTime in Video interface
78
- * major: delete deprecated useBetOffer hook
79
- * major: rework of source types
80
- * major: make useChannelSource deprecated
81
-
82
- * 6.0.1
83
- * patch: fix dependency to @tivio/common
84
-
85
- * 6.0.0
86
- * major: delete usePlayerEvent hook
87
- * major: replace uri attributes in types with url
88
- * major: delete uri attributes from types
89
- * minor: add purchase expiration to PurchaseEndpointPayload
90
- * minor: add optional videoId parameter to useOrganizationSubscription hook
91
-
92
- * 5.0.2
93
- * patch: export hook useChannelSource
94
-
95
- * 5.0.1
96
- * patch: move changelog
97
-
98
- * 5.0.0
99
- * major: upgrade to React 18, change react and react-dom peer dependencies to 17.x || 18.x
100
- * major: fix typing for useReferralInfo, now correctly showing that `null` can be returned
101
- * major: fix typing for `WebRowProps.onTileClick`, now correctly showing that `null` can be accepted
102
- * minor: add analytics
103
- * minor: add getSourceUrl function to video and tv channel types
104
- * minor: add uri property to tv channel type
105
- * minor: add useChannelSource to hooks
106
-
107
- * 4.5.0
108
- * minor: extend PurchaseEndpointPayload type with purchase previousStatus and newStatus fields
109
-
110
- * 4.4.1
111
- * patch: added waitForTags param in useSearch hook for videos
112
-
113
- * 4.4.0
114
- * minor: PrimaryButton component props type set to any for now
115
- * patch: isPurchasableAsVoucher added to PurchasableMonetization
116
- * patch: voucherPurchase flag added to purchase overlays
117
- * patch: item added to MonetizationsSelectOverlayData
118
- * minor: added hungarian language to `LangCode` enum
119
-
120
- * 4.3.0:
121
- * minor: add GetPurchaseInfoResponse and PurchaseEndpointPayload to exported types
122
- * minor: support for disabling purchase of specified subscriptions (new param in useOrganizationSubscriptions hook)
123
- * minor: more specific PurchasableMonetization type usage instead of Monetization
124
- * minor: monetization property deleted from Video type
125
- * minor: monetization now has originalPrice and promotion properties available
126
- * patch: remove not used OrganizationSubscriptionsContext, **this change requires bundle 3.20.0 or newer**
127
-
128
- * 4.2.0:
129
- * minor: fix useSearch loading type
130
- * patch: added italian language to `LangCode` enum
131
-
132
- * 4.1.0
133
- * patch: added italian language to `LangCode` enum
134
- * minor: fixed spanish language code in `LangCode` enum (`sp` -> `es`)
135
- * minor: other misc type changes
136
-
137
- * 4.0.1
138
- * patch: added setBundleVersion setter to bundle type
139
- * patch: added setStorageManager setter to bundle type
140
- * patch: `Purchase.isPurchased` is deprecated
141
- * patch: fill `useSearch` field `hasNextPage` with proper value
142
-
143
- * 4.0.0
144
- * minor: Types cleanup
145
- * MAJOR: Remove deprecated and unused stuff
146
- * auth
147
- * changePassword
148
- * changeUserPhoto
149
- * removeUserPhoto
150
- * getPurchasedVodsWithInitializedVideos
151
- * initializeUser
152
- * createFreePurchase
153
- * components
154
- * videoAdBanner
155
- * getters
156
- * getExportedConfig
157
- * getChannelById
158
- * getSectionById
159
- * getWidgetById
160
- * hooks
161
- * useLastVideoByWidgetId
162
- * useScreen
163
- * useFreePurchase
164
- * useWidget
165
- * useChannel
166
- * useSection
167
- * useVideosInSection
168
- * useSectionsInChannel
169
- * useChannelsInWidget
170
- * subscriptions
171
- * subscribeToWidget
172
- * subscribeToChannel
173
- * subscribeToSection
174
- * subscribeToVideosInSection
175
- * subscribeToSectionsInChannel
176
- * subscribeToChannelsInWidget
177
- * subscribeToScreen
178
- ---
179
- _Versions <= v3.7.0 requires core-react-dom bundle < v3.0.0 (because sdk-react used some sdk API deleted in core-react-dom@4.0.0)_
180
-
181
- * 3.7.0
182
- * minor: purchase contains created and updated
183
-
184
- * 3.6.3
185
- * patch: improve README.md
186
-
187
- * 3.6.2
188
- * patch: Fix types
189
-
190
- * 3.6.1
191
- * patch: Fix README
192
-
193
- * 3.6.0
194
- * minor: Update types
195
-
196
- * 3.5.2
197
- * patch: All types are available again.
198
-
199
- * 3.5.1
200
- * patch: remove incorrect dependency (@tivio/types)
201
-
202
- * 3.5.0
203
- * minor: Types change - Video.price and Video.detailedPrice can be null
204
- * minor: Types change - Video.cover is marked as deprecated
205
-
206
- * 3.4.0
207
- * minor: more precise type for errors in usePurchaseRecovery and usePurchaseRecovery
208
- * patch: jsdocs for usePurchaseRecovery and usePurchaseRecovery
209
- * minor: inviteCodeReset in useApplyInviteCode
210
- * minor: Reset forgotten password
211
- * minor: Consolidating monetization logic
212
- * 3.3.2
213
- * patch: Adding new optional parameters (where, orderBy) to useTaggedVideos hook
214
- * 3.3.1
215
- * patch: Fixed types of `setUser`
216
- * 3.3.0
217
- * minor: Add getPlayerCapabilities to getters.
218
- * patch: Added option to log out via `setUser(null)`, requires @tivio/core-react-dom@2.17.9
219
- * 3.2.5
220
- * patch: added recovery flag to QerkoPaymentInfo type
221
- * patch: bundle.types changes - internal.components.WebVideoScreen
222
- * patch: types changes - add new onBack prop to WebPlayerProps
223
- * patch: Refactor useVideo hook, now uses hook from core-react
224
- * 3.2.4
225
- * minor: added useApplyInviteCode
226
- * minor: better errors from useVoucher
227
- * 3.2.3
228
- * minor: added usePurchaseRecovery hook
229
- * patch: deprecated `useLastVideoByWidgetId`
230
- * 3.2.2
231
- * minor: useRowsInScreen, useItemsInRow, useTaggedVideos - hasNextPage and loading added to pagination
232
- * minor: useRowsInScreen, useItemsInRow, useTaggedVideos - implementation moved to remote bundle
233
- * patch: Fixed Tivio startup on Tizen 6
234
- * minor: Added `forceCloudFnResolver` option
235
- * 3.2.1
236
- * patch: fix of @tivio/common version
237
- * 3.2.0
238
- * minor: Added `capabilitiesOptions` for finer configuration of device capabilities
239
- * minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "LangCode"
240
- * 3.1.3
241
- * patch: Hotfix made sure disabled Tivio does not break React Native
242
- * 3.1.2
243
- * patch: Allow `conf` prop of `TivioProvider` to be `null` or `undefined` in order to turn off Tivio
244
- * 3.1.1
245
- * patch: fixed `setUser()` crash when bundle fails to load
246
- * 3.1.0
247
- * patch: `useAdSegment()` now returns null if no monetization is configured, ad segments are not managed in that situation
248
- * minor: enriched `AdSegment` type from `useAdSegment()`
249
- * minor: Added `setUser()` function for login and logout
250
- * 3.0.0
251
- * minor: Added hook `useWatchWithoutAdsOffer` to trigger purchase dialog to "watch without ads", if available
252
- * patch: fix peerDependency declaration for react, react-dom
253
- * major: TivioProvider requires deviceCapabilities
254
- * major: TivioProvider requires currency
255
- * minor: add voucher support (see usePurchaseSubscription and useTransactionPayment hooks)
256
- * minor: device limit support
257
- * minor: drm (Widevine, PlayReady) support
258
- * minor: watermarking support
259
- * minor: add useSearch hook
260
- * patch: price on video is 0 when purchased
261
- * 2.4.2
262
- * patch: added back changelog
263
- * 2.4.1
264
- * patch: improved doc about player wrapper
265
- * 2.4.0
266
- * patch: improved Player wrapper types
267
- * minor: added Tivio DOM events `tivio_key_input_handling_change`, `tivio_context_switch` and `tivio_request_goto`
268
- * patch: added support for remote code on browsers that do not implement [indexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)
269
- * patch: added support for browsers that do not implement [indexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)
270
- * 2.3.4
271
- * patch: fix of usePurchaseSubscription not reactive
272
- * 2.3.3
273
- * patch: fix of useUser not updating
274
- * 2.3.2
275
- * patch: next app doesn't fail anymore due to "self is not defined"
276
- * 2.3.1
277
- * patch: fix of @tivio/common dependency
278
- * 2.3.0
279
- * minor: add useTaggedVideos that allows to fetch videos with given tags
280
- * minor: add option to fetch tags (on hook useItemsInRow), useVideo always fetching videos tags
281
- * 2.2.1
282
- * patch: disable Sentry when no config is supplied to `TivioProvider`
283
- * 2.2.0
284
- * patch: reduced bundle size
285
- * minor: disable Sentry when no config is supplied to `TivioProvider` or when Tivio is disabled `{ enable: false }`, or when Sentry is disabled via config `{ enableSentry: false }`
286
- * 2.1.5
287
- * patch fix of `useVideosInSection` hook (fetching video's monetizations)
288
- * 2.1.4
289
- * patch: fix re-rendering of `useAd` during non-skippable ads (requires core-react-dom@2.1.9)
290
- * 2.1.3
291
- * patch: fix changelog
292
- * 2.1.2
293
- * patch: Fixed exported types
294
- * 2.1.1
295
- * patch: TivioWidget now correctly reports `false` via `onEnabled` callback when in invalid internal state
296
- * 2.1.0
297
- * patch: fix of useItemsInRow hook
298
- * patch: fix of useScreen hook
299
- * add: useRowsInScreen hook
300
- * 2.0.3
301
- * patch: fix of useItemsInRow hook
302
- * 2.0.2
303
- * patch: screen and row IDs fixed
304
- * `TivioBundle.subscriptions.subscribeToItemsInRow` now accepts user-defined ID via studio.tiv.io
305
- * `TivioBundle.subscriptions.subscribeToScreen` now accepts user-defined ID via studio.tiv.io
306
- * `Screen` and `Row` types returned by `useScreen()` return their user-defined IDs (`.id`) correctly
307
- * 2.0.1
308
- * no changes
309
- * 2.0.0
310
- * major: video.channelId can now be `string | null` used to be `string`
311
- * minor: added data API and hooks for screens (screens, rows of screen and row items)
312
- * hooks: `useScreen()`, `useItemsInRow()`
313
- * api: `TivioBundle.subscriptions.subscribeToScreen`, `TivioBundle.subscriptions.subscribeToItemsInRow`
314
- * 1.3.6
315
- * ?
316
- * 1.3.5
317
- * minor: added WebPlayer props (canReplay, showMarkers, customShortcuts, enableKeyboardShortcuts, source.poster)
318
- * 1.3.4
319
- * ...
320
-
321
7
  ## Installation
322
8
 
323
9
  Install @tivio/sdk-react along with its peer dependencies
@@ -508,9 +194,266 @@ function CustomPlayer() {
508
194
  }
509
195
  ```
510
196
 
511
- ## Data hooks
197
+ ## JavaScript Methods for Rendering Players
198
+
199
+ ### renderWebPlayer
200
+
201
+ The `renderWebPlayer` method allows you to render a Tivio player outside of React components. This is useful for scenarios where you need to integrate the player into non-React environments.
202
+
203
+ The method is asynchronous and returns a VideoController instance that provides comprehensive control over playback.
204
+
205
+ ```typescript
206
+ import { renderWebPlayer } from '@tivio/sdk-react'
207
+
208
+ // Example usage
209
+ const videoController = await renderWebPlayer(
210
+ document.getElementById('video-player'),
211
+ {
212
+ id: 'player-main',
213
+ source: 'videos/ID',
214
+ }
215
+ )
216
+
217
+ // Control playback
218
+ videoController.play()
219
+ videoController.pause()
220
+ videoController.togglePause()
221
+
222
+ // Seeking
223
+ videoController.seekToAbsolutePosition(30000) // Seek to 30 seconds
224
+ videoController.seekBy(5000) // Seek forward by 5 seconds
225
+ videoController.seekToPercent(50) // Seek to 50% of video
226
+ videoController.seekToLive() // Seek to live position (for live streams)
227
+
228
+ // Volume control
229
+ videoController.changeVolume(0.8) // Set volume to 80%
230
+ videoController.volumeUp() // Increase volume by 5%
231
+ videoController.volumeDown() // Decrease volume by 5%
232
+ videoController.mute()
233
+ videoController.unmute()
234
+ videoController.toggleMute()
235
+
236
+ // Get current source
237
+ console.log('Current source:', videoController.currentSource)
238
+
239
+ // Change source
240
+ videoController.setSource('videos/newVideoId') // Change to a different video
241
+ videoController.setSource('tvChannels/channelId') // Change to a TV channel
242
+ videoController.setSource(null) // Stop playback
243
+
244
+ // Event handling
245
+ videoController.addEventListener('video_unit_ended', () => {
246
+ console.log('Video playback ended')
247
+ })
248
+
249
+ videoController.addEventListener('timeupdate', (currentTime) => {
250
+ console.log('Current time:', currentTime)
251
+ })
252
+
253
+ // Cleanup
254
+ videoController.destroy()
255
+ ```
256
+
257
+ #### VideoController Methods
258
+
259
+ The VideoController returned by `renderWebPlayer` provides the following methods:
260
+
261
+ **Playback Control:**
262
+ - `play()` - Resume playback from paused state
263
+ - `pause()` - Pause the current playback
264
+ - `togglePause()` - Toggle between play and pause states
265
+ - `replay()` - Replay the current video from the beginning
266
+ - `retry()` - Retry playback if it failed to start
267
+
268
+ **Seeking:**
269
+ - `seekToAbsolutePosition(ms: number)` - Seek to absolute position in milliseconds
270
+ - `seekBy(ms: number)` - Seek relative to current position
271
+ - `seekToPercent(percentage: number)` - Seek to percentage of video duration
272
+ - `seekToLive()` - Seek to live position (for live streams)
273
+
274
+ **Volume Control:**
275
+ - `changeVolume(value: number)` - Set volume (0-1)
276
+ - `volumeUp()` - Increase volume by 5%
277
+ - `volumeDown()` - Decrease volume by 5%
278
+ - `mute()` - Mute audio
279
+ - `unmute()` - Unmute audio
280
+ - `toggleMute()` - Toggle mute state
281
+
282
+ **Source Management:**
283
+ - `setSource(source: WebPlayerProps['source'])` - Change the current source to a new one (updates player props)
284
+ - `currentSource` - Currently playing source or null if no source is loaded
285
+
286
+ #### Source Types
287
+
288
+ The Tivio player supports different types of sources:
289
+
290
+ **VOD_EXTERNAL** - External video-on-demand content from third-party URLs
291
+ - Used for playing videos that are hosted outside of Tivio's infrastructure
292
+ - Supports various streaming protocols (HLS, DASH, MP4)
293
+ - Example usage:
294
+ ```typescript
295
+ const externalSource = {
296
+ type: SourceType.VOD_EXTERNAL,
297
+ url: 'https://example.com/video.m3u8',
298
+ sourcePlayMode: SourcePlayMode.ON_DEMAND,
299
+ poster: 'https://example.com/poster.jpg',
300
+ name: 'External Video',
301
+ autoplay: false,
302
+ continuePositionMs: 10000, // Start at 10 seconds (optional)
303
+ }
304
+ ```
305
+
306
+ #### Source Play Modes
307
+
308
+ The `sourcePlayMode` property determines how the content is played:
309
+
310
+ - **ON_DEMAND** - Standard video playback with full seeking capabilities
311
+ - **LIVE** - Live stream mode with no seeking
312
+ - **HYBRID** - Combines LIVE with seeking
313
+
314
+ #### Using setSource with VideoController
315
+
316
+ The `setSource` method allows you to dynamically change what's playing:
317
+
318
+ ```typescript
319
+ // Change to a different video
320
+ videoController.setSource('videos/newVideoId')
321
+
322
+ // Change to an external video
323
+ videoController.setSource({
324
+ type: SourceType.VOD_EXTERNAL,
325
+ url: 'https://example.com/video.mpd',
326
+ sourcePlayMode: SourcePlayMode.ON_DEMAND,
327
+ name: 'External Video'
328
+ })
329
+
330
+ // Change to a TV channel
331
+ videoController.setSource('tvChannels/channelId')
332
+
333
+ // Stop playback
334
+ videoController.setSource(null)
335
+ ```
512
336
 
513
- ### useUser hook
337
+ The `setSource` method is particularly useful for:
338
+ - Play next
339
+ - Implementing playlists
340
+ - Dynamic content loading
341
+
342
+ **Event Handling:**
343
+ - `addEventListener(event: string, callback: (value: T) => void)` - Add event listener
344
+ - `removeEventListener(event: string, callback: (value: T) => void)` - Remove event listener
345
+
346
+ **Utility:**
347
+ - `destroy()` - Destroy player and clean up resources
348
+
349
+ #### Playback Events
350
+
351
+ The VideoController emits various events that you can listen to:
352
+
353
+ ```typescript
354
+ // Video state changes
355
+ videoController.addEventListener('statechange', (state) => {
356
+ console.log('Player state:', state) // 'playing', 'paused', 'idle'
357
+ })
358
+
359
+ // Time updates
360
+ videoController.addEventListener('timeupdate', (currentTime) => {
361
+ console.log('Current time:', currentTime)
362
+ })
363
+
364
+ // Video ended
365
+ videoController.addEventListener('video_unit_ended', () => {
366
+ console.log('Video playback ended')
367
+ })
368
+
369
+ // Duration changes
370
+ videoController.addEventListener('durationchange', (duration) => {
371
+ console.log('Video duration:', duration)
372
+ })
373
+
374
+ // Volume changes
375
+ videoController.addEventListener('volumechange', ({ muted, volume }: { muted: boolean, volume: number }) => {
376
+ console.log('Volume changed:', { muted, volume })
377
+ })
378
+
379
+ // Buffering state
380
+ videoController.addEventListener('bufferingchange', (isBuffering) => {
381
+ console.log('Buffering:', isBuffering)
382
+ })
383
+
384
+ // Errors
385
+ videoController.addEventListener('error', (error) => {
386
+ console.error('Playback error:', error)
387
+ })
388
+ ```
389
+
390
+ ## WebPlayerProps
391
+
392
+ The `WebPlayerProps` interface defines the properties that can be passed to the Tivio WebPlayer component. Here's a comprehensive overview of available properties:
393
+
394
+ ### Required Properties
395
+
396
+ - **`id`** (string): Unique identifier for the player instance. This is required and must be unique across your application.
397
+
398
+ ### Source Properties
399
+
400
+ - **`source`** (optional): The video or channel source to play. Can be:
401
+ - `VideoPath` (string): Path to a video (e.g., "videos/VIDEO_ID")
402
+ - `ChannelPath` (string): Path to a TV channel (e.g., "tvChannels/CHANNEL_ID")
403
+ - `SourceParams` (object): Complex source parameters
404
+ - `null`: No source (player will be idle)
405
+
406
+ ### Callback Properties
407
+
408
+ - **`onEnded`** (optional): Callback function called when video playback ends
409
+ - **`onProgress`** (optional): Callback function for video progress events
410
+
411
+ ### Layout Properties
412
+
413
+ - **`className`** (optional): CSS class name for the player container
414
+ - **`isSameSizeAsParent`** (optional): If `true`, the player will inherit the width and height of its parent element
415
+
416
+ ### Playback Control Properties
417
+
418
+ - **`autoplay`** (optional, default: `false`): Whether to start playback automatically. Note that autoplay may be blocked by browsers before user interaction
419
+ - **`canReplay`** (optional, default: `true`): Whether to show replay functionality
420
+ - **`doNotSaveWatchPosition`** (optional): If `true`, the player won't save the watch position
421
+ - **`disablePlayNext`** (optional): If `true`, the player won't automatically play the next video when current video ends
422
+
423
+ ### Visual Properties
424
+
425
+ - **`showMarkers`** (optional, default: `false`): Whether to show video markers
426
+ - **`markerColor`** (optional): Color for video markers (CSS color value)
427
+ - **`showTvStreamType`** (optional): Whether to show TV stream type indicator
428
+ - **`showCookiesSettings`** (optional): Whether to show cookies settings
429
+ - **`showOsd`** (optional, default: `true`): Whether to show the On-Screen Display (OSD)
430
+ - **`showBufferingSpinner`** (optional, default: `true`): Whether to show buffering spinner
431
+
432
+ ### Audio Properties
433
+
434
+ - **`isMutedByDefault`** (optional): If `true`, the player starts muted but can be unmuted
435
+
436
+ ### Keyboard Shortcuts Properties
437
+
438
+ - **`enableKeyboardShortcuts`** (optional, default: `true`): Whether to enable keyboard shortcuts
439
+ - **`customShortcuts`** (optional): Custom keyboard shortcuts configuration:
440
+ ```typescript
441
+ {
442
+ toggleFullscreen: number[], // Array of key codes
443
+ togglePause: number[],
444
+ toggleMute: number[],
445
+ jumpForward: number[],
446
+ jumpBack: number[],
447
+ volumeUp: number[],
448
+ volumeDown: number[]
449
+ }
450
+ ```
451
+
452
+ ### Ad Block Properties
453
+
454
+ - **`checkAdBlock`** (optional, default: `false`): Whether to check for ad blockers and show warnings
455
+
456
+ ## Data hooks
514
457
  Gets information about current user.
515
458
 
516
459
  ```ts