mediaRef

Type:
<object> | <function>
It returns the DOM reference used for mounting the internal media component.
Depending on your implementation and requirements, the way you'd use this property can vary.
with useRef
If you don't need the ref "on mount" (eg. for attaching callbacks), React's hook alone will suffice:

with useCallback & useRef
If you need access to the media DOM element on mount, you would want to use the hook. This solution is explained briefly in the , and in a bit more detail in popular Medium post: