Partial fix to issue #1672

Partial fix to issue #1672 on function handleMediaLoad by adding a debounce.