File tree Expand file tree Collapse file tree
packages/react/src/LazyVideo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,11 +77,7 @@ export default function LazyVideoClient({
7777 // errors while trying to play.
7878 const play = async ( ) => {
7979 if ( playPromise . current ) await playPromise . current ;
80- try {
81- playPromise . current = videoRef . current ?. play ( ) ;
82- } catch ( e ) {
83- console . error ( e ) ;
84- }
80+ playPromise . current = videoRef . current ?. play ( ) . catch ( ( e ) => { } ) ;
8581 } ;
8682
8783 // Pause the video, waiting until it's safe to play it
@@ -103,12 +99,12 @@ export default function LazyVideoClient({
10399
104100 const handlePlay = ( ) => {
105101 setVideoPaused ( false ) ;
106- onPlay && onPlay ( ) ;
102+ onPlay ?. ( ) ;
107103 } ;
108104
109105 const handlePause = ( ) => {
110106 setVideoPaused ( true ) ;
111- onPause && onPause ( ) ;
107+ onPause ?. ( ) ;
112108 } ;
113109
114110 // Add listeners
You can’t perform that action at this time.
0 commit comments