News feed filter video, pictures and text

Hi All

I’m trying to setup a news feed reader, with all the news from the Danish National TV and radio station. The feed is a mix of text and pictures or text and video, my problem is that I cant isolate the video so at some points there will be a “Can’t find Systems…” picture. Is there a way to show both video and pictures in a news feed?

News feed

HI @kasper,

In order to do this, the method is to have a unique collection, using your XML as a data feed, and in the Template of that collection, have both a text, an Image Asset and a Video Asset, with every element bound as source for both Assets.

Then, using a binding and a custom converter between the filename and the visibility of each asset, only display the one that is relevant.

For instance, in your converter, if you detect your media file path from your feed ends up with “.jpg” it’s an image, so you show the Image Asset and hide the Video and Text ones. If the file path ends up with “.mp4”, show the Video one and hide the 2 others and so on.

We have an article explaining this for an Excel Data Feed here but it’s the same principle for an API feed as source.

Kind regards,

Alex.

2 Likes

Hi Alex

That works BUT I have another API from another customer were the video, jpg URL i separated


Here I’m using a “Text Concatenation” but If a have an API that gets updated daily how will this work then I guess that it cant be updated then?

Hi @kasper,

Unfortunately, as of today, converters can only accept 1 dynamic input (the binding source), so you won’t be able to have 2 dynamic inputs and concatenate them using a converter in a collection.
In this particular case, I would assume that the base URL is not supposed to change and would use enter its value manually in a concatenate Text Manipulation converter.

If this media needs to be displayed only once in a scene and not inside a template in a collection, then you can use a Text Manipulation Interface Asset (not converter) and use these 2 dynamic inputs to create 1 output.

1 Like

Is it possible to add 2 scripts for the same file? I’m thinking if it’s not a .mp4 but an .mov depending on what system they use?

You can only add 1 converter on top of a binding, if that’s the question, but if your data template is a group, you could have a hidden text used as a proxy to store the result of convert #1, then use converter #2 with that proxy text as the input.

1 Like