[FeaturedBrandsPanel] section, LIVE CHANNELS, TV play test
Detail Notes :
This commit is contained in:
@@ -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" />}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default memo(function LiveVideoCard({
|
||||
)}
|
||||
errorCb={errorCb}
|
||||
src={showUrl}
|
||||
shouldPlay
|
||||
shouldPlay={isFocused}
|
||||
width={isVertical ? 326 : 1002}
|
||||
height={564}
|
||||
/>
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
.player {
|
||||
.position(@position: absolute, @top: 0, @left: 0);
|
||||
z-index: 10;
|
||||
height: 564px;
|
||||
|
||||
&.horizontal {
|
||||
|
||||
Reference in New Issue
Block a user