[FeaturedBrandsPanel] section, LIVE CHANNELS, TV play test

Detail Notes :
This commit is contained in:
younghoon100.park
2024-03-28 17:56:34 +09:00
parent 66451c63a4
commit cd4400db45
3 changed files with 23 additions and 2 deletions

View File

@@ -48,6 +48,24 @@ export default memo(function FeaturedVideoPlayer({
readyCb && readyCb(true);
}, [readyCb]);
// VideoPlayer
const mediainfoHandler = useCallback((e) => {
const type = e.type;
if (type !== "timeupdate") {
console.log("@@ [mediaInfoHandler].....", type);
}
switch (type) {
case "loadeddata":
console.log("@@ [mediaInfoHandler] loaded data");
break;
case "durationchange":
console.log("@@ [mediaInfoHandler] duration", e.currentTarget.duration);
break;
}
}, []);
return (
<div>
{/* <VideoPlayer
@@ -72,7 +90,9 @@ export default memo(function FeaturedVideoPlayer({
className={className}
noAutoShowMediaControls
onError={handleError}
onLoadedData={handleReady}
// onLoadedData={handleReady}
onLoadedData={mediainfoHandler}
onDurationChange={mediainfoHandler}
spotlightDisabled
>
{shouldPlay && <source src={src} type="application/mpegurl" />}

View File

@@ -66,7 +66,7 @@ export default memo(function LiveVideoCard({
)}
errorCb={errorCb}
src={showUrl}
shouldPlay
shouldPlay={isFocused}
width={isVertical ? 326 : 1002}
height={564}
/>

View File

@@ -79,6 +79,7 @@
.player {
.position(@position: absolute, @top: 0, @left: 0);
z-index: 10;
height: 564px;
&.horizontal {