# Display subtitles in Chromecast on Android

**URL:** <https://community.bitmovin.com/t/display-subtitles-in-chromecast-on-android/1859>\
**Category:** Support\
**Tags:** bitmovin-player, bitmovin, chromecast\
**Created:** [March 28, 2023, 7:47pm UTC](https://community.bitmovin.com/t/display-subtitles-in-chromecast-on-android/1859 "2023-03-28T19:47:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Lukas](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/lukas/32/393_2.png) [@Lukas](https://community.bitmovin.com/u/Lukas)\
**Post date:** [March 29, 2023, 11:53am UTC](https://community.bitmovin.com/t/display-subtitles-in-chromecast-on-android/1859/2 "2023-03-29T11:53:47Z")

</div>

Hi Nicolas,  
in order to be able to view side loaded subtitle tracks on Chromecast the URL needs to be provided with the according CORS headers.

You can verify that this is the problem by using one of the free online CORS proxy like [https://allorigins.win/:](https://allorigins.win/:)

```auto
ArrayList<SubtitleTrack> subtitles = new ArrayList<SubtitleTrack>();
subtitles.add(new SubtitleTrack("https://api.allorigins.win/raw?url=https://downtown.homologacao.attri.com.br/storage/legendas/1614372023010463b5d01de0310.vtt", null, "pt-br", "1", true, "pt-br"));

 sourceItem.setSubtitleTracks(subtitles);

```

E.g. the following headers should do the trick:

```auto
Referrer Policy: strict-origin-when-cross-origin
access-control-allow-credentials: true
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Content-Encoding, Accept
access-control-allow-methods: OPTIONS, GET, POST, PATCH, PUT, DELETE
access-control-allow-origin: *

```

For more details on how to debug such an issue on the cast receiver see [this article](https://bitmovin.com/docs/player/tutorials/how-to-debug-streams-on-chromecast-devices) and [this community discussion](https://community.bitmovin.com/t/chromecast-casting-drm-content-has-still-problems/1726/1).

Also see the [official documentation](https://developers.google.com/cast/docs/android_sender/media_tracks#satisfy_cors_requirements) on CORS requirements for media tracks used on Chromecast.

---

_[View the full topic](https://community.bitmovin.com/t/display-subtitles-in-chromecast-on-android/1859)._
