Skip to main content
Participant
July 13, 2020
Question

Is it possible to change embedMode without creating a new view(and have it work properly)?

  • July 13, 2020
  • 2 replies
  • 347 views

hi! I'm still learning on how to use the view sdk. however, I've encountered a problem.

Everytime when I want to switch the embedMode, I have to create a new view object in my js script to have it work properly, otherwise. the config will just be screwed up and the embed mode switch will be looking weird. 

so I just wanna ask here, do we need to create a new view everytime we want to change the embedMode? or is it possible to just:

viewobj.previewFile({
content: {...},
metaData: {...},
}, {embedMode:"anything I want"});
change it like this and have everything work correctly? because I couldn't get it working.

 

This topic has been closed for replies.

2 replies

Joel Geraci
Community Expert
Community Expert
July 15, 2020

I'm curious to understand why you want to change view modes. What exactly are you trying to accomplish?

Adobe Employee
July 13, 2020

Hi, Thanks for using View SDK, Yes you need to make a new object every time you need to preview file, as one object binds to a single instance of Preview.