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

Foliovision

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

Videos not playing on a particular page on mobile devices with my custom code

Foliovision › Forums › FV Player › Troubleshooting › Videos not playing on a particular page on mobile devices with my custom code

  • apasho 3 years, 2 months ago

    Our development site that uses videos hosted on AWS is almost done after several months of development, https://dev.vitaes.com/

    We use the flowplayer to play videos on the front page https://dev.vitaes.com/, on the watch page https://dev.vitaes.com/watch and on individual profile pages, such as https://dev.vitaes.com/anchor-and-reporter-good-day-sacramento/

    Radom clips, about a minute long, are played on the front page, and longer videos are played on profile pages and these can be viewed on mobile devices. But on the watch page, where visitors can click on a thumbnail image to play one of the videos, these same videos will not play, even though we can play them on the front page or on a profile page on mobile.

    Note on the when viewing the watch page on the desktop, there is a menu of links to play different parts of the video, The first link, Highlights, plays the clip and all the other links will play different pars of the full video. On mobile devices, this menu is converted to a dropdown list where it says ‘Highlights’ with a triangle the points down. Click that to display the full list.

    On the watch page, when one clicks on a link, the output of the flowplayer shortcode is inserted into the page and starts the video. This work well on desktop devices. But for mobile, the video starts to load but will not play. When there is a mobile version of a videos available, it will try and fail to play it. For the first four videos on the page I have tried using different low resolution and bitrate versions of the videos, mp4 or m3u8, but they still do not play. On some browsers such as Chrome, it puts out a message, HTML5 not supported, try installing Flash.

    If I use a different HLS library, I can get the videos to play, but I have to do a lot of recoding for this to work.

    It is a password protected site. Here are the log in credentials

    (redacted)

    Do you have a solution to this issue?

    Note, be careful to not use the menu links as they may send you to the old site (https://vitaes.com/) which uses Vimeo videos.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Martin 3 years ago

    Hello Apasho,

    what code does is use to play these videos inserted via Ajax?

    On the watch page, when one clicks on a link, the output of the flowplayer shortcode is inserted into the page and starts the video

    Thanks,
    Martin

    apasho 3 years ago

    This is the code for inserting the flow player code into the watch page:
    function vt_get_video_html() {

    if ( !wp_verify_nonce( $_POST[‘nonce’], VITAES_NONCE)) {
    exit(‘Missing nonce! Please refresh this page.’);
    }

    if ((isset($_POST[‘video_id’])) && (strlen(trim($_POST[‘video_id’])) > 0))
    $video_id = trim(stripslashes(strip_tags($_POST[‘video_id’])));
    else
    $video_id = ”;

    if ((isset($_POST[’embed_width’])) && (strlen(trim($_POST[’embed_width’])) > 0))
    $embed_width = trim(stripslashes(strip_tags($_POST[’embed_width’])));
    else
    $embed_width = ”;

    if ((isset($_POST[’embed_height’])) && (strlen(trim($_POST[’embed_height’])) > 0))
    $embed_height = trim(stripslashes(strip_tags($_POST[’embed_height’])));
    else
    $embed_height = ”;

    echo do_shortcode(‘[fvplayer id="'.$video_id.'" width="'.$embed_width.'px" height="'.$embed_height.'px" autoplay="true"] ‘);

    die();
    }

    Martin 3 years ago

    Hello Apasho,

    I was wondering more about the JavaScript code – that’s where I would be looking for issues if the video doesn’t load properly.

    If there is anything to initiate the video playback (autoplay) then please start by removing that part and see if it fixes the video playback.

    Thanks,
    Martin

    apasho 3 years ago

    You can view the javascript code here, https://dev.vitaes.com/wp-content/themes/vitaes-bridge-child/js/watch.js

    The function, display_vitaes_iframe(), though we are not longer using video iframes, is the function that inserts the shortcode output.

    Martin 3 years ago

    Hello Apasho,

    I see you use this to init FV Player:

    jQuery.ajax({
      ...
      success: function (data) { 
        ...
        el = jQuery(data)
        window.fpId = el[0].id
        jQuery(".vimeography-embed").html(data);
        fv_player_load();
        fv_autoplay_exec();
        ...
        flowplayer(`#${window.fpId}`).load();
        ...
        if(seek_to != 0) {
          setTimeout(function () {
            console.log('seeking to', seek_to);
            flowplayer(`#${window.fpId}`).seek(seek_to);    
          }, 2000);
        }
        ...
      }
    });
    

    My recommendation would be to remove all that code starting with fv_player_load() down to that setTimeout() call. The FV Player should still load as we execute fv_player_load() after each Ajax call automatically.

    If you want to autoplay the video inserted via Ajax, you can use this code: https://foliovision.com/support/fv-wordpress-flowplayer/bug-reports/autoplay-doesnt-work-with-ajax#post-148142

    Thanks,
    Martin

    apasho 3 years ago

    I tried running the script without
    fv_player_load();
    fv_autoplay_exec();
    flowplayer(#${window.fpId}).load()
    but it would no longer autoplay on desktop and still videos will not play on the watch page on mobile.
    Any other ideas?

    Martin 3 years ago

    Hello Apasho,

    it’s weird that it still won’t play on mobile.

    You can try to run this on the mobile phone browser console and then reload the page:

    localStorage.flowplayerDebug = true

    That will let you debug the events which occur.

    Thanks,
    Martin

Viewing 7 replies - 1 through 7 (of 7 total)
Reply To: Videos not playing on a particular page on mobile devices with my custom code



Please Sign in or Register to upload files.

Related Posts

  1. Videos will not play when linked from Facebook on mobile devices

    Videos will not play when linked from Facebook on mobile devices

  2. Error when playing on mobile devices

    Error when playing on mobile devices

  3. Youtube hosted videos not loading for mobile devices when in lightbox

    Youtube hosted videos not loading for mobile devices when in lightbox

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 © 2025 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 .

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!