Support » Plugin: Ooyala » Plugin doesn’t work in the contant is loaded via AJAX

  • Hi Guys

    I am trying to load post content via AJAX / rest api into a page and the way you have code your shortcode this doesn’t work

    The problem is that you assume that page content is loaded as single stream and in the first call to the shortcode on a page you inject the needed script call to load the JS from your servers. These calls are not run if the rendered shortcode is add into the DOM via JS.

    So before I fork your plugin I thought I would ask you if you can help. I understand why you loaded the code.

    I think that best way to fix this would be to add a filter to stop loading the need JS inline script call as part of the first shortcode and then loads in the page head/( footer if passable ).

    With that filter I can force the script to be pre-loaded in a page ready for me to insert content with the video tags.

    while you are added this filter please add one the target div so I can override the ID as ooyalaplayer-(number of shortcode run) ends up with ooyalaplayer-1 being loaded more than once on a page

    I suspect that a more and more site start to use the Rest API to load content this will become a bigger and bigger problem with the way you have code the plugin.

    I am happy to work with you on this and this all makes sense if not reach out and I will demo the issues

    Paul

    Paul

  • The topic ‘Plugin doesn’t work in the contant is loaded via AJAX’ is closed to new replies.