UNPKG

@omnia/fx-models

Version:
38 lines (37 loc) 1.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MediaPickerMicrosoftStreamProvider = void 0; const Constants_1 = require("../../Constants"); const Enums_1 = require("../../Enums"); const ManifestIds_1 = require("../../ManifestIds"); const Icon_1 = require("../../Icon"); class MediaPickerMicrosoftStreamProvider { constructor() { this.hasEditorForMedia = (media) => { let result = false; if (media) { const videoUrl = media.videoUrl; if (videoUrl && videoUrl.startsWith("https://web.microsoftstream.com")) { result = true; } else { const sharepointContext = window.omnia.sharepoint; if (videoUrl && videoUrl.indexOf(sharepointContext.authorityUrl) >= 0) { result = true; } } } return result; }; this.id = Constants_1.Constants.ux.components.mediaPicker.providerIds.microsoftStream; this.category = "video"; this.name = "Omnia.Ux.MicrosoftStreamProvider.Title"; this.icon = new Icon_1.FabricIcon("ms-Icon ms-Icon--StreamLogo"); //this.providerElementName = "omfx-media-picker-microsoft-stream-provider"; this.providerComponentId = ManifestIds_1.OmniaWebComponentManifests.FxUxMicrosoftStreamProvider; this.sortOrder = 50; this.selectableMediaTypes = [Enums_1.MediaPickerEnums.OmniaMediaTypes.Video]; this.supportGalleryFeature = true; } } exports.MediaPickerMicrosoftStreamProvider = MediaPickerMicrosoftStreamProvider;