Skip to content

Commit

Permalink
fix: hls errors and listener fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
saikatmitra91 authored Sep 7, 2023
1 parent 2b37aec commit d26e6f9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/hls-player/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/hls-stats/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/roomkit-react/src/Prebuilt/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const APP_DATA = {
appConfig: 'appConfig',
sidePane: 'sidePane',
hlsStats: 'hlsStats',
hlsViewerRole: 'hlsViewerRole',
waitingViewerRole: 'waitingViewerRole',
subscribedNotifications: 'subscribedNotifications',
logo: 'logo',
Expand Down
8 changes: 6 additions & 2 deletions packages/roomkit-react/src/Prebuilt/layouts/HLSView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,16 @@ const HLSView = () => {

useEffect(() => {
const videoElem = videoRef.current;
const setStreamEndedCallback = () => setStreamEnded(true);
const setStreamEndedCallback = () => {
setStreamEnded(true);
// no point keeping the callback attached once the streaming is ended
videoElem?.removeEventListener('ended', setStreamEndedCallback);
};
videoElem?.addEventListener('ended', setStreamEndedCallback);
return () => {
videoElem?.removeEventListener('ended', setStreamEndedCallback);
};
}, []);
}, [hlsUrl]);

/**
* initialize HMSHLSPlayer and add event listeners.
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10543,10 +10543,10 @@ he@^1.2.0:
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==

hls.js@^1.3.0:
version "1.4.10"
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.4.10.tgz#3feac40f21a558453b243b5b926b7317e70624e1"
integrity sha512-wAVSj4Fm2MqOHy5+BlYnlKxXvJlv5IuZHjlzHu18QmjRzSDFQiUDWdHs5+NsFMQrgKEBwuWDcyvaMC9dUzJ5Uw==
hls.js@^1.4.12:
version "1.4.12"
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.4.12.tgz#2022daa29d10c662387d80a5297f8330f8ef5ee2"
integrity sha512-1RBpx2VihibzE3WE9kGoVCtrhhDWTzydzElk/kyRbEOLnb1WIE+3ZabM/L8BqKFTCL3pUy4QzhXgD1Q6Igr1JA==

hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
Expand Down

0 comments on commit d26e6f9

Please sign in to comment.