Closed aogaili closed 9 months ago
Hello, unfortunately, I can't help if you tell me more details:
In case you want to detect the poster from the video tag, you should use the metascarper-video package.
I'm using the API directly, I fixed it manually I think in my code, but I was running into issues with Meteor so went back to the API
export const getMetadata = async (url) => {
const mql = require('@microlink/mql');
const { status, data } = await mql(url)
console.log(data)
return mql.render(data);
};
Glad you fixed 🙂
@Kikobeats I fixed when I was using the packages myself but not through the API of microlink.
My question, is there an option to fix this when I make the API call? Say disable video for example.
You can create a data rule that overrides the default value obtained or create a new one: https://microlink.io/docs/mql/data/attr
Can you please share an example for the video tag? I still don't understand why the API is returning a video tag when the source is clearly an image.
On Fri, Sept 15, 2023, 6:11 a.m. Kiko Beats @.***> wrote:
You can create a data rule that overrides the default value obtained or create a new one: https://microlink.io/docs/mql/data/attr
— Reply to this email directly, view it on GitHub https://github.com/microlinkhq/open/issues/47#issuecomment-1721023409, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMZAK63C3AY5CU6I2Q3D4TX2QSWHANCNFSM6AAAAAA4ZNEJ3Y . You are receiving this because you authored the thread.Message ID: @.***>
Sorry can help without knowing this first:
@Kikobeats my apologize, the issue was with the rendering of the data rather than the data coming from the API. Issue closed.
No worries, thanks for writing back 🙂
Prerequisites
package.json
.Subject of the issue
API returns images wrapped in a video tag which causes rendering issue
Steps to reproduce
Pass any URL to API and when the
Expected behaviour
Should return image, not video tag if the source is images.
Actual behaviour
Returning video tags instead of images.