63 lines
2.8 KiB
HTML
63 lines
2.8 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<title><%=data['title']%> - JanusXR</title>
|
||
|
|
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, maximum-scale=1.0, width=device-width" />
|
||
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||
|
|
|
||
|
|
<!--
|
||
|
|
<meta name="theme-color" content="#2f363b">
|
||
|
|
<meta http-equiv="origin-trial" data-feature="WebVR" data-expires="2017-06-12" content="Avy/Fo2QM5trR+WVHnaVz0t3LVltGxx3yvpSYSCC2oklwuDEYUEK6YdnxYv4p687MJGB61q//htZUvSIZPg93goAAABOeyJvcmlnaW4iOiJodHRwczovL3dlYi5qYW51c3ZyLmNvbTo0NDMiLCJmZWF0dXJlIjoiV2ViVlIiLCJleHBpcnkiOjE0OTczMTIwMDB9">
|
||
|
|
<meta name="twitter:card" content="summary_large_image" />
|
||
|
|
<meta name="twitter:site" content="@bai0" />
|
||
|
|
<meta name="twitter:title" content="JanusWeb" />
|
||
|
|
<meta name="twitter:description" content="The World Within The Web" />
|
||
|
|
<meta name="twitter:image" content="https://janusxr.org/backgrounds/wallpapers/generic.png" />
|
||
|
|
<meta name="twitter:image:alt" content="JanusWeb" />
|
||
|
|
<meta property="og:app_id" content="1197654320349894" />
|
||
|
|
<meta property="og:url" content="https://web.janusxr.org/" />
|
||
|
|
<meta property="og:type" content="website" />
|
||
|
|
<meta property="og:title" content="JanusWeb" />
|
||
|
|
<meta property="og:description" content="The World Within The Web" />
|
||
|
|
<meta property="og:image" content="https://janusxr.com/backgrounds/wallpapers/generic.png" />
|
||
|
|
-->
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<janus-viewer homepage="/" autostart="false" showavatar="false">
|
||
|
|
<%=jml%>
|
||
|
|
</janus-viewer>
|
||
|
|
<!-- archive.org hints -->
|
||
|
|
<% $links.each do |link| %>
|
||
|
|
<a href="<%=link%>"></a>
|
||
|
|
<% end %>
|
||
|
|
|
||
|
|
<!-- map URL query args to room-attributes -->
|
||
|
|
<script>
|
||
|
|
args = new URLSearchParams(document.location.search)
|
||
|
|
for( const [k,v] of args.entries()) document.querySelector("Room").setAttribute(k,v)
|
||
|
|
</script>
|
||
|
|
<script src="<%=janusweb_src%>"></script>
|
||
|
|
<script>
|
||
|
|
let serveruri = "ws://"+document.location.hostname+":5566"
|
||
|
|
let corsproxy = document.location.origin.replace(/:[0-9].*/,'')+":5577/"
|
||
|
|
if( document.location.protocol.match(/https/) ){
|
||
|
|
corsproxy = corsproxy.replace(/\/\//,"//cors.").replace(/:[0-9].*/,"/")
|
||
|
|
serveruri = serveruri.replace(/ws:\/\//,"wss://presence.").replace(/:[0-9].*/,"")
|
||
|
|
}
|
||
|
|
elation.config.set("engine.assets.corsproxy", corsproxy )
|
||
|
|
elation.config.set("janusweb.network.host", serveruri )
|
||
|
|
elation.janusweb.init({
|
||
|
|
uiconfig: `/janusweb/media/assets/webui/${ args.get("networking") == "false" ? "preview" : "default"}.json`,
|
||
|
|
// for more opts see getClientArgs() in
|
||
|
|
// https://github.com/jbaicoianu/janusweb/blob/master/scripts/client.js
|
||
|
|
})
|
||
|
|
.then( (client) => {
|
||
|
|
elation.janusweb.init = function(){} // prevent multi-inits
|
||
|
|
})
|
||
|
|
</script>
|
||
|
|
|
||
|
|
</body>
|
||
|
|
</html>
|