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

New Here ,
Jul 13, 2020 Jul 13, 2020

Copy link to clipboard

Copied

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.

 

TOPICS
View SDK

Views

88

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 13, 2020 Jul 13, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines