UNPKG

@omnia/fx-models

Version:
36 lines (35 loc) 2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MediaPickerMediaflowProvider = void 0; const Constants_1 = require("../../Constants"); const Enums_1 = require("../../Enums"); const ManifestIds_1 = require("../../ManifestIds"); const Icon_1 = require("../../Icon"); class MediaPickerMediaflowProvider { constructor() { this.hasEditorForMedia = (media) => { let result = false; if (media) { const videourl = media.videoUrl; if (videourl && videourl?.startsWith("https://play.mediaflowpro.com") || videourl?.startsWith("https://m.mediaflow.com/mp4")) { result = true; } } return result; }; this.id = Constants_1.Constants.ux.components.mediaPicker.providerIds.mediaflow; this.category = "image"; this.name = "Mediaflow"; this.icon = new Icon_1.SvgIcon(` <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 183 86"> <g transform="translate(-1)"> <path d="M159.343,80.229a18.849,18.849,0,0,1-15.86-8.608l-6.8-10.149,7.067-10.544a18.82,18.82,0,1,1,15.6,29.3Zm0-43.285A24.709,24.709,0,0,0,138.936,47.7l-5.741,8.569L107.086,17.314,88.232,45.448,57.773,0,1,84.715H7.972L57.773,10.4,84.746,50.65,61.907,84.715h6.973L88.232,55.852,98.16,70.664h6.973L91.719,50.649l15.368-22.932,22.622,33.754L114.13,84.715H121.1l12.092-18.042,5.44,8.117a24.613,24.613,0,1,0,20.708-37.846Z" fill="#fff" fill-rule="evenodd"/> </g> </svg>`); this.providerComponentId = ManifestIds_1.OmniaWebComponentManifests.FxUxMediaflowProvider; this.selectableMediaTypes = [Enums_1.MediaPickerEnums.OmniaMediaTypes.Image, Enums_1.MediaPickerEnums.OmniaMediaTypes.Video]; this.sortOrder = 41; this.supportGalleryFeature = true; } } exports.MediaPickerMediaflowProvider = MediaPickerMediaflowProvider;