!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={6689:e=>{e.exports=require("react")}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{o.r(r),o.d(r,{default:()=>l});var e=o(6689),t=o.n(e);const n=require("video.js");var i=o.n(n);require("video.js/dist/video-js.css");const a=({videoSrcURL:e,videoTitle:o})=>t().createElement("div",{className:"video"},t().createElement("iframe",{width:"100%",height:"720",title:o,src:e,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}));class s extends t().Component{componentDidMount(){this.player=i()(this.videoNode,this.props)}componentWillUnmount(){this.player&&this.player.dispose()}render(){return t().createElement("div",{"data-vjs-player":""},t().createElement("video",{ref:e=>this.videoNode=e,className:"video-js vjs-big-play-centered"}))}}const l=({url:e})=>{let o=null;if(e)if((()=>{let t=null;return t=!!e.match(/.m3u8/),t})()){const r={autoplay:!0,controls:!0,fluid:!0,sources:[{src:e,type:"application/x-mpegURL"}]};o=t().createElement(s,r)}else o=t().createElement(a,{videoSrcURL:e});else o=t().createElement("span",{className:"no-video"},"No video URL Provided");return o}})(),r})()));
//# sourceMappingURL=video-stream.js.map