Back to the Shapespark home page

Add button to lower right for a youtube movie?

Is there a way with the body-end.html to add a button that upon click opens a youtube video in a window in the scene?

A custom menu button can be added like this.
To open a window popup in a scene when a button is clicked check Displaying HTML pop-ups section of the API documentation.

Okay, I haven’t had any luck trying to cobble together code from the post. If there is anyone out here with some coding knowledge that can help, I assume it wouldn’t take more than 15 minutes max to code, then please message me and let me know the cost and we can take it from there. Thanks!

Perhaps the code could be pasted just like the link jan sent but change the url to be a YouTube one?

  var viewer = WALK.getViewer();
  var button = viewer.addMenuButton(
  button.addEventListener('click', function() {
          'LINK_GOES_HERE', true)

Replace LINK_GOES_HERE with:
The src part of a YouTube iframe (On a YouTube page, Click share, then Embed button)?
<iframe width="560" height="315" src="****" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Perhaps the direct share link from clicking Share?

1 Like

Ill try this now, thank you!!