Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<div>
  Player Photosphere
</div>
<div>
  <iframe
    id="foo"
    width="640"
    height="360"
    src="https://mediacloudapi-cea.azurewebsites.net:/api/media/play.html?PlayerUid=h5c530c2c88b87&MediaUid=3849fd81-2df1-4b12-9f1f-05208eb4a7a8&Width=640px&Height=360px&Share=false&chromeless=true"
    allow="autoplay; fullscreen"
    frameborder="0"
    scrolling="no"
    allowfullscreen="true"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
   ></iframe>
</div>
<div>
  <h4>Controls</h4>
  <div>
    <button
      onClick="sendPlayerEvent('zoomOutPhotosphere')"
    >
      Zoom moins
    </button>
    <button
      onClick="sendPlayerEvent('zoomInPhotosphere')"
    >
      Zoom plus
    </button>
    <button
      onClick="sendPlayerEvent('playPhotosphere')"        
    >
      Play
    </button>
    <button
      onClick="sendPlayerEvent('pausePhotosphere')"
    >
      Pause
    </button>
  </div>
</div>
</body>
</html>
 
function sendPlayerEvent(name) {
  var iframe = document.getElementById('foo');
  if (iframe && iframe.contentWindow) {
    iframe.contentWindow.postMessage(
      {
        name: name,
      },
      '*'
    )
  }
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
K0d1Lupro
0viewers