stream-chat-react 9.1.2 → 9.1.3
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/dist/browser.full-bundle.js +120 -68
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +2 -2
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +2 -2
- package/dist/components/MessageList/hooks/usePrependMessagesCount.d.ts +1 -1
- package/dist/components/MessageList/hooks/usePrependMessagesCount.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/usePrependMessagesCount.js +3 -2
- package/dist/index.cjs.js +6 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/stories/hello.stories.d.ts +1 -0
- package/dist/stories/hello.stories.d.ts.map +1 -1
- package/dist/stories/hello.stories.js +10 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -627,11 +627,11 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
627
627
|
|
|
628
628
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
629
629
|
|
|
630
|
-
var MATCH_URL_YOUTUBE = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v
|
|
630
|
+
var MATCH_URL_YOUTUBE = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;
|
|
631
631
|
exports.MATCH_URL_YOUTUBE = MATCH_URL_YOUTUBE;
|
|
632
632
|
var MATCH_URL_SOUNDCLOUD = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
633
633
|
exports.MATCH_URL_SOUNDCLOUD = MATCH_URL_SOUNDCLOUD;
|
|
634
|
-
var MATCH_URL_VIMEO = /vimeo\.com
|
|
634
|
+
var MATCH_URL_VIMEO = /vimeo\.com\/(?!progressive_redirect).+/;
|
|
635
635
|
exports.MATCH_URL_VIMEO = MATCH_URL_VIMEO;
|
|
636
636
|
var MATCH_URL_FACEBOOK = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
637
637
|
exports.MATCH_URL_FACEBOOK = MATCH_URL_FACEBOOK;
|
|
@@ -649,13 +649,13 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
649
649
|
exports.MATCH_URL_DAILYMOTION = MATCH_URL_DAILYMOTION;
|
|
650
650
|
var MATCH_URL_MIXCLOUD = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
651
651
|
exports.MATCH_URL_MIXCLOUD = MATCH_URL_MIXCLOUD;
|
|
652
|
-
var MATCH_URL_VIDYARD = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-]+)/;
|
|
652
|
+
var MATCH_URL_VIDYARD = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/;
|
|
653
653
|
exports.MATCH_URL_VIDYARD = MATCH_URL_VIDYARD;
|
|
654
|
-
var MATCH_URL_KALTURA = /^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_]
|
|
654
|
+
var MATCH_URL_KALTURA = /^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/;
|
|
655
655
|
exports.MATCH_URL_KALTURA = MATCH_URL_KALTURA;
|
|
656
|
-
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
656
|
+
var AUDIO_EXTENSIONS = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
657
657
|
exports.AUDIO_EXTENSIONS = AUDIO_EXTENSIONS;
|
|
658
|
-
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
658
|
+
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i;
|
|
659
659
|
exports.VIDEO_EXTENSIONS = VIDEO_EXTENSIONS;
|
|
660
660
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
661
661
|
exports.HLS_EXTENSIONS = HLS_EXTENSIONS;
|
|
@@ -1013,6 +1013,9 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
1013
1013
|
|
|
1014
1014
|
_this2.props.onReady();
|
|
1015
1015
|
},
|
|
1016
|
+
onPlaybackRateChange: function onPlaybackRateChange(event) {
|
|
1017
|
+
return _this2.props.onPlaybackRateChange(event.data);
|
|
1018
|
+
},
|
|
1016
1019
|
onStateChange: _this2.onStateChange,
|
|
1017
1020
|
onError: function onError(event) {
|
|
1018
1021
|
return _onError(event.data);
|
|
@@ -1435,6 +1438,9 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
1435
1438
|
this.duration = null;
|
|
1436
1439
|
(0, utils$2.getSDK)(SDK_URL, SDK_GLOBAL).then(function (Vimeo) {
|
|
1437
1440
|
if (!_this2.container) return;
|
|
1441
|
+
var _this2$props$config = _this2.props.config,
|
|
1442
|
+
playerOptions = _this2$props$config.playerOptions,
|
|
1443
|
+
title = _this2$props$config.title;
|
|
1438
1444
|
_this2.player = new Vimeo.Player(_this2.container, _objectSpread({
|
|
1439
1445
|
url: url,
|
|
1440
1446
|
autoplay: _this2.props.playing,
|
|
@@ -1442,13 +1448,17 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
1442
1448
|
loop: _this2.props.loop,
|
|
1443
1449
|
playsinline: _this2.props.playsinline,
|
|
1444
1450
|
controls: _this2.props.controls
|
|
1445
|
-
},
|
|
1451
|
+
}, playerOptions));
|
|
1446
1452
|
|
|
1447
1453
|
_this2.player.ready().then(function () {
|
|
1448
1454
|
var iframe = _this2.container.querySelector('iframe');
|
|
1449
1455
|
|
|
1450
1456
|
iframe.style.width = '100%';
|
|
1451
1457
|
iframe.style.height = '100%';
|
|
1458
|
+
|
|
1459
|
+
if (title) {
|
|
1460
|
+
iframe.title = title;
|
|
1461
|
+
}
|
|
1452
1462
|
})["catch"](_this2.props.onError);
|
|
1453
1463
|
|
|
1454
1464
|
_this2.player.on('loaded', function () {
|
|
@@ -1985,7 +1995,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
1985
1995
|
frameBorder: "0",
|
|
1986
1996
|
scrolling: "no",
|
|
1987
1997
|
style: style,
|
|
1988
|
-
|
|
1998
|
+
allow: "encrypted-media; autoplay; fullscreen;"
|
|
1989
1999
|
});
|
|
1990
2000
|
}
|
|
1991
2001
|
}]);
|
|
@@ -2096,6 +2106,12 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
2096
2106
|
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
2097
2107
|
});
|
|
2098
2108
|
|
|
2109
|
+
_defineProperty(_assertThisInitialized(_this), "onPlaybackRateChange", function () {
|
|
2110
|
+
var _this$props5;
|
|
2111
|
+
|
|
2112
|
+
return (_this$props5 = _this.props).onPlaybackRateChange.apply(_this$props5, arguments);
|
|
2113
|
+
});
|
|
2114
|
+
|
|
2099
2115
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
2100
2116
|
_this.callPlayer('mute');
|
|
2101
2117
|
});
|
|
@@ -2117,13 +2133,13 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
2117
2133
|
value: function load(url) {
|
|
2118
2134
|
var _this2 = this;
|
|
2119
2135
|
|
|
2120
|
-
var _this$
|
|
2121
|
-
playing = _this$
|
|
2122
|
-
muted = _this$
|
|
2123
|
-
controls = _this$
|
|
2124
|
-
_onReady = _this$
|
|
2125
|
-
config = _this$
|
|
2126
|
-
onError = _this$
|
|
2136
|
+
var _this$props6 = this.props,
|
|
2137
|
+
playing = _this$props6.playing,
|
|
2138
|
+
muted = _this$props6.muted,
|
|
2139
|
+
controls = _this$props6.controls,
|
|
2140
|
+
_onReady = _this$props6.onReady,
|
|
2141
|
+
config = _this$props6.config,
|
|
2142
|
+
onError = _this$props6.onError;
|
|
2127
2143
|
(0, utils$2.getSDK)(SDK_URL, SDK_GLOBAL).then(function (Wistia) {
|
|
2128
2144
|
if (config.customControls) {
|
|
2129
2145
|
config.customControls.forEach(function (control) {
|
|
@@ -2161,6 +2177,8 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
2161
2177
|
|
|
2162
2178
|
_this2.player.bind('end', _this2.onEnded);
|
|
2163
2179
|
|
|
2180
|
+
_this2.player.bind('playbackratechange', _this2.onPlaybackRateChange);
|
|
2181
|
+
|
|
2164
2182
|
_onReady();
|
|
2165
2183
|
}
|
|
2166
2184
|
});
|
|
@@ -2173,6 +2191,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
2173
2191
|
this.player.unbind('pause', this.onPause);
|
|
2174
2192
|
this.player.unbind('seek', this.onSeek);
|
|
2175
2193
|
this.player.unbind('end', this.onEnded);
|
|
2194
|
+
this.player.unbind('playbackratechange', this.onPlaybackRateChange);
|
|
2176
2195
|
} // Proxy methods to prevent listener leaks
|
|
2177
2196
|
|
|
2178
2197
|
}, {
|
|
@@ -2384,7 +2403,8 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
2384
2403
|
PAUSE = _Twitch$Player.PAUSE,
|
|
2385
2404
|
ENDED = _Twitch$Player.ENDED,
|
|
2386
2405
|
ONLINE = _Twitch$Player.ONLINE,
|
|
2387
|
-
OFFLINE = _Twitch$Player.OFFLINE
|
|
2406
|
+
OFFLINE = _Twitch$Player.OFFLINE,
|
|
2407
|
+
SEEK = _Twitch$Player.SEEK;
|
|
2388
2408
|
|
|
2389
2409
|
_this2.player.addEventListener(READY, _this2.props.onReady);
|
|
2390
2410
|
|
|
@@ -2392,7 +2412,9 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
2392
2412
|
|
|
2393
2413
|
_this2.player.addEventListener(PAUSE, _this2.props.onPause);
|
|
2394
2414
|
|
|
2395
|
-
_this2.player.addEventListener(ENDED, _this2.props.onEnded);
|
|
2415
|
+
_this2.player.addEventListener(ENDED, _this2.props.onEnded);
|
|
2416
|
+
|
|
2417
|
+
_this2.player.addEventListener(SEEK, _this2.props.onSeek); // Prevent weird isLoading behaviour when streams are offline
|
|
2396
2418
|
|
|
2397
2419
|
|
|
2398
2420
|
_this2.player.addEventListener(ONLINE, _this2.props.onLoaded);
|
|
@@ -3004,6 +3026,10 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3004
3026
|
(0, utils$2.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(function (Vidyard) {
|
|
3005
3027
|
if (!_this2.container) return;
|
|
3006
3028
|
Vidyard.api.addReadyListener(function (data, player) {
|
|
3029
|
+
if (_this2.player) {
|
|
3030
|
+
return;
|
|
3031
|
+
}
|
|
3032
|
+
|
|
3007
3033
|
_this2.player = player;
|
|
3008
3034
|
|
|
3009
3035
|
_this2.player.on('ready', _this2.props.onReady);
|
|
@@ -3200,45 +3226,40 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3200
3226
|
_this2.player = new playerjs.Player(_this2.iframe);
|
|
3201
3227
|
|
|
3202
3228
|
_this2.player.on('ready', function () {
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
_this2.player.on('pause', _this2.props.onPause);
|
|
3208
|
-
|
|
3209
|
-
_this2.player.on('seeked', _this2.props.onSeek);
|
|
3210
|
-
|
|
3211
|
-
_this2.player.on('ended', _this2.props.onEnded);
|
|
3212
|
-
|
|
3213
|
-
_this2.player.on('error', _this2.props.onError);
|
|
3214
|
-
|
|
3215
|
-
_this2.player.on('timeupdate', function (_ref) {
|
|
3216
|
-
var duration = _ref.duration,
|
|
3217
|
-
seconds = _ref.seconds;
|
|
3218
|
-
_this2.duration = duration;
|
|
3219
|
-
_this2.currentTime = seconds;
|
|
3220
|
-
});
|
|
3229
|
+
// An arbitrary timeout is required otherwise
|
|
3230
|
+
// the event listeners won’t work
|
|
3231
|
+
setTimeout(function () {
|
|
3232
|
+
_this2.player.isReady = true;
|
|
3221
3233
|
|
|
3222
|
-
|
|
3223
|
-
var percent = _ref2.percent;
|
|
3234
|
+
_this2.player.setLoop(_this2.props.loop);
|
|
3224
3235
|
|
|
3225
|
-
if (_this2.
|
|
3226
|
-
_this2.
|
|
3236
|
+
if (_this2.props.muted) {
|
|
3237
|
+
_this2.player.mute();
|
|
3227
3238
|
}
|
|
3228
|
-
});
|
|
3229
3239
|
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
if (_this2.props.muted) {
|
|
3233
|
-
_this2.player.mute();
|
|
3234
|
-
}
|
|
3240
|
+
_this2.addListeners(_this2.player, _this2.props);
|
|
3235
3241
|
|
|
3236
|
-
setTimeout(function () {
|
|
3237
3242
|
_this2.props.onReady();
|
|
3238
|
-
});
|
|
3243
|
+
}, 500);
|
|
3239
3244
|
});
|
|
3240
3245
|
}, this.props.onError);
|
|
3241
3246
|
}
|
|
3247
|
+
}, {
|
|
3248
|
+
key: "addListeners",
|
|
3249
|
+
value: function addListeners(player, props) {
|
|
3250
|
+
var _this3 = this;
|
|
3251
|
+
|
|
3252
|
+
player.on('play', props.onPlay);
|
|
3253
|
+
player.on('pause', props.onPause);
|
|
3254
|
+
player.on('ended', props.onEnded);
|
|
3255
|
+
player.on('error', props.onError);
|
|
3256
|
+
player.on('timeupdate', function (_ref) {
|
|
3257
|
+
var duration = _ref.duration,
|
|
3258
|
+
seconds = _ref.seconds;
|
|
3259
|
+
_this3.duration = duration;
|
|
3260
|
+
_this3.currentTime = seconds;
|
|
3261
|
+
});
|
|
3262
|
+
}
|
|
3242
3263
|
}, {
|
|
3243
3264
|
key: "play",
|
|
3244
3265
|
value: function play() {
|
|
@@ -3296,8 +3317,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3296
3317
|
frameBorder: "0",
|
|
3297
3318
|
scrolling: "no",
|
|
3298
3319
|
style: style,
|
|
3299
|
-
|
|
3300
|
-
allow: "encrypted-media",
|
|
3320
|
+
allow: "encrypted-media; autoplay; fullscreen;",
|
|
3301
3321
|
referrerPolicy: "no-referrer-when-downgrade"
|
|
3302
3322
|
});
|
|
3303
3323
|
}
|
|
@@ -3430,6 +3450,10 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3430
3450
|
return (_this$props7 = _this.props).onError.apply(_this$props7, arguments);
|
|
3431
3451
|
});
|
|
3432
3452
|
|
|
3453
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayBackRateChange", function (event) {
|
|
3454
|
+
return _this.props.onPlaybackRateChange(event.target.playbackRate);
|
|
3455
|
+
});
|
|
3456
|
+
|
|
3433
3457
|
_defineProperty(_assertThisInitialized(_this), "onEnablePIP", function () {
|
|
3434
3458
|
var _this$props8;
|
|
3435
3459
|
|
|
@@ -3546,6 +3570,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3546
3570
|
player.addEventListener('seeked', this.onSeek);
|
|
3547
3571
|
player.addEventListener('ended', this.onEnded);
|
|
3548
3572
|
player.addEventListener('error', this.onError);
|
|
3573
|
+
player.addEventListener('ratechange', this.onPlayBackRateChange);
|
|
3549
3574
|
player.addEventListener('enterpictureinpicture', this.onEnablePIP);
|
|
3550
3575
|
player.addEventListener('leavepictureinpicture', this.onDisablePIP);
|
|
3551
3576
|
player.addEventListener('webkitpresentationmodechanged', this.onPresentationModeChange);
|
|
@@ -3572,6 +3597,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3572
3597
|
player.removeEventListener('seeked', this.onSeek);
|
|
3573
3598
|
player.removeEventListener('ended', this.onEnded);
|
|
3574
3599
|
player.removeEventListener('error', this.onError);
|
|
3600
|
+
player.removeEventListener('ratechange', this.onPlayBackRateChange);
|
|
3575
3601
|
player.removeEventListener('enterpictureinpicture', this.onEnablePIP);
|
|
3576
3602
|
player.removeEventListener('leavepictureinpicture', this.onDisablePIP);
|
|
3577
3603
|
player.removeEventListener('webkitpresentationmodechanged', this.onPresentationModeChange);
|
|
@@ -3694,6 +3720,10 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3694
3720
|
|
|
3695
3721
|
_this2.flv.attachMediaElement(_this2.player);
|
|
3696
3722
|
|
|
3723
|
+
_this2.flv.on(flvjs.Events.ERROR, function (e, data) {
|
|
3724
|
+
_this2.props.onError(e, data, _this2.flv, flvjs);
|
|
3725
|
+
});
|
|
3726
|
+
|
|
3697
3727
|
_this2.flv.load();
|
|
3698
3728
|
|
|
3699
3729
|
_this2.props.onLoaded();
|
|
@@ -3768,7 +3798,11 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
3768
3798
|
}, {
|
|
3769
3799
|
key: "setPlaybackRate",
|
|
3770
3800
|
value: function setPlaybackRate(rate) {
|
|
3771
|
-
|
|
3801
|
+
try {
|
|
3802
|
+
this.player.playbackRate = rate;
|
|
3803
|
+
} catch (error) {
|
|
3804
|
+
this.props.onError(error);
|
|
3805
|
+
}
|
|
3772
3806
|
}
|
|
3773
3807
|
}, {
|
|
3774
3808
|
key: "getDuration",
|
|
@@ -4320,6 +4354,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4320
4354
|
playIcon: node,
|
|
4321
4355
|
previewTabIndex: number,
|
|
4322
4356
|
fallback: node,
|
|
4357
|
+
oEmbedUrl: string,
|
|
4323
4358
|
wrapper: oneOfType([string, func, shape({
|
|
4324
4359
|
render: func.isRequired
|
|
4325
4360
|
})]),
|
|
@@ -4342,7 +4377,8 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4342
4377
|
params: object
|
|
4343
4378
|
}),
|
|
4344
4379
|
vimeo: shape({
|
|
4345
|
-
playerOptions: object
|
|
4380
|
+
playerOptions: object,
|
|
4381
|
+
title: string
|
|
4346
4382
|
}),
|
|
4347
4383
|
file: shape({
|
|
4348
4384
|
attributes: object,
|
|
@@ -4383,6 +4419,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4383
4419
|
onError: func,
|
|
4384
4420
|
onDuration: func,
|
|
4385
4421
|
onSeek: func,
|
|
4422
|
+
onPlaybackRateChange: func,
|
|
4386
4423
|
onProgress: func,
|
|
4387
4424
|
onClickPreview: func,
|
|
4388
4425
|
onEnablePIP: func,
|
|
@@ -4410,6 +4447,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4410
4447
|
fallback: null,
|
|
4411
4448
|
wrapper: 'div',
|
|
4412
4449
|
previewTabIndex: 0,
|
|
4450
|
+
oEmbedUrl: 'https://noembed.com/embed?url={url}',
|
|
4413
4451
|
config: {
|
|
4414
4452
|
soundcloud: {
|
|
4415
4453
|
options: {
|
|
@@ -4452,7 +4490,8 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4452
4490
|
byline: false,
|
|
4453
4491
|
portrait: false,
|
|
4454
4492
|
title: false
|
|
4455
|
-
}
|
|
4493
|
+
},
|
|
4494
|
+
title: null
|
|
4456
4495
|
},
|
|
4457
4496
|
file: {
|
|
4458
4497
|
attributes: {},
|
|
@@ -4463,7 +4502,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4463
4502
|
forceDASH: false,
|
|
4464
4503
|
forceFLV: false,
|
|
4465
4504
|
hlsOptions: {},
|
|
4466
|
-
hlsVersion: '
|
|
4505
|
+
hlsVersion: '1.1.4',
|
|
4467
4506
|
dashVersion: '3.1.3',
|
|
4468
4507
|
flvVersion: '1.5.0'
|
|
4469
4508
|
},
|
|
@@ -4495,6 +4534,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4495
4534
|
onError: noop,
|
|
4496
4535
|
onDuration: noop,
|
|
4497
4536
|
onSeek: noop,
|
|
4537
|
+
onPlaybackRateChange: noop,
|
|
4498
4538
|
onProgress: noop,
|
|
4499
4539
|
onClickPreview: noop,
|
|
4500
4540
|
onEnablePIP: noop,
|
|
@@ -4523,6 +4563,8 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4523
4563
|
|
|
4524
4564
|
|
|
4525
4565
|
|
|
4566
|
+
|
|
4567
|
+
|
|
4526
4568
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4527
4569
|
|
|
4528
4570
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
@@ -4588,6 +4630,8 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4588
4630
|
_defineProperty(_assertThisInitialized(_this), "onDurationCalled", false);
|
|
4589
4631
|
|
|
4590
4632
|
_defineProperty(_assertThisInitialized(_this), "handlePlayerMount", function (player) {
|
|
4633
|
+
if (_this.player) return; // Prevent loading twice in strict mode
|
|
4634
|
+
|
|
4591
4635
|
_this.player = player;
|
|
4592
4636
|
|
|
4593
4637
|
_this.player.load(_this.props.url);
|
|
@@ -4783,10 +4827,11 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4783
4827
|
playbackRate = _this$props5.playbackRate,
|
|
4784
4828
|
pip = _this$props5.pip,
|
|
4785
4829
|
loop = _this$props5.loop,
|
|
4786
|
-
activePlayer = _this$props5.activePlayer
|
|
4830
|
+
activePlayer = _this$props5.activePlayer,
|
|
4831
|
+
disableDeferredLoading = _this$props5.disableDeferredLoading;
|
|
4787
4832
|
|
|
4788
4833
|
if (!(0, _reactFastCompare["default"])(prevProps.url, url)) {
|
|
4789
|
-
if (this.isLoading && !activePlayer.forceLoad) {
|
|
4834
|
+
if (this.isLoading && !activePlayer.forceLoad && !disableDeferredLoading && !(0, utils$2.isMediaStream)(url)) {
|
|
4790
4835
|
console.warn("ReactPlayer: the attempt to load ".concat(url, " is being deferred until the player has loaded"));
|
|
4791
4836
|
this.loadOnReady = url;
|
|
4792
4837
|
return;
|
|
@@ -4865,11 +4910,14 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
4865
4910
|
var _this3 = this;
|
|
4866
4911
|
|
|
4867
4912
|
// When seeking before player is ready, store value and seek later
|
|
4868
|
-
if (!this.isReady
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4913
|
+
if (!this.isReady) {
|
|
4914
|
+
if (amount !== 0) {
|
|
4915
|
+
this.seekOnPlay = amount;
|
|
4916
|
+
setTimeout(function () {
|
|
4917
|
+
_this3.seekOnPlay = null;
|
|
4918
|
+
}, SEEK_ON_PLAY_EXPIRY);
|
|
4919
|
+
}
|
|
4920
|
+
|
|
4873
4921
|
return;
|
|
4874
4922
|
}
|
|
4875
4923
|
|
|
@@ -5029,7 +5077,8 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
5029
5077
|
var _this2 = this;
|
|
5030
5078
|
|
|
5031
5079
|
var url = _ref.url,
|
|
5032
|
-
light = _ref.light
|
|
5080
|
+
light = _ref.light,
|
|
5081
|
+
oEmbedUrl = _ref.oEmbedUrl;
|
|
5033
5082
|
|
|
5034
5083
|
if (typeof light === 'string') {
|
|
5035
5084
|
this.setState({
|
|
@@ -5048,7 +5097,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
5048
5097
|
this.setState({
|
|
5049
5098
|
image: null
|
|
5050
5099
|
});
|
|
5051
|
-
return window.fetch(
|
|
5100
|
+
return window.fetch(oEmbedUrl.replace('{url}', url)).then(function (response) {
|
|
5052
5101
|
return response.json();
|
|
5053
5102
|
}).then(function (data) {
|
|
5054
5103
|
if (data.thumbnail_url && _this2.mounted) {
|
|
@@ -5361,12 +5410,14 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
5361
5410
|
var _this$props = this.props,
|
|
5362
5411
|
light = _this$props.light,
|
|
5363
5412
|
playIcon = _this$props.playIcon,
|
|
5364
|
-
previewTabIndex = _this$props.previewTabIndex
|
|
5413
|
+
previewTabIndex = _this$props.previewTabIndex,
|
|
5414
|
+
oEmbedUrl = _this$props.oEmbedUrl;
|
|
5365
5415
|
return /*#__PURE__*/_react["default"].createElement(Preview, {
|
|
5366
5416
|
url: url,
|
|
5367
5417
|
light: light,
|
|
5368
5418
|
playIcon: playIcon,
|
|
5369
5419
|
previewTabIndex: previewTabIndex,
|
|
5420
|
+
oEmbedUrl: oEmbedUrl,
|
|
5370
5421
|
onClick: this.handleClickPreview
|
|
5371
5422
|
});
|
|
5372
5423
|
}
|
|
@@ -45084,7 +45135,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
45084
45135
|
|
|
45085
45136
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
|
|
45086
45137
|
|
|
45087
|
-
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version = '9.1.
|
|
45138
|
+
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version = '9.1.3';
|
|
45088
45139
|
|
|
45089
45140
|
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
|
|
45090
45141
|
var _b, _c;
|
|
@@ -48235,9 +48286,10 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
48235
48286
|
return { atBottom: atBottom, newMessagesNotification: newMessagesNotification, setNewMessagesNotification: setNewMessagesNotification };
|
|
48236
48287
|
}
|
|
48237
48288
|
|
|
48238
|
-
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};function usePrependedMessagesCount(messages) {
|
|
48289
|
+
window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};function usePrependedMessagesCount(messages, hasDateSeparator) {
|
|
48239
48290
|
var _a;
|
|
48240
|
-
var
|
|
48291
|
+
var firstRealMessageIndex = hasDateSeparator ? 1 : 0;
|
|
48292
|
+
var currentFirstMessageId = (_a = messages === null || messages === void 0 ? void 0 : messages[firstRealMessageIndex]) === null || _a === void 0 ? void 0 : _a.id;
|
|
48241
48293
|
var firstMessageId = React.useRef(currentFirstMessageId);
|
|
48242
48294
|
var earliestMessageId = React.useRef(currentFirstMessageId);
|
|
48243
48295
|
var previousNumItemsPrepended = React.useRef(0);
|
|
@@ -48417,7 +48469,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
48417
48469
|
window.removeEventListener('blur', resetNewMessagesReceivedInBackground);
|
|
48418
48470
|
};
|
|
48419
48471
|
}, [scrollToBottomIfConfigured]);
|
|
48420
|
-
var numItemsPrepended = usePrependedMessagesCount(processedMessages);
|
|
48472
|
+
var numItemsPrepended = usePrependedMessagesCount(processedMessages, !disableDateSeparator);
|
|
48421
48473
|
/**
|
|
48422
48474
|
* Logic to update the key of the virtuoso component when the list jumps to a new location.
|
|
48423
48475
|
*/
|
|
@@ -48425,7 +48477,7 @@ var StreamChatReact = (function (exports, React, streamChat) {
|
|
|
48425
48477
|
var firstMessageId = React.useRef();
|
|
48426
48478
|
React.useEffect(function () {
|
|
48427
48479
|
var _a;
|
|
48428
|
-
var continuousSet = messages
|
|
48480
|
+
var continuousSet = messages === null || messages === void 0 ? void 0 : messages.find(function (message) { return message.id === firstMessageId.current; });
|
|
48429
48481
|
if (!continuousSet) {
|
|
48430
48482
|
setMessageSetKey(+new Date());
|
|
48431
48483
|
}
|