google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.85k stars 809 forks source link

Not able to pause the video after createVideoTexture #4261

Closed Akhil-coditas closed 1 year ago

Akhil-coditas commented 1 year ago

so i have feature when on a press of button i need to pause the video that is being rendered on .glb also rewind and resume it.

image

this is how im rendering the video texture

and regarding pausing the video

  var modelViewer = document.querySelector("#model-viewer");
     modelViewer.pause();

also used

  const sceneSym = Object.getOwnPropertySymbols(modelViewer).find(x => x.description === "scene");
  const scene = modelViewer[sceneSym]
  console.log(scene);

but can i pause video using scene ? if yes can you provide me a snippet if possible

but it doesn't work. is there a way i can get access to three js being used in model viewer then pause it ? or any other recommended way?