Skip to content

Commit

Permalink
feat(galary): hls light;
Browse files Browse the repository at this point in the history
  • Loading branch information
denisx committed Dec 20, 2024
1 parent cedb184 commit e875c31
Show file tree
Hide file tree
Showing 32 changed files with 11 additions and 67 deletions.
33 changes: 0 additions & 33 deletions .changeset/nervous-ants-learn.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/strange-coats-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alfalab/core-components-gallery': patch
---

Импорт HLS заменён на light версию, только енкодер без дополнительных обвязок
4 changes: 1 addition & 3 deletions packages/base-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": [
"matches-polyfill.*"
],
"sideEffects": false,
"dependencies": {
"@alfalab/core-components-backdrop": "^3.4.3",
"@alfalab/core-components-global-store": "^2.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/form-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
8 changes: 5 additions & 3 deletions packages/gallery/src/components/image-viewer/video/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { MouseEvent, ReactEventHandler, useContext, useEffect, useRef } from 'react';
import cn from 'classnames';
import Hls from 'hls.js';
import type HlsType from 'hls.js';
import type { ErrorData, Events } from 'hls.js';
import Hls from 'hls.js/dist/hls.light.mjs';

import { Circle } from '@alfalab/core-components/icon-view/circle';
import PlayCompactMIcon from '@alfalab/icons-glyph/PlayCompactMIcon';
Expand Down Expand Up @@ -32,10 +34,10 @@ export const Video = ({ url, index, className, isActive }: Props) => {
}, [index]);

useEffect(() => {
const hls = new Hls();
const hls = new Hls() as HlsType;

if (Hls.isSupported()) {
hls.on(Hls.Events.ERROR, (_, data) => {
hls.on(Hls.Events.ERROR, (_: Events.ERROR, data: ErrorData) => {
if (data.fatal) {
switch (data.type) {
case Hls.ErrorTypes.MEDIA_ERROR:
Expand Down
1 change: 0 additions & 1 deletion packages/notification-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/notification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/number-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/pass-code-v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/pass-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/password-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/pattern-lock-v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/pattern-lock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/popup-sheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/product-cover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/pure-cell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/radio-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/segmented-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": ">=16.8.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/skeleton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/slider-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/status-badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": ">=16.8.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/stepped-progress-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/switch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/system-message/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": ">=16.8.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/time-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/with-suffix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down

0 comments on commit e875c31

Please sign in to comment.