@@ -621,6 +621,7 @@ const PlayerBox = ({
621621 const theme = useTheme ( ) ;
622622 const isMobile = useMediaQuery ( theme . breakpoints . down ( 'md' ) ) ;
623623 const [ play , setPlay ] = useState ( false ) ;
624+ const [ isPortrait , setIsPortrait ] = useState ( false ) ;
624625
625626 // Determine aspectRatio based on mimeType and mobile mode
626627 const getAspectRatio = ( ) => {
@@ -630,6 +631,25 @@ const PlayerBox = ({
630631 return '16/9' ;
631632 } ;
632633
634+ // Check if device is in portrait mode (width < height)
635+ useEffect ( ( ) => {
636+ const checkOrientation = ( ) => {
637+ setIsPortrait ( window . innerWidth < window . innerHeight ) ;
638+ } ;
639+
640+ // Check on mount
641+ checkOrientation ( ) ;
642+
643+ // Listen for resize and orientation changes
644+ window . addEventListener ( 'resize' , checkOrientation ) ;
645+ window . addEventListener ( 'orientationchange' , checkOrientation ) ;
646+
647+ return ( ) => {
648+ window . removeEventListener ( 'resize' , checkOrientation ) ;
649+ window . removeEventListener ( 'orientationchange' , checkOrientation ) ;
650+ } ;
651+ } , [ ] ) ;
652+
633653 useEffect ( ( ) => {
634654 if ( checkAuth ( ) || userIdLocalstorageName ) {
635655 setPlay ( true ) ;
@@ -696,6 +716,9 @@ const PlayerBox = ({
696716 width : isShowMoreContent
697717 ? '100%'
698718 : { xs : '100%' , sm : '100%' , md : '90%' , lg : '80%' , xl : '70%' } ,
719+ p :0 ,
720+ ml :- 10 ,
721+ mr :- 5 ,
699722 } }
700723 >
701724 < iframe
@@ -718,8 +741,8 @@ const PlayerBox = ({
718741 aspectRatio : getAspectRatio ( ) ,
719742 } }
720743 allowFullScreen
721- width = "100%"
722- height = " 100%"
744+ width = { "110%" }
745+ height = { isPortrait ? '300%' : ' 100%' }
723746 title = "Embedded Localhost"
724747 allow = "accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture"
725748 frameBorder = "0"
0 commit comments