Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
I have a JSON file which returns a 6 digit code which related to the 6 digit name of an image - 123456.jpg Is there a way I can use the digits to load an image in a xaml title e.g. http://website.com/images/{0}.jpg where {0} is image1, image2, image3,... from the JSON file returning 123456, 678910, 111213, etc
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/20/2014(UTC) Posts: 2,721 Location: Bordeaux, France Thanks: 243 times Was thanked: 794 time(s) in 589 post(s)
|
Hi
I don't know if XPath was fully implemented in vMix but you should try
concat(value,".jpg")
in the XPath query
Guillaume
|
1 user thanked DWAM for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Quote:http://website.com/images/{0}.jpg Have you actually tried it first ? because yes (using datasources )
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
I did yes but it threw up an error. I will try replicating what I did to see what the error was - it may have been to do with the xaml file. I just made something basic in Title Designer with a single image.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Try first maybe with an existing vMix title to check your datasource
in fact when the datasource is correct during setup you also should see the correct link appear when you specify the field
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
I have managed to check it can pull from the data source using the method http://website.com/images/{0}.jpg I have put it in manually using the title editor on the title but I need to work out how to edit the xaml so that the image source is the value "image" as listed in the JSON file - This will then hopefully pull the value under "image" as {0}
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
If i understand correctly what you are trying to do , you can not use {0} in the xaml code as is any image placeholder in a title can hold any image For manual input you need to write the full link
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
I managed to get it to work, it was something to do with the way i had setup the image within the xaml file.
I also wanted to do the same with some .svg image files but i don't think they are supported by vMix.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close