Foliovision › Forums › FV Player › Troubleshooting › Finding problem on Ajax pages, theme support asked for info to resolve issue.
-
Hi there,
I am planning to go for licensed version of flowplayer along with VAST/VPAID ad plugin. We are testing with AWS at the moment using our WPLMS wordpress theme. We are stuck with some issues on Ajax pages now.
Theme support responded this way to resolve the issue but they are also stuck on 4th point below.
>
1. Enable Load FV Flowplayer JS everywhere in wp admin -settings.2. Add this code in WPLMS Customizer :
add_action(‘wplms_before_every_unit’,’wplms_jwplayer_compatibility’);
function wplms_jwplayer_compatibility(){
add_shortcode(‘fvplayer’,’flowplayer_content_handle’);
}3. Add this code in WPLMS – Footer – google analytics :
<script>
jQuery(document).ready(function($){
$(‘.unit_content’).on(‘unit_traverse’,function(){
if( typeof(flowplayer) != “undefined” ) {
$(‘.flowplayer’).flowplayer().load();
}
});
});
</script>4. The last thing missing is how flowplayer generates a video identification hash, for which you need to consult them. It is the last piece missing in WPLMS integration with flowplayer : http://prntscr.com/6wfljj
>I would appreciate your support and hope to get this resolve to take it forward.
Thank you!
Aryan
-
-
Hello Aryan,
do you mean that there is content which is loaded by Ajax and our player doesn’t init in it?
Let’s have a look at what you done so far:
1) This is correct.
2) Not sure about this one. Is your theme putting up some different handled for [fvplayer] ?
3) When does event “unit_traverse” fire? If each time an Ajax content is loaded, you should check just this content for any elements matching “.flowplayer” and init player like you do. Then you don’t need to check for typeof(flowplayer) as that won’t help you – if you have a player on the page before loading Ajax, your code won’t work.
4) For now you can just skip this part, the chrome_mp4_array is not that important now, with new version of Chrome.
And as an extra:
5) You should check what kind of videos you use in the Ajax loaded content. This might not work reliably for playlists or Vimeo videos.
Thanks,
MartinThanks Martin, I shared with the Vibethemes support team but something is still not working. See their response below:
>
So, the #2 is not important. According to Martin all we need is #3.Yes the unit_traverse is fired each time the ajax content is loaded.
But how do we load the flow player.Simply using this :
$(‘.unit_content’).on(‘unit_traverse’,function(){
$(‘.flowplayer’).flowplayer().load();
});Gives an error in the flow player. Screenshot here:
http://prntscr.com/6yqbvxI am testing with .mp4 videos.
sample : http://vibethemes.com/envato/wplms/wp-content/uploads/2014/02/big_buck_bunny.mp4
>
Thanks Martin once again, I hope we will resolve this soon.Hello aspirenetwork,
you should first debug if $(‘.flowplayer’) gives you the instances you expect. Then only call flowplayer() on it as a test. The play arrow should appear on it and you should be able to click.
In case there are multiple matches elements, call flowplayer() for each one independently (you can use each() with a callback) and call load() only for the first one if it should autoplay.
Thanks,
MartinGreat! Finally the problem was resolved for WPLMS theme FV Flowplayer not working in course Units (ajax pages). We used the following code added in the Customizer/Google Analytics code box:
<script>
jQuery(document).ready(function($){
$(‘.unit_content’).on(‘unit_traverse’,function(){
jQuery(‘.flowplayer’).each(function(){
$(this).flowplayer().load();
});
});
});
</script>
>
Now there is small issue which I have posted to WPLMS theme support also. On first load of the page, video works fine. BUT, when we return to same page after visiting other pages it shows the Javascript error again! Though this time the PLAY button is VISIBLE and video also works fine.Can you suggest how do we remove the error message? Thanks for your support so far.
Hello Martin, I need your advice on how to remove the error ‘I’m sorry, your JavaScript appears to be broken. Please use “Check template” in plugin settings, read our troubleshooting guide or order our pro support and we will get it fixed for you.’ even though the video is working fine. This is happening only for Admin.
I’m using AWS/S3 signed video url. It’s working fine though I need to know why this error comes. Thanks!
Hello aspirenetwork,
our plugin contains multiple safe guards which are only visible for admins:
1) Installing the plugin asks you to run the “Check template” function, which looks for duplicate loading of jQuery or missing wp_footer() hook in your footer.php template.
2) Loading the post with the video shows warning to admin if there is no wp_footer() or if FV Flowplayer library is not loaded properly. This is the part which you are seeing. You can simply call jQuery(‘.fvfp_admin_error’).remove(); on your Ajax loading event to remove this warning.
3) When playing the video, it’s sent to our server for a check of video encoding. This reports HTML5 video encoding issues back to the user.
Thanks,
MartinHello Martin,
As I said earlier, I will be upgrading to Pro and I have done it now. But after resolving the issues the issue has come up again. The videos are not playing on Ajax pages.
I am following this method,
http://support.vibethemes.com/support/solutions/articles/1000178530-compatibility-with-fv-flowplayer-pluginand it was working for standard version. (I’ve also sent them a support email) But now in Pro its not working. Can you help me resolve it? If you have any question to be asked from Vibe themes, let me know.
My order is using email: billing@speaktoday.com
Appreciate your help to resolve this issue.
Thanks!
AryanHello Sunjay,
please let us know what kind of shortcodes you are using. If you are using our Vimeo integration, then it requires some other additional init code, not just what’s in the Vibe Themes guide.
Our goal is to simplify this, we will have a look at it again once we finish upgrading our player to Flowplayer 6 core.
Thanks,
MartinHi Martin, I just thought it shouldn’t be the problem with the video. But now its confirmed, the video problem is not there. It shows Video OK. I am using the following script as per the wplms theme developers”
<script>
jQuery(document).ready(function($){
$(‘.unit_content’).on(‘unit_traverse’,function(){
if($(‘.flowplayer’).length){
$(‘.flowplayer’).each(function(){
$(this).flowplayer();
});
}
});
});
</script>But this script shows the video once and then quickly hides the video. Just see the screen-capture here:
http://screencast-o-matic.com/watch/co13ICfYZOI really have to solve this issue asap not sure how. This problem actually have started after buying the Flowplayer Pro upgrade. The free version was working fine. Appreciate your guidance in this matter.
Thank you,
Sunjay.Hello Sunjay,
do you use our Vimeo or CloudFront integration? That’s the only kind of video which should be causing this issue.
The problem is that these players have to be initialized in JavaScript, which is normally in footer – in this case it should be the fv_player_pro.playlist variable. And if you load the content in Ajax, I’m not sure if it’s present at all.
Thanks,
MartinHello Aryan,
could you please confirm the following?
1) CloudFront videos with download protection work on simple pages.
2) Simple videos (means no CloudFront download protection) loaded via Ajax work.
3) CloudFront videos with download protection don’t work when loaded via Ajax.
If that’s the case, then we might need to rework some of this loading in FV Flowplayer 6. The issue is that CloudFront video need another Ajax call to figure out the URL signature before loading. And we place this code in page footer.
Thanks,
MartinHi Martin,
Point (1) and (3) I will get back to you but point (2) as stated by you works. In your terms, Simple Videos loaded via Ajax work. Basically I am using S3 bucket (protected video through signed URL) and that is working fine for the time being.
Cloudfront videos with download protection, there is some glitch and we are trying to find where it is. I will get back with more information.