• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Making the web work for you

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty

Subtitles do not show when casting to screen with Chromecast

[Solved]

Foliovision › Forums › FV Player › Bug Reports › Subtitles do not show when casting to screen with Chromecast

  • Craig C. 2 years ago

    When casting a video to Chromecast, the subtitles do not show on the screen to which the video is casted. I saw on this page ( https://foliovision.com/player/advanced/chromecast ) that you are working to fix this, and was wondering what the current status for that fix is. Is there anything we can do for example in the structure of the subtitle file itself or…?

    Looking forward hearing from you on this one.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Martin 2 years ago

    Hello Craig,

    yes, it’s time to finally fix this. We are looking into it now.

    There are some limitations though:

    1) The subtitles have to be served with CORS headers
    2) The subtitles have to be on https://

    Thanks,
    Martin

    Martin 2 years ago

    Hello Craig,

    please reinstall FV Player from https://github.com/foliovision/fv-wordpress-flowplayer/archive/master.zip and get a fresh FV Player Pro ZIP file from https://foliovision.com/my-licenses and the subtitles in Chromecast should be working for you.

    You can also test here: https://foliovision.com/ (Vimeo video with multiple subtitle tracks)

    Thanks,
    Martin

    Craig C. 2 years ago

    Hi there,

    Thanks a lot for this update and my apologies for the late response. I have been able to update to the latest versions, but no subtitle has showed up since. I think it’s due to my subtitle file missing the CORS specifications you mentioned. I am now using this .srt file, on https:

    https://kickstart.thelastreformation.com/wp-content/uploads/2021/03/examplesub.srt

    What do you mean by CORS headers, and how can I make sure the real subs will be having those? I tried to Google this question, but can’t figure it out yet.

    Looking forward hearing from you.

    Regards,

    Craig

    Martin 2 years ago

    Hello Craig,

    do the subtitles show up when playing on the website? They should as the website is probably running on https://kickstart.thelastreformation.com so it’s the same domain and same protocol (https).

    The CORS is required by Google Chromecast. Does your website use .htaccess configuration file? If so, you can get the CORS headers up for VTT and SRT files by adding the following lines into it:

    <IfModule mod_headers.c>
      <FilesMatch "\.(vtt|srt)$">
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    

    Then you can test the CORS headers here: https://cors-test.codehappy.dev/ by entering the subtitles URL there.

    Thanks,
    Martin

    Craig C. 2 years ago

    Hi Martin,

    Thanks a lot for getting back to me. The lines of code you sent me are htaccess code, but our website is hosted on an Nginx server. Could you send me the Nginx code please?

    Thanks in advance.
    Craig

    Craig C. 2 years ago

    Hi Martin,

    Perhaps this can be of help as well; I’ve uploaded the examplesubs.srt file to a different server (Amazon S3 and one of my other websites) and both are not displaying in Chromecast. The latter is hosted here:

    https://www.solidshift.nl/wp-content/uploads/2021/04/examplesub.srt

    And using your testing tool, it shows it works correctly with CORS:

    https://cors-test.codehappy.dev/?url=https%3A%2F%2Fwww.solidshift.nl%2Fwp-content%2Fuploads%2F2021%2F04%2Fexamplesub.srt&method=get

    So, I’m confused now as both the https connection and CORS heading requirements are taken care of, but Chromecast still does not display the subtitles.

    Martin 2 years ago

    Hello Craig,

    unfortunately Chromecast doesn’t support the SRT format. I tried to host your file on our server and it didn’t help. It only started showing the subtitles once I:

    * renamed the file to ,vtt extension
    * changed the coma decimal separators to dots
    * added “WEBVTT” at the start of the file

    You can read more about VTT subtitles here: https://foliovision.com/player/advanced/subtitles

    I tried to add the subtitles with the application/x-subrip mime type in the Chromecast API too, but then it was just ignored.

    Thanks,
    Martin

    Craig C. 2 years ago

    Hi Martin,

    Thanks for getting back to me. I will try this VTT format one of these days.

    Using the CORS headers is still required I think? If so, could you let me know what line of code needs to be added to this server we are using? Our server is Nginx and not htaccess.

    Martin 2 years ago

    Hello Craig,

    I’m not sure about the NginX configuration files, as these are usually part of the /etc folder on the operating system and they consist of multiple files. It’s not like a single .htaccess file placed in the web root.

    If you can edit these configuration files, it’s best to download them all and then look for “srt” to figure out where the CORS is being added.

    Otherwise I would recommend you to ask your server support about this.

    Thanks,
    Martin

    Craig C. 2 years ago

    Works like a charm now Martin, many thanks to you and the team!

Viewing 10 replies - 1 through 10 (of 10 total)
Reply To: Subtitles do not show when casting to screen with Chromecast



Please Sign in or Register to upload files.

Related Posts

  1. New Chromecast feature

  2. Using FV Player with Chromecast

  3. How do I show the Chromecast button?

    How do I show the Chromecast button?

Primary Sidebar

Sign in Register
FV Player Docs Post New Topic

Welcome

to Foliovision support forums! We'll be happy to provide free support to resolve all the reported bugs. You always can start by specifying your OS and browser and steps to reproduce the bug.

If you need help with the installation on your site, please submit a request for a Pro Support Incident. We'll have you up and running in no time, with detailed instructions on how to resolve your issue yourself in the future.

Facing a hard to solve WordPress problem? On a tight deadline?

Let us take care of it for you
right now.

Pro Support Buy FV Player

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2023 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in settings.

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!