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

Foliovision

  • 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

How often does it ping to save a users position?

[Solved]

Foliovision › Forums › FV Player › Bug Reports › How often does it ping to save a users position?

  • Barney Vaughan 7 years, 1 month ago

    Hi there,

    We’ve got the player running as the core foundation for https://theredmentv.com. One strange occurance is a high load on the admin-ajax.php file for an action: fv_wp_flowplayer_video_position_save. Is there a way to slow this down to every 30 seconds?

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

    Hello Barney,

    this could happen if you have a lot of logged in users watching your videos. The video position is stored when you close the browser tab, but also periodically to ensure the position is not lost if your browser crashes or you use some older browser.

    To make sure the position is stored less often you can tweak sendPositionsEvery variable in the main plugin JS file, it’s this line: https://github.com/foliovision/fv-wordpress-flowplayer/blob/master/flowplayer/fv-flowplayer.min.js#L2479 The hard coded value is 60 which equals about 15 seconds (might be more, depending on browser and media type). I would suggest you to try a value of 240 there (60 seconds).

    Also, to make sure your users get the new JavaScript file and not what’s cached in their browser change the plugin version form 7.x.x to 7.x.x.1 and increment that as you make more changes at: https://github.com/foliovision/fv-wordpress-flowplayer/blob/master/flowplayer.php#L30

    This way you should really see an improvement. The performance matters a lot to us, so please let us know how it goes and we will be able to make this a setting. Or we can even provide some code (a mu-plugin) which would disable all the other plugins for these Ajax calls – making them a lot faster.

    Thanks,
    Martin

    Barney Vaughan 7 years ago

    Really appreciate the feedback – we’ll give this a go after Christmas when we’ve got all hands on deck. Though the MU-Plugin route looks like it would be very useful as this site is getting a lot of hits daily and has a lot of plugins installed.

    Love the plugin and will feedback on results.

    Leho Kraav 7 years ago

    I have the same concern, happy to see someone else writing it up.

    Martin, have you guys considered SHORTINIT approach?

    https://www.google.com/search?client=firefox-b-d&q=admin+ajax+shortinit

    I’m not 100% sure it satisfies all requirements, but maybe?

    Leho Kraav 7 years ago

    Btw Delicious Brains also face the same issue https://deliciousbrains.com/wordpress-rest-api-vs-custom-request-handlers/ with their famous WP Migrate DB Pro plugin. Maybe some useful insights in their thoughts?

    Martin 7 years ago

    Hello Leho,

    we could be using SHORTINT, but the problem is that some of the functions would most likely be unavailable:

    * is_user_logged_in() and get_current_user_id() – we would have to add some other way of identifying the user, which wouldn’t be as secure as the current approach where the WP login cookie is used and validated by WP itself. So potentially somebody could manipulate other users’ video watch times, unless we do something special to prevent it.
    * update_user_meta() – we would have to use low level SQL commands instead, so if somebody would be using WP Object Cache he would be out of luck. But perhaps there is a way of clearing that for the affected users.

    Thank you for that deliciousbrains.com link, it’s a great comparison of the options here. I was doing something very similar just the other day.

    I think we should start by lowering the amount of these Ajax calls. If we just run them when the user is closing the browser tab or leaving the page it should be reliable enough. The current approach will save your video position even if your browser crashes, but that should be really rare anyway.

    Thanks,
    Martin

    Leho Kraav 7 years ago

    I agree, browsers have reached a high enough stability level that this WP AJAX performance issue is the bigger problem.

    Martin 7 years ago

    Hello Leho,

    FV Player 7.3.18.727 released today only saves the user video position when exiting the page.

    Thanks,
    Martin

    Daniele G. 6 years ago

    good morning,
    we had implemented our statistics on that call every 15 seconds.
    Unfortunately today if a user closes the page or sees the whole video there is no call recorded.
    Is there a possibility of having a timed call?
    Thanks

    Martin 6 years ago

    Hello Daniele,

    which exact call do you mean? We did remove the periodic storing of the video position, but we didn’t remove any event when doing so.

    Are the video positions not storing properly for you?

    Thanks,
    Martin

    Daniele G. 6 years ago

    Hello Martin,
    before there was this action: action = fv_wp_flowplayer_video_position_save
    which was invoked every 15 seconds. Now only at the exit of the page.
    Is there a way to get this functionality again?
    Thank you

    Martin 6 years ago

    Hello Daniele,

    adding a setting to enable that periodic video position saving would be just confusing.

    We prefer to improve our plugin in general rather than add in more settings for programmers to tweak. If there is some old browser which needs this, let us know and we can enable it for that one.

    Thanks,
    Martin

Viewing 11 replies - 1 through 11 (of 11 total)
Reply To: How often does it ping to save a users position?



Please Sign in or Register to upload files.

Related Posts

  1. Photoshop CS3 Droplet: Save as GIF

    Photoshop CS3 Droplet: Save as GIF

  2. Save your AdSense Account: how to stop Personally Identifiable Information warnings

  3. WordPress 3.0: Upgrade Considerations for Commercial Users

    WordPress 3.0: Upgrade Considerations for Commercial Users

Primary Sidebar

Bug Reports

    Categories

    • Business
    • Camera Reviews
    • Case Studies
    • Design
    • FV Player
    • Internet Marketing
    • IT
    • Life
    • SEO
    • Slovak
    • Video of the Week
    • WordPress

    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 © 2026 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‬