Fixes the chromecasting issues when the media needs to be transcoded (cherry picked from commit 61c54884)