Foliovision › Forums › FV Player › Bug Reports › Cross-origin Request Blocking – FV Player
-
I am not able to play Vimeo videos through FV player on our staging environment. Getting Cross-origin Request blocking chrome error. See attached image.
You should have access to our staging environment: https://conversionxli.warmpress.com
Cleared Front End Cache; issue persists
Restarted Browser; issue persists
Mirrored settings on the production site; issue persists
Disabled MPEG-DASH; issue perests
Reenabled MPEG-DASH; issue persists
Enabled HLS.js; issue persists
Disabled HLS.js; issue persists
Enabled Beta; issue persists
Enabled Release; issue persistsThe end result I want:
– MPEG-DASH Enabled
– Beta Version Enabled
– Video Plays with no issuesplease provide next steps
-
-
Hello CXL,
please check if you are using the right license key for your domain. If you need a staging website we recommend that you use a subdomain of your real licensed domain (dev.your-domain.com), that way it keeps working on both.
However I wonder why you are not getting the right error message on top of the player and you get a generic error message only.
Thanks,
MartinHere’s the url: https://conversionxli.warmpress.com/lesson/visual-branding/
Your guest account is active still and should be able to access this page.
Hello CXL,
are all the Vimeo videos failing or just this one? I see you use the Settings -> FV Player Pro -> Hosting -> Vimeo -> “Turbocharge Ajax Vimeo loading” setting. Please try to first just re-save the settings and see if that helps (perhaps it’s failing to create the cache folder at /wp-content/cache/fv-player-vimeo). Then try to disable that option.
Thanks,
MartinAll of the videos are failing. We have the Turbocharge Ajax Vimeo loading setting enabled on the production site and it works with no issue.
Navigated to Settings -> FV Player Pro -> Hosting -> Vimeo; Clicked Save All Changes button in this section; issue persists
Disabled Tubrocharge Ajax Vimeo loading setting; the issue appears to have been resolved.
Why does this resolve the issue if it works on our production server?
What information would you need to help determine this?I did notice errors in Query Monitor when interacting on FV Settings: Settings -> FV Player Pro -> Hosting -> Vimeo
(Can you enable this thread for user
lehok
so I can also respond with my personal account?)Hi, it’s Leho. I took a look at
fv-player-pro/fv-vimeo-ajax.php
. Problem is the hardcoded parsing ofwp-config.php
, which in case of our staging (multi-)site imports other subsite-specific config files, which your hardcoding can’t know about.I moved Vimeo key configuration to main
wp-config.php
file and now turbocharging works. But I wonder if there is a code-level solution to this, instead of having to deal with filesystem specifics. Your thoughts?Hello Leho,
I published this thread now, so you can respond personally.
The idea of that script is to bypass loading any of the WordPress code and establishing the database connection.
Perhaps we could let it include wp-load.php in a normal way and use SHORTINT define instead.
We added the
tags as at some point multiple FV Player users faced an issue with some PHP warnings unrelated to FV Player leaking into admin-ajax.php output. At that time it seemed like a win-win solution – our player continued working for them and we didn’t had to explain to them that other plugins are cause of their issue and not FV Player. And then later that whole routine just got moved into fv-vimeo-ajax.php. Thanks,
MartinI like
SHORTINIT
idea. If you’re needing to get WP env infos in a sane fashion, and maybe WP API access, it sounds like the next best available option. Possibly allows sanitizing other parts offv-vimeo-ajax.php
as a positive side effect?PS I’m also hoping FVP code quality improves over time. I see formatting inconsistencies and whitespace errors all over the place, which usually are signs of.. let’s say “early” professionals.
Recommendations:
* https://github.com/foliovision/fv-wordpress-flowplayer/blob/7.3.9.727/composer.json should become stronger, I’d recommend integrating
dealerdirect/phpcodesniffer-composer-installer
similar to https://github.com/justintadlock/mythic/blob/1.1.0/composer.json#L27 and get everyone on the same page.* centralize on PhpStorm, if you haven’t already (+ have whole team upvote https://youtrack.jetbrains.com/issue/IDEABKL-708 lol)
Hello Leho,
thank you for your insights. It’s true that some of the files are really old (2011) and it might be actually more beneficial to rewrite certain parts from scratch than trying to fix it.
Using composer would be great. In a lot of cases we have to stay with an older version of a library and we have to do our own modifications to it as well (for example when Flowplayer team won’t accept our fixes quickly enough, or when we need to adjust the way the Dash manifest is loaded – as you noted elsewhere it’s not always easy to work with upstream), so it would be best to actually fork it and use that. We would also have to improve our Git to WP SVN deployment to work with that.
I would also like to get rid of the AWS library and load it from some plugin.
Thanks,
Martin