logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
JonnyNoblett  
#1 Posted : Wednesday, April 26, 2017 3:26:00 AM(UTC)
JonnyNoblett

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

DWAM  
#2 Posted : Wednesday, April 26, 2017 3:33:27 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
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
thanks 1 user thanked DWAM for this useful post.
JonnyNoblett on 4/26/2017(UTC)
doggy  
#3 Posted : Wednesday, April 26, 2017 5:02:14 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,082
Belgium
Location: Belgium

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Quote:
http://website.com/images/{0}.jpg


Have you actually tried it first ? because yes (using datasources )
thanks 1 user thanked doggy for this useful post.
JonnyNoblett on 4/26/2017(UTC)
JonnyNoblett  
#4 Posted : Wednesday, April 26, 2017 6:04:03 AM(UTC)
JonnyNoblett

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.
doggy  
#5 Posted : Wednesday, April 26, 2017 7:34:17 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,082
Belgium
Location: Belgium

Thanks: 284 times
Was thanked: 920 time(s) in 759 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
thanks 1 user thanked doggy for this useful post.
JonnyNoblett on 4/26/2017(UTC)
JonnyNoblett  
#6 Posted : Wednesday, April 26, 2017 11:58:24 AM(UTC)
JonnyNoblett

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}
doggy  
#7 Posted : Wednesday, April 26, 2017 12:14:39 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,082
Belgium
Location: Belgium

Thanks: 284 times
Was thanked: 920 time(s) in 759 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
thanks 1 user thanked doggy for this useful post.
JonnyNoblett on 4/26/2017(UTC)
JonnyNoblett  
#8 Posted : Wednesday, April 26, 2017 4:31:20 PM(UTC)
JonnyNoblett

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.
Users browsing this topic
Guest
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.