the player is typically inserted into the post content, so I guess the HTML markup for it should show up in your app just fine.
Is your app able to render web content in the iframe tag? In that case the FV Player iframe embed codes could be used for video in the REST response for the app.
Were you using our iframe embedding button to generate the code or did you use the video URL?
I used the default video url and the embed code.
The default was used on the one where the video did display, the player just doesn’t look normal.
The test page is where I added the embed code.
The page that says Video: Jesus Light of the World is where the player just added words over the image.
I added snapshots so you can see from the backend of the mobile app creator.
The problem is we use fv player to override the default wordpress player and a podcast plugin to use custom meta to add the video to our podcast playlist type I added an image of that as well.
Could you please confirm that you have used the iframe embed code and not the old embed script? (examples are in this guide)
1) this is tricky to figure out, could you please check how is the mobile app rendering the content it reads from the REST API? I’m guessing it only reads the post content, so any scripts which initialize the player won’t take effect as they are in footer. Can you get some specs from that from your developers of from documentation of the framework which you are using?
2) Will the app not render iframe such as this one properly?
<iframe src="http://lucia.foliopress.net/quality-switching/fvp/" allowfullscreen width="848" height="479.67088607594934" frameborder="0" style="max-width:100%"></iframe>
3) Can you include a link to the REST API for us to see what is actually there?
Hello again, you guessed it the only thing loaded is the content. Footer, Sidebar, Header all gone. We are using this: https://apppresser.com/
The docs are under resources.
and here is our API: https://christianjournal.net/wp-json/wp/v2/posts
Plus here is the other API we are using for podcasts: https://christianjournal.net/wp-json/wp/v2/podcast
Also they use this: http://v2.wp-api.org/
here if says that iframe should work: http://docs.apppresser.com/article/288-custom-html-pages
What video types are you using? If it’s just plain MP4/HLS videos perhaps you should try to use
tags and see if the app work with it. Otherwise I recommend you ask the app support about iframe and why it won’t show for you when you use it as part of the post content.
are you able to put a script tag into it? Then you should try:
You haven’t answered the question about what video types you are using though, if it’s something that only plays with FV Player Pro, then that would have to be included too. So I suggest you do your first test with a simple MP4 file, like https://foliovision.com/videos/dominika-960-31.mp4
I see it gets more and more tricky. I see now that the mobile app is not loading the FV Player CSS (as why would it? it doesn’t load the head section of HTML) – if you can add FV Player CSS from your site, there should a file like this: https://your-site.com/wp-content/fv-flowplayer-custom/style-1.css
To make YouTube and Vimeo play you will also have to take the fv_player_pro.min.js file and include it the same way as you did with fv-flowplayer.min.js – you can just add in another script tag or another loadScript() call, depends on what’s working.
However you will also have to set the fv_player_pro config variable. Please see the HTML code of any of your pages where a Vimeo video is embedded and you should be able to copy that whole
To step back a bit here and see the big picture (implementation of FV Player via the WordPress REST API), here’s what I’d do.
i.e. I’d have my application check for the presence of FV Player in the content first.
If no player, then I’d not add or change anything to my existing app (assuming everything is working fine for content display).
If FV Player is present, then I’d include the normal CSS files and the JS files required for FV Player.
Martin will package up the full set of dependencies in one nice package for people using the WordPress REST API.
If you come up with some clever implementations of video via WordPress REST API, let us know so we can support them better and share them with the WordPress REST API community.
I’m a big supporter of the WordPress REST API but we haven’t come up with a use case for ourselves where it’s more useful than writing plugins to the existing CMS. As WordPress becomes more and more top heavy (Customizer, Gutenberg), I can see the REST API becoming more and more attractive for WordPress front end development.
Hello again Martin is this the correct html to copy? I’m still working on the CSS additions you mentioned. Thank you so much for your help!!!
You should be able to get a hint about this from the mobile app developers if it has support. Based on that we can provide some documentation on how to do this.
Hey Alec, I am so sorry it has taken me so long to respond. Things have been quite crazy with the Holidays. That all sounds good to me, the only thing is, almost all of our reports (posts) use at least one instance of the player. I look forward to the rest api package from Martin!
Thank you so much and hope you had a good holiday!
could you please ask the mobile app developers what is the proper way of including extra CSS and JS? Can you link in individual CSS files using tag and can you include script tags?
Or are you limited to entering inline CSS and inline scripts? Please check one of my previous posts where I posted exact instructions – which of these worked? https://foliovision.com/support/fv-wordpress-flowplayer/how-to/accessing-video-player-through-wordpress-rest-api/#post-61928
Hello again! I actually have figured it out.
So there is a setting in the FV Player settings that sets the default player size, ours is set to 100% width x 600 height. As I change this setting it changes the entirety of the player.
If I set 250 for height it looks correct! However, when I adjust this setting it also changes the player size on desktop and when it replaces the wordpress player.
See here: https://christianjournal.net/video/hannity-the-media-are-addicted-to-hating-trump/
(Just a side note I have changed the setting back so you’ll have to see the attached screen shot.)
How can I go about setting this once for default and another for mobile etc?
In addition, and I think this maybe java, the full screen option is failing to work on the preview app but there are too many variables to debug I need to see the app finished to further detail what exactly is causing the error. I added all java files to the theme folder of the respective mobile app, but I need a function to hook them in, which we can fix later if it is still an error.
Hey Martin to respond to your question I asked the same thing how can I hook the files, here is what the dev sent me.
You can learn about enqueuing files/code to the header here and here.”
the is currently now way of setting one sitewide default width and height for desktop and one for mobile. You could only enforce it using the “fv_flowplayer_args_pre” filter if you can detect the mobile there: https://foliovision.com/player/advanced/api-programming -> Available WordPress filters
If you mean the REST API, then it seems you can detect it using this in your if statement:
defined( 'REST_REQUEST' )
So I’m a bit confused, is the mobile app actually loading one of your WordPress themes in order to work?
Hello Martin, so basically when I purchased the plugin for the mobile app it came with both a functional plugin which grabs the files and posts and then a theme which is deactivated but utilized specifically for the mobile app.
The theme gets activated only from the mobile app and its a typical wordpress theme, obviously only built for mobile display though.
About the request for screen default, I think we will have to wait until I publish the app to make an adjustment because the preview app that I am currently using is, i think, only requesting the desktop browser size because even youtube videos display funny.
I placed the Java and CSS files directly into the theme files and then placed the Java into the folder that we talked about earlier for custom Java.
So I am just finishing up the app for beta and then i’ll submit it to google and we should be able to debug more from there. Martin you have been an incredible help!
Hello again! Well good news is that the app has been released so you can see what I am talking about by downloading it. We are on version 0.01 and it’s going to be a road to 1.0 but for now the video player is being requested through Iframe and when the iframe is requested we still get the two black boxes one on top and one on bottom. In addition, the full screen doesn’t work, but the player plays which is really good news!
To download: https://play.google.com/store/apps/details?id=com.thechristianjournal.app
What I noticed is that when you turn the phone sideways the css malfunction corrects itself and plays correctly. The only issue is when you see the player in a vertical manner.
You can just try to hide .fp-ratio in your mobile app CSS and see if it helps.
Hello we are developing a mobile app and would like to know if your plugin’s features are available through the WordPress REST API? If so, how can the features of the player be requested and accessed? Thanks for your time,