@elicecontents/content-ui 1.1.2-rc.30 → 1.1.2-rc.32

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/index.cjs CHANGED
@@ -2907,7 +2907,7 @@ EliceChat.InputArea = ({
2907
2907
  alignItems: recorderState.isRecording ? "center" : "none",
2908
2908
  p: "0.5rem 1rem",
2909
2909
  gap: "0.625rem",
2910
- zIndex: "1000",
2910
+ zIndex: "50",
2911
2911
  children: isOnlyRecord ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2912
2912
  OnlyRecordButton,
2913
2913
  {
@@ -9234,11 +9234,15 @@ function EliceVideoV3({
9234
9234
  const wrapperRef = import_react16.default.useRef(null);
9235
9235
  const videoRef = import_react16.default.useRef(null);
9236
9236
  const hideControlsTimerRef = import_react16.default.useRef(null);
9237
- const lastTapRef = import_react16.default.useRef(null);
9237
+ const lastTapRef = import_react16.default.useRef(
9238
+ null
9239
+ );
9238
9240
  const feedbackTimeoutRef = import_react16.default.useRef(null);
9239
9241
  const isPlayingRef = import_react16.default.useRef(false);
9240
9242
  const textTrackRef = import_react16.default.useRef(textTrack);
9241
9243
  const isDraggingTimelineRef = import_react16.default.useRef(false);
9244
+ const isSeekingRef = import_react16.default.useRef(false);
9245
+ const isMediaReloadingRef = import_react16.default.useRef(false);
9242
9246
  const singleTapTimerRef = import_react16.default.useRef(null);
9243
9247
  const [isReady, setIsReady] = import_react16.default.useState(false);
9244
9248
  const [isPlaying, setIsPlaying] = import_react16.default.useState(false);
@@ -9286,18 +9290,27 @@ function EliceVideoV3({
9286
9290
  setShowControls(false);
9287
9291
  }, 2300);
9288
9292
  }, []);
9289
- const seekBy = import_react16.default.useCallback((delta, withFeedback = true) => {
9290
- const video = videoRef.current;
9291
- if (!video) {
9292
- return;
9293
- }
9294
- const next = Math.max(0, Math.min((video.currentTime ?? 0) + delta, Number.isFinite(video.duration) ? video.duration : Infinity));
9295
- video.currentTime = next;
9296
- setCurrentTime(next);
9297
- if (withFeedback) {
9298
- showFeedback(delta > 0 ? "forward" : "backward");
9299
- }
9300
- }, [showFeedback]);
9293
+ const seekBy = import_react16.default.useCallback(
9294
+ (delta, withFeedback = true) => {
9295
+ const video = videoRef.current;
9296
+ if (!video) {
9297
+ return;
9298
+ }
9299
+ const next = Math.max(
9300
+ 0,
9301
+ Math.min(
9302
+ (video.currentTime ?? 0) + delta,
9303
+ Number.isFinite(video.duration) ? video.duration : Infinity
9304
+ )
9305
+ );
9306
+ video.currentTime = next;
9307
+ setCurrentTime(next);
9308
+ if (withFeedback) {
9309
+ showFeedback(delta > 0 ? "forward" : "backward");
9310
+ }
9311
+ },
9312
+ [showFeedback]
9313
+ );
9301
9314
  const togglePlayPause = import_react16.default.useCallback(() => {
9302
9315
  const video = videoRef.current;
9303
9316
  if (!video) {
@@ -9374,57 +9387,60 @@ function EliceVideoV3({
9374
9387
  track.mode = shouldShow ? "showing" : "disabled";
9375
9388
  });
9376
9389
  }, []);
9377
- const handleSurfacePointerDown = import_react16.default.useCallback((event) => {
9378
- const target = event.target;
9379
- if (target?.closest('[data-video-v3-control="true"]')) {
9380
- return;
9381
- }
9382
- const now = event.timeStamp;
9383
- const x = event.clientX;
9384
- const y = event.clientY;
9385
- const prev = lastTapRef.current;
9386
- if (!prev || now - prev.at > DOUBLE_TAP_INTERVAL_MS2) {
9387
- lastTapRef.current = { at: now, x, y };
9388
- resetControlsTimer();
9390
+ const handleSurfacePointerDown = import_react16.default.useCallback(
9391
+ (event) => {
9392
+ const target = event.target;
9393
+ if (target?.closest('[data-video-v3-control="true"]')) {
9394
+ return;
9395
+ }
9396
+ const now = event.timeStamp;
9397
+ const x = event.clientX;
9398
+ const y = event.clientY;
9399
+ const prev = lastTapRef.current;
9400
+ if (!prev || now - prev.at > DOUBLE_TAP_INTERVAL_MS2) {
9401
+ lastTapRef.current = { at: now, x, y };
9402
+ resetControlsTimer();
9403
+ if (singleTapTimerRef.current !== null) {
9404
+ window.clearTimeout(singleTapTimerRef.current);
9405
+ }
9406
+ singleTapTimerRef.current = window.setTimeout(() => {
9407
+ singleTapTimerRef.current = null;
9408
+ lastTapRef.current = null;
9409
+ togglePlayPause();
9410
+ }, DOUBLE_TAP_INTERVAL_MS2);
9411
+ return;
9412
+ }
9389
9413
  if (singleTapTimerRef.current !== null) {
9390
9414
  window.clearTimeout(singleTapTimerRef.current);
9391
- }
9392
- singleTapTimerRef.current = window.setTimeout(() => {
9393
9415
  singleTapTimerRef.current = null;
9394
- lastTapRef.current = null;
9395
- togglePlayPause();
9396
- }, DOUBLE_TAP_INTERVAL_MS2);
9397
- return;
9398
- }
9399
- if (singleTapTimerRef.current !== null) {
9400
- window.clearTimeout(singleTapTimerRef.current);
9401
- singleTapTimerRef.current = null;
9402
- }
9403
- const dx = x - prev.x;
9404
- const dy = y - prev.y;
9405
- const isNear = dx * dx + dy * dy <= 42 * 42;
9406
- lastTapRef.current = null;
9407
- if (!isNear) {
9408
- return;
9409
- }
9410
- event.preventDefault();
9411
- const wrapper = wrapperRef.current;
9412
- if (!wrapper) {
9413
- return;
9414
- }
9415
- const bounds = wrapper.getBoundingClientRect();
9416
- const leftLimit = bounds.left + bounds.width * 0.33;
9417
- const rightLimit = bounds.left + bounds.width * 0.67;
9418
- if (x <= leftLimit) {
9419
- seekBy(-DOUBLE_TAP_SEEK_SECONDS);
9420
- return;
9421
- }
9422
- if (x >= rightLimit) {
9423
- seekBy(DOUBLE_TAP_SEEK_SECONDS);
9424
- return;
9425
- }
9426
- togglePlayPause();
9427
- }, [resetControlsTimer, seekBy, togglePlayPause]);
9416
+ }
9417
+ const dx = x - prev.x;
9418
+ const dy = y - prev.y;
9419
+ const isNear = dx * dx + dy * dy <= 42 * 42;
9420
+ lastTapRef.current = null;
9421
+ if (!isNear) {
9422
+ return;
9423
+ }
9424
+ event.preventDefault();
9425
+ const wrapper = wrapperRef.current;
9426
+ if (!wrapper) {
9427
+ return;
9428
+ }
9429
+ const bounds = wrapper.getBoundingClientRect();
9430
+ const leftLimit = bounds.left + bounds.width * 0.33;
9431
+ const rightLimit = bounds.left + bounds.width * 0.67;
9432
+ if (x <= leftLimit) {
9433
+ seekBy(-DOUBLE_TAP_SEEK_SECONDS);
9434
+ return;
9435
+ }
9436
+ if (x >= rightLimit) {
9437
+ seekBy(DOUBLE_TAP_SEEK_SECONDS);
9438
+ return;
9439
+ }
9440
+ togglePlayPause();
9441
+ },
9442
+ [resetControlsTimer, seekBy, togglePlayPause]
9443
+ );
9428
9444
  import_react16.default.useEffect(() => {
9429
9445
  const video = videoRef.current;
9430
9446
  if (!video) {
@@ -9440,6 +9456,7 @@ function EliceVideoV3({
9440
9456
  return;
9441
9457
  }
9442
9458
  const onLoadedMetadata = () => {
9459
+ isMediaReloadingRef.current = false;
9443
9460
  setIsReady(true);
9444
9461
  setDuration(Number.isFinite(video.duration) ? video.duration : 0);
9445
9462
  if (rememberPositionKey) {
@@ -9455,13 +9472,29 @@ function EliceVideoV3({
9455
9472
  }
9456
9473
  };
9457
9474
  const onTimeUpdate = () => {
9475
+ const time = video.currentTime || 0;
9458
9476
  if (!isDraggingTimelineRef.current) {
9459
- setCurrentTime(video.currentTime || 0);
9477
+ setCurrentTime(time);
9460
9478
  }
9461
9479
  if (rememberPositionKey) {
9462
- window.localStorage.setItem(rememberPositionKey, `${video.currentTime || 0}`);
9480
+ const shouldSkipRememberWrite = isDraggingTimelineRef.current || isSeekingRef.current || isMediaReloadingRef.current || !Number.isFinite(time) || time < 0.25;
9481
+ if (!shouldSkipRememberWrite) {
9482
+ window.localStorage.setItem(rememberPositionKey, `${time}`);
9483
+ }
9463
9484
  }
9464
9485
  };
9486
+ const onSeeking = () => {
9487
+ isSeekingRef.current = true;
9488
+ };
9489
+ const onSeeked = () => {
9490
+ isSeekingRef.current = false;
9491
+ };
9492
+ const onLoadStart = () => {
9493
+ isMediaReloadingRef.current = true;
9494
+ };
9495
+ const onEmptied = () => {
9496
+ isMediaReloadingRef.current = true;
9497
+ };
9465
9498
  const onPlay = () => {
9466
9499
  setIsPlaying(true);
9467
9500
  setIsBuffering(false);
@@ -9475,12 +9508,17 @@ function EliceVideoV3({
9475
9508
  setIsBuffering(true);
9476
9509
  };
9477
9510
  const onPlaying = () => {
9511
+ isMediaReloadingRef.current = false;
9478
9512
  setIsBuffering(false);
9479
9513
  };
9480
9514
  const onError = () => {
9481
9515
  setErrorMessage(labels.error);
9482
9516
  };
9483
9517
  video.addEventListener("loadedmetadata", onLoadedMetadata);
9518
+ video.addEventListener("loadstart", onLoadStart);
9519
+ video.addEventListener("emptied", onEmptied);
9520
+ video.addEventListener("seeking", onSeeking);
9521
+ video.addEventListener("seeked", onSeeked);
9484
9522
  video.addEventListener("timeupdate", onTimeUpdate);
9485
9523
  video.addEventListener("play", onPlay);
9486
9524
  video.addEventListener("pause", onPause);
@@ -9492,6 +9530,10 @@ function EliceVideoV3({
9492
9530
  video.addEventListener("error", onError);
9493
9531
  return () => {
9494
9532
  video.removeEventListener("loadedmetadata", onLoadedMetadata);
9533
+ video.removeEventListener("loadstart", onLoadStart);
9534
+ video.removeEventListener("emptied", onEmptied);
9535
+ video.removeEventListener("seeking", onSeeking);
9536
+ video.removeEventListener("seeked", onSeeked);
9495
9537
  video.removeEventListener("timeupdate", onTimeUpdate);
9496
9538
  video.removeEventListener("play", onPlay);
9497
9539
  video.removeEventListener("pause", onPause);
@@ -9510,10 +9552,16 @@ function EliceVideoV3({
9510
9552
  setIsFullscreen(Boolean(activeElement));
9511
9553
  };
9512
9554
  document.addEventListener("fullscreenchange", onFullscreenChange);
9513
- document.addEventListener("webkitfullscreenchange", onFullscreenChange);
9555
+ document.addEventListener(
9556
+ "webkitfullscreenchange",
9557
+ onFullscreenChange
9558
+ );
9514
9559
  return () => {
9515
9560
  document.removeEventListener("fullscreenchange", onFullscreenChange);
9516
- document.removeEventListener("webkitfullscreenchange", onFullscreenChange);
9561
+ document.removeEventListener(
9562
+ "webkitfullscreenchange",
9563
+ onFullscreenChange
9564
+ );
9517
9565
  };
9518
9566
  }, []);
9519
9567
  import_react16.default.useEffect(() => {
@@ -9565,7 +9613,9 @@ function EliceVideoV3({
9565
9613
  return true;
9566
9614
  case "c":
9567
9615
  stopEvent();
9568
- applyCaption(selectedCaption === "off" ? textTrack?.[0]?.lang ?? "off" : "off");
9616
+ applyCaption(
9617
+ selectedCaption === "off" ? textTrack?.[0]?.lang ?? "off" : "off"
9618
+ );
9569
9619
  return true;
9570
9620
  default:
9571
9621
  break;
@@ -9585,13 +9635,22 @@ function EliceVideoV3({
9585
9635
  return true;
9586
9636
  case "keyc":
9587
9637
  stopEvent();
9588
- applyCaption(selectedCaption === "off" ? textTrack?.[0]?.lang ?? "off" : "off");
9638
+ applyCaption(
9639
+ selectedCaption === "off" ? textTrack?.[0]?.lang ?? "off" : "off"
9640
+ );
9589
9641
  return true;
9590
9642
  default:
9591
9643
  return false;
9592
9644
  }
9593
9645
  },
9594
- [applyCaption, seekBy, selectedCaption, textTrack, toggleFullscreen, togglePlayPause]
9646
+ [
9647
+ applyCaption,
9648
+ seekBy,
9649
+ selectedCaption,
9650
+ textTrack,
9651
+ toggleFullscreen,
9652
+ togglePlayPause
9653
+ ]
9595
9654
  );
9596
9655
  const handleKeyDown = (event) => {
9597
9656
  handleHotkey(event);
@@ -9756,152 +9815,169 @@ function EliceVideoV3({
9756
9815
  children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconPlay, {})
9757
9816
  }
9758
9817
  ) : null,
9759
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__controls", "data-hidden": showControls ? "false" : "true", children: [
9760
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "elice-video-v3__timeline-wrap", "data-video-v3-control": "true", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9761
- "input",
9762
- {
9763
- "data-video-v3-control": "true",
9764
- className: "elice-video-v3__timeline",
9765
- type: "range",
9766
- min: 0,
9767
- max: Number.isFinite(duration) && duration > 0 ? duration : 0,
9768
- step: 0.1,
9769
- value: Math.min(currentTime, Number.isFinite(duration) ? duration : currentTime),
9770
- onPointerDown: () => {
9771
- isDraggingTimelineRef.current = true;
9772
- },
9773
- onPointerUp: () => {
9774
- isDraggingTimelineRef.current = false;
9775
- },
9776
- onChange: (event) => {
9777
- const next = Number(event.target.value);
9778
- if (!Number.isFinite(next)) {
9779
- return;
9780
- }
9781
- setCurrentTime(next);
9782
- if (videoRef.current) {
9783
- videoRef.current.currentTime = next;
9784
- }
9785
- },
9786
- "aria-label": labels.seek
9787
- }
9788
- ) }),
9789
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__row", children: [
9790
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__group", children: [
9791
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9792
- "button",
9793
- {
9794
- "data-video-v3-control": "true",
9795
- className: "elice-video-v3__btn",
9796
- type: "button",
9797
- onClick: togglePlayPause,
9798
- "aria-label": isPlaying ? labels.pause : labels.play,
9799
- title: isPlaying ? labels.pause : labels.play,
9800
- children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconPause, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconPlay, {})
9801
- }
9802
- ),
9803
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9804
- "button",
9805
- {
9806
- "data-video-v3-control": "true",
9807
- className: "elice-video-v3__btn",
9808
- type: "button",
9809
- onClick: () => {
9810
- setIsMuted((prev) => !prev);
9811
- },
9812
- "aria-label": isMuted ? labels.unmute : labels.mute,
9813
- title: isMuted ? labels.unmute : labels.mute,
9814
- children: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconVolumeOff, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconVolumeOn, {})
9815
- }
9816
- ),
9818
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
9819
+ "div",
9820
+ {
9821
+ className: "elice-video-v3__controls",
9822
+ "data-hidden": showControls ? "false" : "true",
9823
+ children: [
9817
9824
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9818
- "input",
9825
+ "div",
9819
9826
  {
9827
+ className: "elice-video-v3__timeline-wrap",
9820
9828
  "data-video-v3-control": "true",
9821
- className: "elice-video-v3__volume elice-video-v3__hide-mobile",
9822
- type: "range",
9823
- min: 0,
9824
- max: 1,
9825
- step: 0.01,
9826
- value: isMuted ? 0 : volume,
9827
- onChange: (event) => {
9828
- const next = Number(event.target.value);
9829
- setVolume(next);
9830
- setIsMuted(next <= 0);
9831
- },
9832
- "aria-label": "Volume"
9829
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9830
+ "input",
9831
+ {
9832
+ "data-video-v3-control": "true",
9833
+ className: "elice-video-v3__timeline",
9834
+ type: "range",
9835
+ min: 0,
9836
+ max: Number.isFinite(duration) && duration > 0 ? duration : 0,
9837
+ step: 0.1,
9838
+ value: Math.min(
9839
+ currentTime,
9840
+ Number.isFinite(duration) ? duration : currentTime
9841
+ ),
9842
+ onPointerDown: () => {
9843
+ isDraggingTimelineRef.current = true;
9844
+ },
9845
+ onPointerUp: () => {
9846
+ isDraggingTimelineRef.current = false;
9847
+ },
9848
+ onChange: (event) => {
9849
+ const next = Number(event.target.value);
9850
+ if (!Number.isFinite(next)) {
9851
+ return;
9852
+ }
9853
+ setCurrentTime(next);
9854
+ if (videoRef.current) {
9855
+ videoRef.current.currentTime = next;
9856
+ }
9857
+ },
9858
+ "aria-label": labels.seek
9859
+ }
9860
+ )
9833
9861
  }
9834
9862
  ),
9835
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__time elice-video-v3__hide-mobile", children: [
9836
- formatTime(currentTime),
9837
- " / ",
9838
- formatTime(duration)
9863
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__row", children: [
9864
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__group", children: [
9865
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9866
+ "button",
9867
+ {
9868
+ "data-video-v3-control": "true",
9869
+ className: "elice-video-v3__btn",
9870
+ type: "button",
9871
+ onClick: togglePlayPause,
9872
+ "aria-label": isPlaying ? labels.pause : labels.play,
9873
+ title: isPlaying ? labels.pause : labels.play,
9874
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconPause, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconPlay, {})
9875
+ }
9876
+ ),
9877
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9878
+ "button",
9879
+ {
9880
+ "data-video-v3-control": "true",
9881
+ className: "elice-video-v3__btn",
9882
+ type: "button",
9883
+ onClick: () => {
9884
+ setIsMuted((prev) => !prev);
9885
+ },
9886
+ "aria-label": isMuted ? labels.unmute : labels.mute,
9887
+ title: isMuted ? labels.unmute : labels.mute,
9888
+ children: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconVolumeOff, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconVolumeOn, {})
9889
+ }
9890
+ ),
9891
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9892
+ "input",
9893
+ {
9894
+ "data-video-v3-control": "true",
9895
+ className: "elice-video-v3__volume elice-video-v3__hide-mobile",
9896
+ type: "range",
9897
+ min: 0,
9898
+ max: 1,
9899
+ step: 0.01,
9900
+ value: isMuted ? 0 : volume,
9901
+ onChange: (event) => {
9902
+ const next = Number(event.target.value);
9903
+ setVolume(next);
9904
+ setIsMuted(next <= 0);
9905
+ },
9906
+ "aria-label": "Volume"
9907
+ }
9908
+ ),
9909
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__time elice-video-v3__hide-mobile", children: [
9910
+ formatTime(currentTime),
9911
+ " / ",
9912
+ formatTime(duration)
9913
+ ] })
9914
+ ] }),
9915
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__group elice-video-v3__group--right", children: [
9916
+ captionOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
9917
+ "select",
9918
+ {
9919
+ "data-video-v3-control": "true",
9920
+ className: "elice-video-v3__select elice-video-v3__bottom-hide-small",
9921
+ value: selectedCaption,
9922
+ onChange: (event) => {
9923
+ applyCaption(event.target.value);
9924
+ },
9925
+ "aria-label": labels.captions,
9926
+ title: labels.captions,
9927
+ children: [
9928
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("option", { value: "off", children: labels.captionsOff }),
9929
+ captionOptions.map((track) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("option", { value: track.lang, children: track.label ?? track.lang }, track.src))
9930
+ ]
9931
+ }
9932
+ ) : null,
9933
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9934
+ "select",
9935
+ {
9936
+ "data-video-v3-control": "true",
9937
+ className: "elice-video-v3__select elice-video-v3__bottom-hide-small",
9938
+ value: String(playbackRate),
9939
+ onChange: (event) => {
9940
+ setPlaybackRate(Number(event.target.value));
9941
+ },
9942
+ "aria-label": labels.speed,
9943
+ title: labels.speed,
9944
+ children: playbackRates.map((rate) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("option", { value: String(rate), children: [
9945
+ rate,
9946
+ "x"
9947
+ ] }, rate))
9948
+ }
9949
+ ),
9950
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9951
+ "button",
9952
+ {
9953
+ "data-video-v3-control": "true",
9954
+ className: "elice-video-v3__btn",
9955
+ type: "button",
9956
+ onClick: () => {
9957
+ void togglePiP();
9958
+ },
9959
+ title: labels.pip,
9960
+ "aria-label": labels.pip,
9961
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconPiP, {})
9962
+ }
9963
+ ),
9964
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9965
+ "button",
9966
+ {
9967
+ "data-video-v3-control": "true",
9968
+ className: "elice-video-v3__btn",
9969
+ type: "button",
9970
+ onClick: toggleFullscreen,
9971
+ title: isFullscreen ? labels.exitFullscreen : labels.fullscreen,
9972
+ "aria-label": isFullscreen ? labels.exitFullscreen : labels.fullscreen,
9973
+ children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconFullscreenExit, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconFullscreen, {})
9974
+ }
9975
+ )
9976
+ ] })
9839
9977
  ] })
9840
- ] }),
9841
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "elice-video-v3__group elice-video-v3__group--right", children: [
9842
- captionOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
9843
- "select",
9844
- {
9845
- "data-video-v3-control": "true",
9846
- className: "elice-video-v3__select elice-video-v3__bottom-hide-small",
9847
- value: selectedCaption,
9848
- onChange: (event) => {
9849
- applyCaption(event.target.value);
9850
- },
9851
- "aria-label": labels.captions,
9852
- title: labels.captions,
9853
- children: [
9854
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("option", { value: "off", children: labels.captionsOff }),
9855
- captionOptions.map((track) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("option", { value: track.lang, children: track.label ?? track.lang }, track.src))
9856
- ]
9857
- }
9858
- ) : null,
9859
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9860
- "select",
9861
- {
9862
- "data-video-v3-control": "true",
9863
- className: "elice-video-v3__select elice-video-v3__bottom-hide-small",
9864
- value: String(playbackRate),
9865
- onChange: (event) => {
9866
- setPlaybackRate(Number(event.target.value));
9867
- },
9868
- "aria-label": labels.speed,
9869
- title: labels.speed,
9870
- children: playbackRates.map((rate) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("option", { value: String(rate), children: [
9871
- rate,
9872
- "x"
9873
- ] }, rate))
9874
- }
9875
- ),
9876
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9877
- "button",
9878
- {
9879
- "data-video-v3-control": "true",
9880
- className: "elice-video-v3__btn",
9881
- type: "button",
9882
- onClick: () => {
9883
- void togglePiP();
9884
- },
9885
- title: labels.pip,
9886
- "aria-label": labels.pip,
9887
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconPiP, {})
9888
- }
9889
- ),
9890
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9891
- "button",
9892
- {
9893
- "data-video-v3-control": "true",
9894
- className: "elice-video-v3__btn",
9895
- type: "button",
9896
- onClick: toggleFullscreen,
9897
- title: isFullscreen ? labels.exitFullscreen : labels.fullscreen,
9898
- "aria-label": isFullscreen ? labels.exitFullscreen : labels.fullscreen,
9899
- children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconFullscreenExit, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconFullscreen, {})
9900
- }
9901
- )
9902
- ] })
9903
- ] })
9904
- ] })
9978
+ ]
9979
+ }
9980
+ )
9905
9981
  ]
9906
9982
  }
9907
9983
  );