import React , { useEffect } from 'react' ; param { React . RefObject < HTMLVideoElement > } videoRef param { bool } muted param { number } volume param { bool } disableRemotePlayback param { bool } disablePictureInPicture export default function useSetAdditionalAttributesOnVideo ( videoRef , muted , volume , disableRemotePlayback , disablePictureInPicture ) { useEffect ( ( ) => { const videoElement = videoRef . current ; videoElement . muted = muted ; videoElement . volume = volume ; } , [ videoRef , muted , volume ] ) ; useEffect ( ( ) => { const videoElement = videoRef . current ; videoElement . disableRemotePlayback = disableRemotePlayback ; videoElement . disablePictureInPicture = disablePictureInPicture ; } , [ videoRef , disablePictureInPicture , disableRemotePlayback ] ) ; }