Video picker
Setting type video_picker dùng để xuất ra bộ chọn video được lấy từ phần filecủa trang quản trị Shopify. Người bán cũng có tùy chọn tải lên video mới.
Setting
{
id: "video_picker",
type: "video_picker",
label: "video_picker",
default: {},
},
Giao diện
Khi truy cập giá trị của video_picker dữ liệu được trả về dưới dạng :
{settings.video_picker}
Output
Entity
export interface VideoItem {
id: string;
url: string;
videoThumbnail: string;
width: number;
height: number;
fileName: string;
mimeType: string;
extension: string;
}
Ví dụ
{
id: '1',
url: 'https://example.com/your-video.mp4',
videoThumbnail: 'https://example.com/thumbnail.jpg',
width: 1280,
height: 720,
fileName: 'video',
mimeType: 'video/mp4',
extension: 'mp4',
};