Skip to content

Instantly share code, notes, and snippets.

@mandrasch
Created August 12, 2017 12:09
Show Gist options
  • Save mandrasch/c307bcd5c9982ebafbde57495e86f247 to your computer and use it in GitHub Desktop.
Save mandrasch/c307bcd5c9982ebafbde57495e86f247 to your computer and use it in GitHub Desktop.
h5p-standalone, edited demo/index.html
<html>
<head>
<link type="text/css" rel="stylesheet" media="all" href="dist/styles/h5p.css" />
<meta charset="utf-8" />
<title>H5P Webview test</title>
<script type="text/javascript" src="dist/js/h5p-standalone-main.js"></script>
<script type="text/javascript">
(function($) {
$(function() {
console.log('jquery is ready');
$('.h5p-container').h5p({
frameJs: 'dist/js/h5p-standalone-frame.js',
frameCss: 'dist/styles/h5p.css',
h5pContent: 'workspace'
});
});
})(H5P.jQuery);
</script>
</head>
<body>
H5P Demo:
<div class="h5p-container"></div>
<!-- h5p is loaded above, this one is just for test purposes of video playing -->
<!-- This would be the path h5p is generating, not working -->
<video width="320" height="240" controls>
<source src="file:///android_asset/www/workspace/content//videos/files-598b7e3281cde.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<!-- This works -->
<video width="320" height="240" controls>
<source src="workspace/content/videos/files-598b7e3281cde.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>
@kamalshah12
Copy link

<iframe src="https://h5p.org/h5p/embed/225732" width="1090" height="310" frameborder="0" allowfullscreen="allowfullscreen"></iframe><script src="https://h5p.org/sites/all/modules/h5p/library/js/h5p-resizer.js" charset="UTF-8"></script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment