Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width" /> | |
| <meta name="twitter:card" content="player"/> | |
| <meta name="twitter:site" content=""/> | |
| <meta name="twitter:player:width" content="100%"/> | |
| <meta name="twitter:player:height" content="100%"/> | |
| <meta property="og:title" content="Test Model Viewer"/> | |
| <meta property="og:description" content="Embedded App"/> | |
| <meta property="og:image" content="https://Omnibus-test-model-viewer.static.hf.space/card_im.png"/> | |
| <style> | |
| /* | |
| <meta name="twitter:player" content= "https://Omnibus-test-model-viewer.static.hf.space/test5.html/?" /> | |
| <meta name="twitter:player:stream" content= "https://Omnibus-test-model-viewer.static.hf.space/test5.html/?" /> | |
| .container { | |
| position: relative; | |
| overflow: hidden; | |
| width: 100%; | |
| padding-top: 100%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */ | |
| /*}*/ | |
| .responsive-iframe { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .embed-container { | |
| position: relative; | |
| padding-top: 100%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */ | |
| /*padding-bottom: 70.75%;*/ | |
| height: 0; | |
| overflow: hidden; | |
| } | |
| .embed-container iframe { | |
| position: absolute; | |
| top:0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="embed-container"> | |
| <iframe | |
| id="myIframe" | |
| frameborder="0" | |
| class="container p-0 flex-grow space-iframe" | |
| allow="accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking" | |
| sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads" | |
| ></iframe> | |
| </div> | |
| <script> | |
| const queryString = window.location.search; | |
| const urlParams = new URLSearchParams(queryString); | |
| const model_url = urlParams.get("url"); | |
| console.log(model_url); | |
| let myIframe = document.getElementById("myIframe"); | |
| let url_string = "https://omnibus-model-view.hf.space/"; | |
| let mod_url = model_url; | |
| let adsURL = url_string+"?url="+mod_url; | |
| let metasURL = url_string+"/test6.html/?url="+mod_url; | |
| var link = document.createElement('meta'); | |
| link.setAttribute('name', 'twitter:player'); | |
| link.content = metasURL; | |
| document.getElementsByTagName('head')[0].appendChild(link); | |
| var link_stream = document.createElement('meta'); | |
| link_stream.setAttribute('name', 'twitter:player:stream'); | |
| link_stream.content = metasURL; | |
| document.getElementsByTagName('head')[0].appendChild(link_stream); | |
| console.log(adsURL); | |
| myIframe.src = adsURL; | |
| </script> | |
| </body> | |
| </html> |