Hi Team,
I’m using GraphQL Admin API based on documentation add-media-to-a-product ,but I always get an error Invalid video, if I use domains that are not YouTube or Vimeo URL it works, seems like Shopify does not allow other domain names. or is there a place were I should specify allowed domain names . I also tried to use media content type: VIDEO same result (original source juts a sample video and i tried many different URL’s and supported format that should be mov or mp4 …)
mutation createProductMedia {
productCreateMedia(productId: "gid://shopify/Product/1", media: [
{
originalSource: "http://thinkingform.com/wp-content/uploads/2017/09/video-sample-mp4.mp4",
alt: "video-sample-mp4",
mediaContentType: EXTERNAL_VIDEO
}
]) {
media {
... fieldsForMediaTypes
mediaErrors {
code
details
message
}
mediaWarnings {
code
message
}
}
product {
id
}
mediaUserErrors {
code
field
message
}
}
}
fragment fieldsForMediaTypes on Media {
alt
mediaContentType
preview {
image {
id
}
}
status
... on Video {
id
sources {
format
height
mimeType
url
width
}
}
... on ExternalVideo {
id
host
originUrl
}
... on Model3d {
sources {
format
mimeType
url
}
boundingBox {
size {
x
y
z
}
}
}
}