Integration H5P video in the simple php page

I would like to locally integrate h5p video in a simple page, embedded type = div. System: OS X 10.10.5, Apache 2.4, PHP 5.3

I have the following structure:

test-h5p/h5p-php-library/ - directory with h5p-php-library

test-h5p/h5p-content/ - directory with files from  unziped .h5p file.

 test-h5p/h5p-content/conten/ - content with videos and images

 test-h5p/h5p-content/conten/1/ - content for id=1

test-h5p/h5p-content/exports/ - directory for .h5p files

test-h5p/h5p-content/libraries/ - js and css files from unziped .h5p file

test-h5p/h5p-content/temp/ - temp directory

test-h5p/h5p-video.php - file with links to js and css files and window.H5PIntegration variable.

But i can not see this video. Could someone help me.

Errors in browsers console:

1) h5p.js?ver=1.7.2:925 Unable to find constructor for: H5P.InteractiveVideo 1.10

2) h5p.js?ver=1.7.2:1045 Uncaught TypeError: Cannot read property 'getCopyrights' of undefined

Attached: .h5p file and h5p-video.php (as h5p-video.php_.txt)

Thanks.

 P.S. I have already installed plug-in for Wordpress and have used this code.

Attached h5p-video.php_.txt

Attachments: 
fnoks's picture

Hi,

The problem is the H5P.InteractiveVideo JavaScript is not loaded. I am not sure why, but could you try to move the script tag inside body to the head?

Thanks for the answer. But the script for the H5P.InteractiveVideo already inside the head:

<script type="text/javascript" src="http://localhost/test-h5p/h5p-content/libraries/H5P.InteractiveVideo-1.1..."</script> <script type="text/javascript" src="http://localhost/test-h5p/h5p-content/libraries/H5P.InteractiveVideo-1.1..."</script> <link rel="stylesheet" href="http://localhost/test-h5p/h5p-content/libraries/H5P.InteractiveVideo-1.1..." type="text/css" media="all">

 

fnoks's picture

Inside the body tag you have a script tag (where you define window.H5PIntegration). Could you please move that to the head?

PS: Interactive Video is displayed inside an iframe, which means the files needed by IV must be loaded inside the iframe. This should be taken care of by H5P as long as the H5PIntegration object is correctly defined.

I want to integrate H5p interactive vedio editor in codeigniter 3 project. can I have documentation or smaple code