troodle-expcontent/test.html
Kumi 5b45d9ea82
feat(exp360): add EXP360 module for embedding 360° content
Introduce the EXP360 activity module to embed interactive 360° content
in Moodle. This update includes:

- Database schema for the exp360 table.
- Language support for the module.
- Frontend form to create exp360 activities.
- Script to handle 360° content embedding within a modal.
- Two new PHP scripts to display and serve 360° content.
- Version and plugin initialization.

These changes allow users to seamlessly integrate and interact with
360° content within Moodle courses.
2024-07-05 11:13:58 +02:00

50 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<style>
html, body {
overflow: hidden;
}
</style>
</head>
<body>
<script src='https://cdn.exp360.com/embed/js/exp360-embed-3.8.59.js?v=3&d=d667dff2-97bb-437e-85d2-f7550d87a4d0&p=web'></script>
<script>
function startContent() {
exp360.openContent('{1513cf9a-d385-4793-b97e-d7626ab6c12a}', { popup: false,autorotate:true,autorotate_speed:5,autorotate_delay:2500,teleport_animation:false });
}
var currentUrl = window.location.href;
var url = new URL(currentUrl);
var searchParams = new URLSearchParams(url.search);
var params = {};
searchParams.forEach((value, key) => {
params[key] = value;
});
function initialize() {
// Create a new div element
var newDiv = document.createElement("div");
// Set the required attributes
newDiv.setAttribute("data-exp360-type", "player");
var contentId = params['contentid'] || '1513cf9a-d385-4793-b97e-d7626ab6c12a';
newDiv.setAttribute("data-exp360-id", contentId);
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
// Set the data-exp360-params attribute with the current window width and height
newDiv.setAttribute("data-exp360-params", `width=${windowWidth};height=${windowHeight};`);
// Append the new div to the body (or another desired parent element)
document.body.appendChild(newDiv);
}
window.onload = initialize;
</script>
</body>
</html>