How to render h5p content in mobile app

Hi, 

I'm new to h5p and wondering what my option are to display h5p content in a mobile app. 
The app will be connected to a WordPress installation and will pull the content from there. 
I don't need to be able to edit/create content in the app, just display it to the students and make sure all their responses are recorded back to the LRS installed on the WP site. 

Ideally, I'd also want it to be possible for students to somehow download/cache the h5p content so that they can use it offline and then have their progress synced when they regain a connection. I understand that will likely be more complex, but I'd like to know more about what would be involved there. 

For instance, would I have to create a local web server within the app on their phone or is there a cleaner way to accomplish this? I know in theory H5P will eventually develop some better solutions here, but "we'll work on it" seems to be the answer given since at least 2015 so I'm not sure I can afford to wait for them to figure it out. 

Any insights or experiences anyone has would be greatly appreciated!

otacke's picture

Hi tangible!

Viewing H5P content needs some form of implementation of the H5P library (while editing would also require the H5P editor library) and some form of host environment plugin (e.g. WordPress). The H5P library is responsible for loading and displaying existing content and to collect the results. The plugin is basically responsible for storage and retrieval of content, libraries, scores, etc. Both components are independent of one another and communicate using an interface.

So far, the library and the plugins that I am aware of are written in PHP. I know about some efforts to port things to other platforms (e. g. .NET), but I don't know about the particular status. You would probably have to be port the library to Java, Swift or whatever you have in mind (unless you're running some form of PHP inside your app) and to implement the interface to your mobile platform (be it tailored to your app in particular or maybe as a library to the OS in general).

Best,
Oliver

Thanks Oliver, 

Wouldn't porting the library cause issues in terms of updates since updates to the library would not be synced to the port unless we continuously update it ourselves?
That could be acceptable if the file format remains relatively stable and breaking changes aren't too frequent I suppose. 

otacke's picture

Hi tangible!

That's correct. The file format is pretty stable except for some upcoming additions. We try not to touch core, but things can change from time to time, of course. We're working on some form of developer support in order to tackle those issues (early notifications about planned changes, change notes, etc.), but that will take some more time.

Cheers,
Oliver

I have a mobile app which is written in react native. Can I just show an in-app browser and load the content from a php host to display and collect answers of each student with xAPI and LRS?