diff --git a/Childrens-Social-Care-CPD-Tests/Contentful/EntityResolverTests.cs b/Childrens-Social-Care-CPD-Tests/Contentful/EntityResolverTests.cs index 029b897c..7923ca9d 100644 --- a/Childrens-Social-Care-CPD-Tests/Contentful/EntityResolverTests.cs +++ b/Childrens-Social-Care-CPD-Tests/Contentful/EntityResolverTests.cs @@ -14,6 +14,7 @@ public class EntityResolverTests [TestCase("areaOfPracticeList", typeof(AreaOfPracticeList))] [TestCase("applicationFeature", typeof(ApplicationFeature))] [TestCase("applicationFeatures", typeof(ApplicationFeatures))] + [TestCase("audioResource", typeof(AudioResource))] [TestCase("columnLayout", typeof(ColumnLayout))] [TestCase("content", typeof(Content))] [TestCase("contentLink", typeof(ContentLink))] diff --git a/Childrens-Social-Care-CPD-Tests/Contentful/PartialsFactoryTests.cs b/Childrens-Social-Care-CPD-Tests/Contentful/PartialsFactoryTests.cs index 0f5e6e54..38615a45 100644 --- a/Childrens-Social-Care-CPD-Tests/Contentful/PartialsFactoryTests.cs +++ b/Childrens-Social-Care-CPD-Tests/Contentful/PartialsFactoryTests.cs @@ -13,6 +13,7 @@ public partial class PartialsFactoryTests { new object[] { new AreaOfPractice(), "_AreaOfPractice" }, new object[] { new AreaOfPracticeList(), "_AreaOfPracticeList" }, + new object[] { new AudioResource(), "_AudioResource" }, new object[] { new ColumnLayout(), "_ColumnLayout" }, new object[] { new Content(), "_Content" }, new object[] { new ContentLink(), "_ContentLink" }, diff --git a/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj b/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj index ff2ed3ba..6527a82c 100644 --- a/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj +++ b/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj @@ -21,7 +21,6 @@ - diff --git a/Childrens-Social-Care-CPD/Contentful/EntityResolver.cs b/Childrens-Social-Care-CPD/Contentful/EntityResolver.cs index 9f6d8ba1..04d69430 100644 --- a/Childrens-Social-Care-CPD/Contentful/EntityResolver.cs +++ b/Childrens-Social-Care-CPD/Contentful/EntityResolver.cs @@ -17,6 +17,7 @@ public Type Resolve(string contentTypeId) "areaOfPracticeList" => typeof(AreaOfPracticeList), "applicationFeature" => typeof(ApplicationFeature), "applicationFeatures" => typeof(ApplicationFeatures), + "audioResource" => typeof(AudioResource), "columnLayout" => typeof(ColumnLayout), "content" => typeof(Content), "contentLink" => typeof(ContentLink), diff --git a/Childrens-Social-Care-CPD/Contentful/Models/AudioResource.cs b/Childrens-Social-Care-CPD/Contentful/Models/AudioResource.cs new file mode 100644 index 00000000..2fc23da3 --- /dev/null +++ b/Childrens-Social-Care-CPD/Contentful/Models/AudioResource.cs @@ -0,0 +1,10 @@ +using Contentful.Core.Models; + +namespace Childrens_Social_Care_CPD.Contentful.Models; + +public class AudioResource : IContent +{ + public string Id { get; set; } + public Asset Audio { get; set; } + public Document Transcript { get; set; } +} diff --git a/Childrens-Social-Care-CPD/Contentful/PartialsFactory.cs b/Childrens-Social-Care-CPD/Contentful/PartialsFactory.cs index f2321761..515b7177 100644 --- a/Childrens-Social-Care-CPD/Contentful/PartialsFactory.cs +++ b/Childrens-Social-Care-CPD/Contentful/PartialsFactory.cs @@ -16,6 +16,7 @@ public static string GetPartialFor(IContent item) { AreaOfPractice => "_AreaOfPractice", AreaOfPracticeList => "_AreaOfPracticeList", + AudioResource => "_AudioResource", ColumnLayout => "_ColumnLayout", Content => "_Content", ContentLink => "_ContentLink", diff --git a/Childrens-Social-Care-CPD/Controllers/ContentController.cs b/Childrens-Social-Care-CPD/Controllers/ContentController.cs index 21ccfaa4..328b200e 100644 --- a/Childrens-Social-Care-CPD/Controllers/ContentController.cs +++ b/Childrens-Social-Care-CPD/Controllers/ContentController.cs @@ -52,15 +52,16 @@ public async Task Index(CancellationToken cancellationToken, stri } var contextModel = new ContextModel( - Id: pageContent.Id, - Title: pageContent.Title, - PageName: pageName, + Id: pageContent.Id, + Title: pageContent.Title, + PageName: pageName, Category: pageContent.Category, - UseContainers: pageContent.SideMenu == null, - PreferenceSet: preferenceSet, + UseContainers: pageContent.SideMenu == null, + PreferenceSet: preferenceSet, BackLink: pageContent.BackLink); ViewData["ContextModel"] = contextModel; + ViewData["StateModel"] = new StateModel(); return View(pageContent); } } \ No newline at end of file diff --git a/Childrens-Social-Care-CPD/Models/StateModel.cs b/Childrens-Social-Care-CPD/Models/StateModel.cs new file mode 100644 index 00000000..01f0a4ed --- /dev/null +++ b/Childrens-Social-Care-CPD/Models/StateModel.cs @@ -0,0 +1,6 @@ +namespace Childrens_Social_Care_CPD.Models; + +public class StateModel +{ + public bool IncludeMediaPlayer { get; set; } = false; +} diff --git a/Childrens-Social-Care-CPD/Views/Content/Index.cshtml b/Childrens-Social-Care-CPD/Views/Content/Index.cshtml index a6eb0240..64646091 100644 --- a/Childrens-Social-Care-CPD/Views/Content/Index.cshtml +++ b/Childrens-Social-Care-CPD/Views/Content/Index.cshtml @@ -33,10 +33,26 @@ @section SideMenu { @if (Model.SideMenu != null) { - + } } -@_relatedContentRenderer.Render(Model.RelatedContent) \ No newline at end of file +@_relatedContentRenderer.Render(Model.RelatedContent) + +@section Scripts { + @if (ViewData.TryGetValue("StateModel", out var stateModel) && ((StateModel)stateModel).IncludeMediaPlayer) + { + + + } +} + +@section Head { + @if (ViewData.TryGetValue("StateModel", out var stateModel) && ((StateModel)stateModel).IncludeMediaPlayer) + { + + + } +} \ No newline at end of file diff --git a/Childrens-Social-Care-CPD/Views/Resources/Search.cshtml b/Childrens-Social-Care-CPD/Views/Resources/Search.cshtml index 470b432a..467ef725 100644 --- a/Childrens-Social-Care-CPD/Views/Resources/Search.cshtml +++ b/Childrens-Social-Care-CPD/Views/Resources/Search.cshtml @@ -7,10 +7,6 @@ Layout = "_SearchPageLayout"; } -@section Scripts { - -} - @section PageBanner { } diff --git a/Childrens-Social-Care-CPD/Views/Shared/_AudioResource.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_AudioResource.cshtml new file mode 100644 index 00000000..1e8ab5d3 --- /dev/null +++ b/Childrens-Social-Care-CPD/Views/Shared/_AudioResource.cshtml @@ -0,0 +1,27 @@ +@using Childrens_Social_Care_CPD.Contentful.Models; + +@model AudioResource + +@{ + ((StateModel)ViewData["StateModel"]).IncludeMediaPlayer = true; +} + +
+
+ + @if (Model.Transcript.Content != null) + { +
+ View transcript +
+ @{ + await Html.RenderPartialAsync("_RichText", Model.Transcript); + } +
+
+ } +
+
+ diff --git a/Childrens-Social-Care-CPD/Views/Shared/_DefaultPageLayout.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_DefaultPageLayout.cshtml index b802d447..41e3cfb8 100644 --- a/Childrens-Social-Care-CPD/Views/Shared/_DefaultPageLayout.cshtml +++ b/Childrens-Social-Care-CPD/Views/Shared/_DefaultPageLayout.cshtml @@ -7,6 +7,15 @@ @await RenderSectionAsync("PageBanner", required: false) } +@section Scripts { + @await RenderSectionAsync("Scripts", required: false) +} + +@section Head { + @await RenderSectionAsync("Head", required: false) +} + + @await RenderSectionAsync("Hero", required: false)
@RenderBody() diff --git a/Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml index 6204f044..72e812d7 100644 --- a/Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml +++ b/Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml @@ -10,6 +10,7 @@ { } + @await RenderSectionAsync("Head", required: false); diff --git a/Childrens-Social-Care-CPD/Views/Shared/_SubPageLayout.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_SubPageLayout.cshtml index c83b2499..1ed70862 100644 --- a/Childrens-Social-Care-CPD/Views/Shared/_SubPageLayout.cshtml +++ b/Childrens-Social-Care-CPD/Views/Shared/_SubPageLayout.cshtml @@ -7,6 +7,14 @@ @await RenderSectionAsync("PageBanner", required: false) } +@section Scripts { + @await RenderSectionAsync("Scripts", required: false) +} + +@section Head { + @await RenderSectionAsync("Head", required: false) +} +
diff --git a/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml index 5f46da7d..30da1af6 100644 --- a/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml +++ b/Childrens-Social-Care-CPD/Views/Shared/_VideoResource.cshtml @@ -2,9 +2,15 @@ @model VideoResource +@{ + ((StateModel)ViewData["StateModel"]).IncludeMediaPlayer = true; +} +
- +
View transcript
diff --git a/Childrens-Social-Care-CPD/styles/scss/overrides/_mediaelement-player.scss b/Childrens-Social-Care-CPD/styles/scss/overrides/_mediaelement-player.scss new file mode 100644 index 00000000..caeb7979 --- /dev/null +++ b/Childrens-Social-Care-CPD/styles/scss/overrides/_mediaelement-player.scss @@ -0,0 +1,778 @@ +/* Accessibility: hide screen reader texts (and prefer "top" for RTL languages). +Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */ +.mejs__offscreen { + border: 0; + clip: rect( 1px, 1px, 1px, 1px ); + -webkit-clip-path: inset( 50% ); + clip-path: inset( 50% ); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + word-wrap: normal; +} + +.mejs__container { + background: #000; + box-sizing: border-box; + font-family: 'Helvetica', Arial, serif; + position: relative; + text-align: left; + text-indent: 0; + vertical-align: top; +} + +.mejs__container * { + box-sizing: border-box; +} + +/* Hide native play button and control bar from iOS to favor plugin button */ +.mejs__container video::-webkit-media-controls, +.mejs__container video::-webkit-media-controls-panel, +.mejs__container video::-webkit-media-controls-panel-container, +.mejs__container video::-webkit-media-controls-start-playback-button { + -webkit-appearance: none; + display: none !important; +} + +.mejs__fill-container, +.mejs__fill-container .mejs__container { + height: 100%; + width: 100%; +} + +.mejs__fill-container { + background: transparent; + margin: 0 auto; + overflow: hidden; + position: relative; +} + +.mejs__container:focus { + outline: none; +} + +.mejs__iframe-overlay { + height: 100%; + position: absolute; + width: 100%; +} + +.mejs__embed, +.mejs__embed body { + background: #000; + height: 100%; + margin: 0; + overflow: hidden; + padding: 0; + width: 100%; +} + +.mejs__fullscreen { + overflow: hidden !important; +} + +.mejs__container-fullscreen { + bottom: 0; + left: 0; + overflow: hidden; + position: fixed; + right: 0; + top: 0; + z-index: 1000; +} + +.mejs__container-fullscreen .mejs__mediaelement, +.mejs__container-fullscreen video { + height: 100% !important; + width: 100% !important; +} + +/* Start: LAYERS */ +.mejs__background { + left: 0; + position: absolute; + top: 0; +} + +.mejs__mediaelement { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 0; +} + +.mejs__poster { + background-position: 50% 50%; + background-repeat: no-repeat; + background-size: cover; + left: 0; + position: absolute; + top: 0; + z-index: 1; +} + +:root .mejs__poster-img { + display: none; +} + +.mejs__poster-img { + border: 0; + padding: 0; +} + +.mejs__overlay { + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + left: 0; + position: absolute; + top: 0; +} + +.mejs__layer { + z-index: 1; +} + +.mejs__overlay-play { + cursor: pointer; +} + +.mejs__overlay-button { + background: url('../assets/images/media-element/mejs-controls.svg') no-repeat; + background-position: 0 -39px; + height: 80px; + width: 80px; +} + +.mejs__overlay:hover > .mejs__overlay-button { + background-position: -80px -39px; +} + +.mejs__overlay-loading { + height: 80px; + width: 80px; +} + +.mejs__overlay-loading-bg-img { + -webkit-animation: mejs__loading-spinner 1s linear infinite; + animation: mejs__loading-spinner 1s linear infinite; + background: transparent url('../assets/images/media-element/mejs-controls.svg') -160px -40px no-repeat; + display: block; + height: 80px; + width: 80px; + z-index: 1; +} + +@-webkit-keyframes mejs__loading-spinner { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes mejs__loading-spinner { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +/* End: LAYERS */ + +/* Start: CONTROL BAR */ +.mejs__controls { + bottom: 0; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + height: 40px; + left: 0; + list-style-type: none; + margin: 0; + padding: 0 10px; + position: absolute; + width: 100%; + z-index: 3; +} + +.mejs__controls:not([style*='display: none']) { + background: rgba(255, 0, 0, 0.7); + background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35)); + background: linear-gradient(transparent, rgba(0, 0, 0, 0.35)); +} + +.mejs__button, +.mejs__time, +.mejs__time-rail { + font-size: 10px; + height: 40px; + line-height: 10px; + margin: 0; + width: 32px; +} + +.mejs__button > button { + background: transparent url('../assets/images/media-element/mejs-controls.svg'); + border: 0; + cursor: pointer; + display: block; + font-size: 0; + height: 20px; + line-height: 0; + margin: 10px 6px; + overflow: hidden; + padding: 0; + position: absolute; + text-decoration: none; + width: 20px; +} + +/* :focus for accessibility */ +.mejs__button > button:focus { + outline: dotted 1px #999; +} + +.mejs__container-keyboard-inactive a, +.mejs__container-keyboard-inactive a:focus, +.mejs__container-keyboard-inactive button, +.mejs__container-keyboard-inactive button:focus, +.mejs__container-keyboard-inactive [role=slider], +.mejs__container-keyboard-inactive [role=slider]:focus { + outline: 0; +} + +/* End: CONTROL BAR */ + +/* Start: Time (Current / Duration) */ +.mejs__time { + box-sizing: content-box; + color: #fff; + font-size: 11px; + font-weight: bold; + height: 24px; + overflow: hidden; + padding: 16px 6px 0; + text-align: center; + width: auto; +} + +/* End: Time (Current / Duration) */ + +/* Start: Play/Pause/Stop */ +.mejs__play > button { + background-position: 0 0; +} + +.mejs__pause > button { + background-position: -20px 0; +} + +.mejs__replay > button { + background-position: -160px 0; +} + +/* End: Play/Pause/Stop */ + +/* Start: Progress Bar */ +.mejs__time-rail { + direction: ltr; + -webkit-box-flex: 1; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + height: 40px; + margin: 0 10px; + padding-top: 10px; + position: relative; +} + +.mejs__time-total, +.mejs__time-buffering, +.mejs__time-loaded, +.mejs__time-current, +.mejs__time-float, +.mejs__time-hovered, +.mejs__time-float-current, +.mejs__time-float-corner, +.mejs__time-marker { + border-radius: 2px; + cursor: pointer; + display: block; + height: 10px; + position: absolute; +} + +.mejs__time-total { + background: rgba(255, 255, 255, 0.3); + margin: 5px 0 0; + width: 100%; +} + +.mejs__time-buffering { + -webkit-animation: buffering-stripes 2s linear infinite; + animation: buffering-stripes 2s linear infinite; + background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent); + background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent); + background-size: 15px 15px; + width: 100%; +} + +@-webkit-keyframes buffering-stripes { + from { + background-position: 0 0; + } + + to { + background-position: 30px 0; + } +} + +@keyframes buffering-stripes { + from { + background-position: 0 0; + } + + to { + background-position: 30px 0; + } +} + +.mejs__time-loaded { + background: rgba(255, 255, 255, 0.3); +} + +.mejs__time-current, +.mejs__time-handle-content { + background: rgba(255, 255, 255, 0.9); +} + +.mejs__time-hovered { + background: rgba(255, 255, 255, 0.5); + z-index: 10; +} + +.mejs__time-hovered.negative { + background: rgba(0, 0, 0, 0.2); +} + +.mejs__time-current, +.mejs__time-buffering, +.mejs__time-loaded, +.mejs__time-hovered { + left: 0; + -webkit-transform: scaleX(0); + -ms-transform: scaleX(0); + transform: scaleX(0); + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transition: 0.15s ease-in all; + transition: 0.15s ease-in all; + width: 100%; +} + +.mejs__time-buffering { + -webkit-transform: scaleX(1); + -ms-transform: scaleX(1); + transform: scaleX(1); +} + +.mejs__time-hovered { + -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1); + transition: height 0.1s cubic-bezier(0.44, 0, 1, 1); +} + +.mejs__time-hovered.no-hover { + -webkit-transform: scaleX(0) !important; + -ms-transform: scaleX(0) !important; + transform: scaleX(0) !important; +} + +.mejs__time-handle, +.mejs__time-handle-content { + border: 4px solid transparent; + cursor: pointer; + left: 0; + position: absolute; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + z-index: 11; +} + +.mejs__time-handle-content { + border: 4px solid rgba(255, 255, 255, 0.9); + border-radius: 50%; + height: 10px; + left: -7px; + top: -4px; + -webkit-transform: scale(0); + -ms-transform: scale(0); + transform: scale(0); + width: 10px; +} + +.mejs__time-rail:hover .mejs__time-handle-content, +.mejs__time-rail .mejs__time-handle-content:focus, +.mejs__time-rail .mejs__time-handle-content:active { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); +} + +.mejs__time-float { + background: #eee; + border: solid 1px #333; + bottom: 100%; + color: #111; + display: none; + height: 17px; + margin-bottom: 9px; + position: absolute; + text-align: center; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + width: 36px; +} + +.mejs__time-float-current { + display: block; + left: 0; + margin: 2px; + text-align: center; + width: 30px; +} + +.mejs__time-float-corner { + border: solid 5px #eee; + border-color: #eee transparent transparent; + border-radius: 0; + display: block; + height: 0; + left: 50%; + line-height: 0; + position: absolute; + top: 100%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + width: 0; +} + +.mejs__long-video .mejs__time-float { + margin-left: -23px; + width: 64px; +} + +.mejs__long-video .mejs__time-float-current { + width: 60px; +} + +.mejs__broadcast { + color: #fff; + height: 10px; + position: absolute; + top: 15px; + width: 100%; +} + +/* End: Progress Bar */ + +/* Start: Fullscreen */ +.mejs__fullscreen-button > button { + background-position: -80px 0; +} + +.mejs__unfullscreen > button { + background-position: -100px 0; +} + +/* End: Fullscreen */ + +/* Start: Mute/Volume */ +.mejs__mute > button { + background-position: -60px 0; +} + +.mejs__unmute > button { + background-position: -40px 0; +} + +.mejs__volume-button { + position: relative; +} + +.mejs__volume-button > .mejs__volume-slider { + -webkit-backface-visibility: hidden; + background: rgba(50, 50, 50, 0.7); + border-radius: 0; + bottom: 100%; + display: none; + height: 115px; + left: 50%; + margin: 0; + position: absolute; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + width: 25px; + z-index: 1; +} + +.mejs__volume-button:hover { + border-radius: 0 0 4px 4px; +} + +.mejs__volume-total { + background: rgba(255, 255, 255, 0.5); + height: 100px; + left: 50%; + margin: 0; + position: absolute; + top: 8px; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + width: 2px; +} + +.mejs__volume-current { + background: rgba(255, 255, 255, 0.9); + left: 0; + margin: 0; + position: absolute; + width: 100%; +} + +.mejs__volume-handle { + background: rgba(255, 255, 255, 0.9); + border-radius: 1px; + cursor: ns-resize; + height: 6px; + left: 50%; + position: absolute; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + width: 16px; +} + +.mejs__horizontal-volume-slider { + display: block; + height: 36px; + position: relative; + vertical-align: middle; + width: 56px; +} + +.mejs__horizontal-volume-total { + background: rgba(50, 50, 50, 0.8); + border-radius: 2px; + font-size: 1px; + height: 8px; + left: 0; + margin: 0; + padding: 0; + position: absolute; + top: 16px; + width: 50px; +} + +.mejs__horizontal-volume-current { + background: rgba(255, 255, 255, 0.8); + border-radius: 2px; + font-size: 1px; + height: 100%; + left: 0; + margin: 0; + padding: 0; + position: absolute; + top: 0; + width: 100%; +} + +.mejs__horizontal-volume-handle { + display: none; +} + +/* End: Mute/Volume */ + +/* Start: Track (Captions and Chapters) */ +.mejs__captions-button, +.mejs__chapters-button { + position: relative; +} + +.mejs__captions-button > button { + background-position: -140px 0; +} + +.mejs__chapters-button > button { + background-position: -180px 0; +} + +.mejs__captions-button > .mejs__captions-selector, +.mejs__chapters-button > .mejs__chapters-selector { + background: rgba(50, 50, 50, 0.7); + border: solid 1px transparent; + border-radius: 0; + bottom: 100%; + margin-right: -43px; + overflow: hidden; + padding: 0; + position: absolute; + right: 50%; + visibility: visible; + width: 86px; +} + +.mejs__chapters-button > .mejs__chapters-selector { + margin-right: -55px; + width: 110px; +} + +.mejs__captions-selector-list, +.mejs__chapters-selector-list { + list-style-type: none !important; + margin: 0; + overflow: hidden; + padding: 0; +} + +.mejs__captions-selector-list-item, +.mejs__chapters-selector-list-item { + color: #fff; + cursor: pointer; + display: block; + list-style-type: none !important; + margin: 0 0 6px; + overflow: hidden; + padding: 0; +} + +.mejs__captions-selector-list-item:hover, +.mejs__chapters-selector-list-item:hover { + background-color: rgb(200, 200, 200) !important; + background-color: rgba(255, 255, 255, 0.4) !important; +} + +.mejs__captions-selector-input, +.mejs__chapters-selector-input { + clear: both; + float: left; + left: -1000px; + margin: 3px 3px 0 5px; + position: absolute; +} + +.mejs__captions-selector-label, +.mejs__chapters-selector-label { + cursor: pointer; + float: left; + font-size: 10px; + line-height: 15px; + padding: 4px 10px 0; + width: 100%; +} + +.mejs__captions-selected, +.mejs__chapters-selected { + color: rgba(33, 248, 248, 1); +} + +.mejs__captions-translations { + font-size: 10px; + margin: 0 0 5px; +} + +.mejs__captions-layer { + bottom: 0; + color: #fff; + font-size: 16px; + left: 0; + line-height: 20px; + position: absolute; + text-align: center; +} + +.mejs__captions-layer a { + color: #fff; + text-decoration: underline; +} + +.mejs__captions-layer[lang=ar] { + font-size: 20px; + font-weight: normal; +} + +.mejs__captions-position { + bottom: 15px; + left: 0; + position: absolute; + width: 100%; +} + +.mejs__captions-position-hover { + bottom: 35px; +} + +.mejs__captions-text, +.mejs__captions-text * { + background: rgba(20, 20, 20, 0.5); + box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5); + padding: 0; + white-space: pre-wrap; +} + +.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container { + display: none; +} + +/* End: Track (Captions and Chapters) */ + +/* Start: Error */ +.mejs__overlay-error { + position: relative; +} + +.mejs__overlay-error > img { + left: 0; + max-width: 100%; + position: absolute; + top: 0; + z-index: -1; +} + +.mejs__cannotplay, +.mejs__cannotplay a { + color: #fff; + font-size: 0.8em; +} + +.mejs__cannotplay { + position: relative; +} + +.mejs__cannotplay p, +.mejs__cannotplay a { + display: inline-block; + padding: 0 15px; + width: 100%; +} +/* End: Error */ diff --git a/Childrens-Social-Care-CPD/wwwroot/assets/images/media-element/mejs-controls.svg b/Childrens-Social-Care-CPD/wwwroot/assets/images/media-element/mejs-controls.svg new file mode 100644 index 00000000..6f7a3b78 --- /dev/null +++ b/Childrens-Social-Care-CPD/wwwroot/assets/images/media-element/mejs-controls.svg @@ -0,0 +1 @@ + diff --git a/Childrens-Social-Care-CPD/wwwroot/css/mediaelement-player.min.css b/Childrens-Social-Care-CPD/wwwroot/css/mediaelement-player.min.css new file mode 100644 index 00000000..8cddf0ab --- /dev/null +++ b/Childrens-Social-Care-CPD/wwwroot/css/mediaelement-player.min.css @@ -0,0 +1 @@ +.mejs__offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs__container{background:#000;box-sizing:border-box;font-family:'Helvetica',Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs__container *{box-sizing:border-box}.mejs__container video::-webkit-media-controls,.mejs__container video::-webkit-media-controls-panel,.mejs__container video::-webkit-media-controls-panel-container,.mejs__container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none !important}.mejs__fill-container,.mejs__fill-container .mejs__container{height:100%;width:100%}.mejs__fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs__container:focus{outline:0}.mejs__iframe-overlay{height:100%;position:absolute;width:100%}.mejs__embed,.mejs__embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs__fullscreen{overflow:hidden !important}.mejs__container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs__container-fullscreen .mejs__mediaelement,.mejs__container-fullscreen video{height:100% !important;width:100% !important}.mejs__background{left:0;position:absolute;top:0}.mejs__mediaelement{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.mejs__poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs__poster-img{display:none}.mejs__poster-img{border:0;padding:0}.mejs__overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs__layer{z-index:1}.mejs__overlay-play{cursor:pointer}.mejs__overlay-button{background:url('../assets/images/media-element/mejs-controls.svg') no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs__overlay:hover>.mejs__overlay-button{background-position:-80px -39px}.mejs__overlay-loading{height:80px;width:80px}.mejs__overlay-loading-bg-img{-webkit-animation:mejs__loading-spinner 1s linear infinite;animation:mejs__loading-spinner 1s linear infinite;background:transparent url('../assets/images/media-element/mejs-controls.svg') -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes mejs__loading-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes mejs__loading-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.mejs__controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs__controls:not([style*='display: none']){background:rgba(255,0,0,0.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,0.35));background:linear-gradient(transparent,rgba(0,0,0,0.35))}.mejs__button,.mejs__time,.mejs__time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs__button>button{background:transparent url('../assets/images/media-element/mejs-controls.svg');border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs__button>button:focus{outline:dotted 1px #999}.mejs__container-keyboard-inactive a,.mejs__container-keyboard-inactive a:focus,.mejs__container-keyboard-inactive button,.mejs__container-keyboard-inactive button:focus,.mejs__container-keyboard-inactive [role=slider],.mejs__container-keyboard-inactive [role=slider]:focus{outline:0}.mejs__time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:bold;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs__play>button{background-position:0 0}.mejs__pause>button{background-position:-20px 0}.mejs__replay>button{background-position:-160px 0}.mejs__time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs__time-total,.mejs__time-buffering,.mejs__time-loaded,.mejs__time-current,.mejs__time-float,.mejs__time-hovered,.mejs__time-float-current,.mejs__time-float-corner,.mejs__time-marker{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs__time-total{background:rgba(255,255,255,0.3);margin:5px 0 0;width:100%}.mejs__time-buffering{-webkit-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite;background:-webkit-linear-gradient(135deg,rgba(255,255,255,0.4) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.4) 50%,rgba(255,255,255,0.4) 75%,transparent 75%,transparent);background:linear-gradient(-45deg,rgba(255,255,255,0.4) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.4) 50%,rgba(255,255,255,0.4) 75%,transparent 75%,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}.mejs__time-loaded{background:rgba(255,255,255,0.3)}.mejs__time-current,.mejs__time-handle-content{background:rgba(255,255,255,0.9)}.mejs__time-hovered{background:rgba(255,255,255,0.5);z-index:10}.mejs__time-hovered.negative{background:rgba(0,0,0,0.2)}.mejs__time-current,.mejs__time-buffering,.mejs__time-loaded,.mejs__time-hovered{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:.15s ease-in all;transition:.15s ease-in all;width:100%}.mejs__time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs__time-hovered{-webkit-transition:height .1s cubic-bezier(0.44,0,1,1);transition:height .1s cubic-bezier(0.44,0,1,1)}.mejs__time-hovered.no-hover{-webkit-transform:scaleX(0) !important;-ms-transform:scaleX(0) !important;transform:scaleX(0) !important}.mejs__time-handle,.mejs__time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs__time-handle-content{border:4px solid rgba(255,255,255,0.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs__time-rail:hover .mejs__time-handle-content,.mejs__time-rail .mejs__time-handle-content:focus,.mejs__time-rail .mejs__time-handle-content:active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs__time-float{background:#eee;border:solid 1px #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs__time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs__time-float-corner{border:solid 5px #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs__long-video .mejs__time-float{margin-left:-23px;width:64px}.mejs__long-video .mejs__time-float-current{width:60px}.mejs__broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs__fullscreen-button>button{background-position:-80px 0}.mejs__unfullscreen>button{background-position:-100px 0}.mejs__mute>button{background-position:-60px 0}.mejs__unmute>button{background-position:-40px 0}.mejs__volume-button{position:relative}.mejs__volume-button>.mejs__volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,0.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs__volume-button:hover{border-radius:0 0 4px 4px}.mejs__volume-total{background:rgba(255,255,255,0.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs__volume-current{background:rgba(255,255,255,0.9);left:0;margin:0;position:absolute;width:100%}.mejs__volume-handle{background:rgba(255,255,255,0.9);border-radius:1px;cursor:ns-resize;height:6px;left:50%;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs__horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs__horizontal-volume-total{background:rgba(50,50,50,0.8);border-radius:2px;font-size:1px;height:8px;left:0;margin:0;padding:0;position:absolute;top:16px;width:50px}.mejs__horizontal-volume-current{background:rgba(255,255,255,0.8);border-radius:2px;font-size:1px;height:100%;left:0;margin:0;padding:0;position:absolute;top:0;width:100%}.mejs__horizontal-volume-handle{display:none}.mejs__captions-button,.mejs__chapters-button{position:relative}.mejs__captions-button>button{background-position:-140px 0}.mejs__chapters-button>button{background-position:-180px 0}.mejs__captions-button>.mejs__captions-selector,.mejs__chapters-button>.mejs__chapters-selector{background:rgba(50,50,50,0.7);border:solid 1px transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs__chapters-button>.mejs__chapters-selector{margin-right:-55px;width:110px}.mejs__captions-selector-list,.mejs__chapters-selector-list{list-style-type:none !important;margin:0;overflow:hidden;padding:0}.mejs__captions-selector-list-item,.mejs__chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none !important;margin:0 0 6px;overflow:hidden;padding:0}.mejs__captions-selector-list-item:hover,.mejs__chapters-selector-list-item:hover{background-color:#c8c8c8 !important;background-color:rgba(255,255,255,0.4) !important}.mejs__captions-selector-input,.mejs__chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs__captions-selector-label,.mejs__chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs__captions-selected,.mejs__chapters-selected{color:rgba(33,248,248,1)}.mejs__captions-translations{font-size:10px;margin:0 0 5px}.mejs__captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs__captions-layer a{color:#fff;text-decoration:underline}.mejs__captions-layer[lang=ar]{font-size:20px;font-weight:normal}.mejs__captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs__captions-position-hover{bottom:35px}.mejs__captions-text,.mejs__captions-text *{background:rgba(20,20,20,0.5);box-shadow:5px 0 0 rgba(20,20,20,0.5),-5px 0 0 rgba(20,20,20,0.5);padding:0;white-space:pre-wrap}.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container{display:none}.mejs__overlay-error{position:relative}.mejs__overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs__cannotplay,.mejs__cannotplay a{color:#fff;font-size:.8em}.mejs__cannotplay{position:relative}.mejs__cannotplay p,.mejs__cannotplay a{display:inline-block;padding:0 15px;width:100%} \ No newline at end of file diff --git a/Childrens-Social-Care-CPD/wwwroot/javascript/mediaelement-and-player.min.js b/Childrens-Social-Care-CPD/wwwroot/javascript/mediaelement-and-player.min.js new file mode 100644 index 00000000..c3b41e13 --- /dev/null +++ b/Childrens-Social-Care-CPD/wwwroot/javascript/mediaelement-and-player.min.js @@ -0,0 +1,12 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */ +!function r(a,s,l){function d(n,e){if(!s[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[n]={exports:{}};a[n][0].call(i.exports,function(e){var t=a[n][1][e];return d(t||e)},i,i.exports,r,a,s,l)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e',o.addControlElement(t,"fullscreen"),t.addEventListener("click",function(){m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||n.isFullScreen?n.exitFullScreen():n.enterFullScreen()}),n.fullscreenBtn=t,o.options.keyActions.push({keys:[70],action:function(e,t,n,o){o.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),o.exitFullscreenCallback=function(e){var t=e.which||e.keyCode||0;o.options.enableKeyboard&&27===t&&(m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||o.isFullScreen)&&n.exitFullScreen()},o.globalBind("keydown",o.exitFullscreenCallback),o.normalHeight=0,o.normalWidth=0,m.HAS_TRUE_NATIVE_FULLSCREEN){n.globalBind(m.FULLSCREEN_EVENT_NAME,function(){n.isFullScreen&&(m.isFullScreen()?(n.isNativeFullScreen=!0,n.setControlsSize()):(n.isNativeFullScreen=!1,n.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName),t="";return m.HAS_TRUE_NATIVE_FULLSCREEN&&e?t="native-native":m.HAS_TRUE_NATIVE_FULLSCREEN&&!e?t="plugin-native":this.usePluginFullScreen&&m.SUPPORT_POINTER_EVENTS&&(t="plugin-click"),this.fullscreenMode=t},enterFullScreen:function(){var o=this,e=null!==o.media.rendererName&&/(html5|native)/i.test(o.media.rendererName),t=getComputedStyle(o.getElement(o.container));if(o.isVideo)if(!1===o.options.useFakeFullscreen&&(m.IS_IOS||m.IS_SAFARI)&&m.HAS_IOS_FULLSCREEN&&"function"==typeof o.media.originalNode.webkitEnterFullscreen&&o.media.originalNode.canPlayType((0,g.getTypeFromFile)(o.media.getSrc())))o.media.originalNode.webkitEnterFullscreen();else{if((0,v.addClass)(p.default.documentElement,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.getElement(o.container),o.options.classPrefix+"container-fullscreen"),o.normalHeight=parseFloat(t.height),o.normalWidth=parseFloat(t.width),"native-native"!==o.fullscreenMode&&"plugin-native"!==o.fullscreenMode||(m.requestFullScreen(o.getElement(o.container)),o.isInIframe&&setTimeout(function e(){if(o.isNativeFullScreen){var t=f.default.innerWidth||p.default.documentElement.clientWidth||p.default.body.clientWidth,n=screen.width;.002*n',l.addEventListener("click",function(){i.paused?i.play():i.pause()});var d=l.querySelector("button");function u(e){"play"===e?((0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"pause"),d.setAttribute("title",s),d.setAttribute("aria-label",s)):((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"play"),d.setAttribute("title",a),d.setAttribute("aria-label",a))}i.addControlElement(l,"playpause"),u("pse"),o.addEventListener("loadedmetadata",function(){-1===o.rendererName.indexOf("flash")&&u("pse")}),o.addEventListener("play",function(){u("play")}),o.addEventListener("playing",function(){u("play")}),o.addEventListener("pause",function(){u("pse")}),o.addEventListener("ended",function(){e.options.loop||((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.addClass)(l,i.options.classPrefix+"replay"),d.setAttribute("title",a),d.setAttribute("aria-label",a))})}})},{16:16,2:2,26:26,27:27,5:5}],11:[function(e,t,n){"use strict";var p=r(e(2)),o=e(16),i=r(o),m=r(e(5)),y=e(25),E=e(30),b=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(i.default.prototype,{buildprogress:function(h,s,e,d){var u=0,v=!1,c=!1,g=this,t=h.options.autoRewind,n=h.options.enableProgressTooltip?'00:00':"",o=p.default.createElement("div");o.className=g.options.classPrefix+"time-rail",o.innerHTML=''+n+"",g.addControlElement(o,"progress"),g.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&0o+n.left&&(d=o+n.left),a=(l=d-n.left)/o,g.newTime=a*g.getDuration(),v&&null!==g.getCurrentTime()&&g.newTime.toFixed(4)!==g.getCurrentTime().toFixed(4)&&(g.setCurrentRailHandle(g.newTime),g.updateCurrent(g.newTime)),!y.IS_IOS&&!y.IS_ANDROID){if(l<0&&(l=0),g.options.useSmoothHover&&null!==r&&void 0!==window[r]){var u=new window[r](getComputedStyle(g.handle)[i]).m41,c=l/parseFloat(getComputedStyle(g.total).width)-u/parseFloat(getComputedStyle(g.total).width);g.hovered.style.left=u+"px",g.setTransformStyle(g.hovered,"scaleX("+c+")"),g.hovered.setAttribute("pos",l),0<=c?(0,b.removeClass)(g.hovered,"negative"):(0,b.addClass)(g.hovered,"negative")}if(g.timefloat){var f=g.timefloat.offsetWidth/2,p=mejs.Utils.offset(g.getElement(g.container)),m=getComputedStyle(g.timefloat);s=d-p.left=g.getElement(g.container).offsetWidth-f?g.total.offsetWidth-f:l,(0,b.hasClass)(g.getElement(g.container),g.options.classPrefix+"long-video")&&(s+=parseFloat(m.marginLeft)/2+g.timefloat.offsetWidth/2),g.timefloat.style.left=s+"px",g.timefloatcurrent.innerHTML=(0,E.secondsToTimeCode)(g.newTime,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),g.timefloat.style.display="block"}}}else y.IS_IOS||y.IS_ANDROID||!g.timefloat||(s=g.timefloat.offsetWidth+o>=g.getElement(g.container).offsetWidth?g.timefloat.offsetWidth/2:0,g.timefloat.style.left=s+"px",g.timefloat.style.left=s+"px",g.timefloat.style.display="block")},f=function(){1e3<=new Date-u&&g.play()};g.slider.addEventListener("focus",function(){h.options.autoRewind=!1}),g.slider.addEventListener("blur",function(){h.options.autoRewind=t}),g.slider.addEventListener("keydown",function(e){if(1e3<=new Date-u&&(c=g.paused),g.options.enableKeyboard&&g.options.keyActions.length){var t=e.which||e.keyCode||0,n=g.getDuration(),o=h.options.defaultSeekForwardInterval(d),i=h.options.defaultSeekBackwardInterval(d),r=g.getCurrentTime(),a=g.getElement(g.container).querySelector("."+g.options.classPrefix+"volume-slider");if(38===t||40===t){a&&(a.style.display="block"),g.isVideo&&(g.showControls(),g.startControlsTimer());var s=38===t?Math.min(g.volume+.1,1):Math.max(g.volume-.1,0),l=s<=0;return g.setVolume(s),void g.setMuted(l)}switch(a&&(a.style.display="none"),t){case 37:g.getDuration()!==1/0&&(r-=i);break;case 39:g.getDuration()!==1/0&&(r+=o);break;case 36:r=0;break;case 35:r=n;break;case 13:case 32:return void(y.IS_FIREFOX&&(g.paused?g.play():g.pause()));default:return}r=r<0||isNaN(r)?0:n<=r?n:Math.floor(r),u=new Date,c||h.pause(),setTimeout(function(){g.setCurrentTime(r)},0),r | "}),Object.assign(i.default.prototype,{buildcurrent:function(e,t,n,o){var i=this,r=a.default.createElement("div");r.className=i.options.classPrefix+"time",r.setAttribute("role","timer"),r.setAttribute("aria-live","off"),r.innerHTML=''+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"",i.addControlElement(r,"current"),e.updateCurrent(),i.updateTimeCallback=function(){i.controlsAreVisible&&e.updateCurrent()},o.addEventListener("timeupdate",i.updateTimeCallback)},cleancurrent:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,o){var i=this;if(t.lastChild.querySelector("."+i.options.classPrefix+"currenttime"))t.querySelector("."+i.options.classPrefix+"time").innerHTML+=i.options.timeAndDurationSeparator+''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"";else{t.querySelector("."+i.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+i.options.classPrefix+"currenttime").parentNode,i.options.classPrefix+"currenttime-container");var r=a.default.createElement("div");r.className=i.options.classPrefix+"time "+i.options.classPrefix+"duration-container",r.innerHTML=''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"",i.addControlElement(r,"duration")}i.updateDurationCallback=function(){i.controlsAreVisible&&e.updateDuration()},o.addEventListener("timeupdate",i.updateDurationCallback)},cleanduration:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this,t=e.getCurrentTime();isNaN(t)&&(t=0);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5
',o.captions.style.display="none",t.insertBefore(o.captions,t.firstChild),o.captionsText=o.captions.querySelector("."+i.options.classPrefix+"captions-text"),o.captionsButton=L.default.createElement("div"),o.captionsButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"captions-button",o.captionsButton.innerHTML='
",i.addControlElement(o.captionsButton,"tracks"),o.captionsButton.querySelector("."+i.options.classPrefix+"captions-selector-input").disabled=!1,o.chaptersButton=L.default.createElement("div"),o.chaptersButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"chapters-button",o.chaptersButton.innerHTML='
    ';for(var u=0,c=0;c"},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(var n=0,o=e.tracks.length;n";for(var o=r.chaptersButton.querySelectorAll('input[type="radio"]'),i=r.chaptersButton.querySelectorAll("."+r.options.classPrefix+"chapters-selector-label"),a=0,s=o.length;a>1].start,a=e[i].stop,r<=t&&t ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],o=void 0,i=void 0,r=void 0,a=0,s=t.length;a$1"),n.push({identifier:r,start:0===(0,m.convertSMPTEtoSeconds)(o[1])?.2:(0,m.convertSMPTEtoSeconds)(o[1]),stop:(0,m.convertSMPTEtoSeconds)(o[3]),text:i,settings:o[5]})}r=""}return n}},dfxp:{parse:function(e){var t=L.default.adoptNode((new DOMParser).parseFromString(e,"application/xml").documentElement).querySelector("div"),n=t.querySelectorAll("p"),o=L.default.getElementById(t.getAttribute("style")),i=[],r=void 0;if(o){o.removeAttribute("id");var a=o.attributes;if(a.length){r={};for(var s=0,l=a.length;s$1"),i.push(f)}return i}}}},{16:16,2:2,26:26,27:27,30:30,5:5,7:7}],14:[function(e,t,n){"use strict";var x=r(e(2)),o=e(16),i=r(o),w=r(e(5)),P=e(25),T=e(27),C=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(i.default.prototype,{buildvolume:function(e,t,n,o){if(!P.IS_ANDROID&&!P.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,s=a.isVideo?a.options.videoVolume:a.options.audioVolume,r=(0,T.isString)(a.options.muteText)?a.options.muteText:w.default.t("mejs.mute"),l=(0,T.isString)(a.options.unmuteText)?a.options.unmuteText:w.default.t("mejs.unmute"),i=(0,T.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:w.default.t("mejs.volume-help-text"),d=x.default.createElement("div");if(d.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",d.innerHTML="horizontal"===s?'':''+i+'
    ',a.addControlElement(d,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&t.matches(":focus")&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),0'+i+'
    ',d.parentNode.insertBefore(u,d.nextSibling)}var c=!1,f=!1,p=!1,m="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),h="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),v="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),g="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),y=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute");var t=d.firstElementChild;t.setAttribute("title",l),t.setAttribute("aria-label",l)}else{(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute");var n=d.firstElementChild;n.setAttribute("title",r),n.setAttribute("aria-label",r)}var o=100*e+"%",i=getComputedStyle(g);"vertical"===s?(v.style.bottom=0,v.style.height=o,g.style.bottom=o,g.style.marginBottom=-parseFloat(i.height)/2+"px"):(v.style.left=0,v.style.width=o,g.style.left=o,g.style.marginLeft=-parseFloat(i.width)/2+"px")}},E=function(e){var t=(0,C.offset)(h),n=getComputedStyle(h);p=!0;var o=null;if("vertical"===s){var i=parseFloat(n.height);if(o=(i-(e.pageY-t.top))/i,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);o=(e.pageX-t.left)/r}o=Math.max(0,o),o=Math.min(o,1),y(o),a.setMuted(0===o),a.setVolume(o),e.preventDefault(),e.stopPropagation()},b=function(){a.muted?(y(0),(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute")):(y(o.volume),(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseenter",function(e){e.target===d&&(m.style.display="block",f=!0,e.preventDefault(),e.stopPropagation())}),d.addEventListener("focusin",function(){m.style.display="block",f=!0}),d.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseleave",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),d.addEventListener("focusout",function(){f=!1}),d.addEventListener("keydown",function(e){if(a.options.enableKeyboard&&a.options.keyActions.length){var t=e.which||e.keyCode||0,n=o.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}c=!1,y(n),o.setVolume(n),e.preventDefault(),e.stopPropagation()}}),d.querySelector("button").addEventListener("click",function(){o.setMuted(!o.muted);var e=(0,T.createEvent)("volumechange",o);o.dispatchEvent(e)}),m.addEventListener("dragstart",function(){return!1}),m.addEventListener("mouseover",function(){f=!0}),m.addEventListener("focusin",function(){m.style.display="block",f=!0}),m.addEventListener("focusout",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),m.addEventListener("mousedown",function(e){E(e),a.globalBind("mousemove.vol",function(e){var t=e.target;c&&(t===m||t.closest("vertical"===s?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&E(e)}),a.globalBind("mouseup.vol",function(){c=!1,f||"vertical"!==s||(m.style.display="none")}),c=!0,e.preventDefault(),e.stopPropagation()}),o.addEventListener("volumechange",function(e){var t;c||b(),t=Math.floor(100*o.volume),m.setAttribute("aria-valuenow",t),m.setAttribute("aria-valuetext",t+"%")});var S=!1;o.addEventListener("rendererready",function(){p||setTimeout(function(){S=!0,(0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),o.setVolume(e.options.startVolume),a.setControlsSize()},250)}),o.addEventListener("loadedmetadata",function(){setTimeout(function(){p||S||((0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()),S=!1},250)}),(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),b()),a.getElement(a.container).addEventListener("controlsresize",function(){b()})}}})},{16:16,2:2,25:25,26:26,27:27,5:5}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function o(e,t){for(var n=0;n
    ',n.getElement(n.container).addEventListener("focus",function(e){if(!n.controlsAreVisible&&!n.hasFocus&&n.controlsEnabled){n.showControls(!0);var t=(0,m.isNodeAfter)(e.relatedTarget,n.getElement(n.container))?"."+n.options.classPrefix+"controls ."+n.options.classPrefix+"button:last-child > button":"."+n.options.classPrefix+"playpause-button > button";n.getElement(n.container).querySelector(t).focus()}}),n.node.parentNode.insertBefore(n.getElement(n.container),n.node),n.options.features.length||n.options.useDefaultControls||(n.getElement(n.container).style.background="transparent",n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls").style.display="none"),n.isVideo&&"fill"===n.options.stretching&&!P.hasClass(n.getElement(n.container).parentNode,n.options.classPrefix+"fill-container")){n.outerContainer=n.media.parentNode;var r=x.default.createElement("div");r.className=n.options.classPrefix+"fill-container",n.getElement(n.container).parentNode.insertBefore(r,n.getElement(n.container)),r.appendChild(n.getElement(n.container))}w.IS_ANDROID&&P.addClass(n.getElement(n.container),n.options.classPrefix+"android"),w.IS_IOS&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ios"),w.IS_IPAD&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ipad"),w.IS_IPHONE&&P.addClass(n.getElement(n.container),n.options.classPrefix+"iphone"),P.addClass(n.getElement(n.container),n.isVideo?n.options.classPrefix+"video":n.options.classPrefix+"audio"),n.getElement(n.container).querySelector("."+n.options.classPrefix+"mediaelement").appendChild(n.node),(n.media.player=n).controls=n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls"),n.layers=n.getElement(n.container).querySelector("."+n.options.classPrefix+"layers");var a=n.isVideo?"video":"audio",s=a.substring(0,1).toUpperCase()+a.substring(1);0=n.width?n.width/n.height:n.height/n.width,n.setPlayerSize(n.width,n.height),e.pluginWidth=n.width,e.pluginHeight=n.height}if(f.default.MepDefaults=e,new d.default(n.media,e,n.mediaFiles),void 0!==n.getElement(n.container)&&n.options.features.length&&n.controlsAreVisible&&!n.options.hideVideoControlsOnLoad){var l=(0,m.createEvent)("controlsshown",n.getElement(n.container));n.getElement(n.container).dispatchEvent(l)}}},{key:"showControls",value:function(e){var i=this;if(e=void 0===e||e,!i.controlsAreVisible&&i.isVideo){if(e)!function(){P.fadeIn(i.getElement(i.controls),200,function(){P.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen");var e=(0,m.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){P.fadeIn(n[e],200,function(){P.removeClass(n[e],i.options.classPrefix+"offscreen")})},t=0,o=n.length;t'),e.message&&(a="

    "+e.message+"

    "),e.urls)for(var d=0,u=e.urls.length;d'+f.default.i18n.t("mejs.download-file")+": "+c.src+""}}a&&o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error")&&(r.innerHTML=a,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").innerHTML=""+s+r.outerHTML,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").parentNode.style.display="block"),o.controlsEnabled&&o.disableControls()}},{key:"setPlayerSize",value:function(e,t){var n=this;if(!n.options.setDimensions)return!1;switch(void 0!==e&&(n.width=e),void 0!==t&&(n.height=t),n.options.stretching){case"fill":n.isVideo?n.setFillMode():n.setDimensions(n.width,n.height);break;case"responsive":n.setResponsiveMode();break;case"none":n.setDimensions(n.width,n.height);break;default:!0===n.hasFluidMode()?n.setResponsiveMode():n.setDimensions(n.width,n.height)}}},{key:"hasFluidMode",value:function(){var e=this;return-1!==e.height.toString().indexOf("%")||e.node&&e.node.style.maxWidth&&"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width||e.node&&e.node.currentStyle&&"100%"===e.node.currentStyle.maxWidth}},{key:"setResponsiveMode",value:function(){var o=this,e=function(){for(var t=void 0,n=o.getElement(o.container);n;){try{if(w.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&P.visible(t))return t;n=t}return null}(),t=e?getComputedStyle(e,null):getComputedStyle(x.default.body,null),n=o.isVideo?o.node.videoWidth&&0=o.width?o.node.videoWidth/o.node.videoHeight:o.node.videoHeight/o.node.videoWidth:o.initialAspectRatio,(isNaN(e)||e<.01||100=o.width?parseFloat(l/r,10):parseFloat(l*r,10):i,isNaN(s)&&(s=a),0img");a&&(a.style.display="");for(var s=e.getElement(e.container).querySelectorAll("object, embed, iframe, video"),l=e.height,d=e.width,u=i,c=l*i/d,f=d*r/l,p=r,m=i
    ',n.appendChild(r),a.style.display="none",a.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",a.innerHTML='
    ',n.appendChild(a),s.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer "+i.options.classPrefix+"overlay-play",s.innerHTML='
    ',s.addEventListener("click",function(){if(i.options.clickToPlayPause){var e=i.getElement(i.container).querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");i.paused?i.play():i.pause(),e.setAttribute("aria-pressed",!!t),i.getElement(i.container).focus()}}),s.addEventListener("keydown",function(e){var t=e.keyCode||e.which||0;if(13===t||w.IS_FIREFOX&&32===t){var n=(0,m.createEvent)("click",s);return s.dispatchEvent(n),!1}}),n.appendChild(s),null!==i.media.rendererName&&(/(youtube|facebook)/i.test(i.media.rendererName)&&!(i.media.originalNode.getAttribute("poster")||t.options.poster||"function"==typeof i.media.renderer.getPosterUrl&&i.media.renderer.getPosterUrl())||w.IS_STOCK_ANDROID||i.media.originalNode.getAttribute("autoplay"))&&(s.style.display="none");var l=!1;o.addEventListener("play",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("playing",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("seeking",function(){s.style.display="none",r.style.display="",l=!1}),o.addEventListener("seeked",function(){s.style.display=i.paused&&!w.IS_STOCK_ANDROID?"":"none",r.style.display="none",l=!1}),o.addEventListener("pause",function(){r.style.display="none",w.IS_STOCK_ANDROID||l||(s.style.display=""),l=!1}),o.addEventListener("waiting",function(){r.style.display="",l=!1}),o.addEventListener("loadeddata",function(){r.style.display="",w.IS_ANDROID&&(o.canplayTimeout=setTimeout(function(){if(x.default.createEvent){var e=x.default.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),o.dispatchEvent(e)}},300)),l=!1}),o.addEventListener("canplay",function(){r.style.display="none",clearTimeout(o.canplayTimeout),l=!1}),o.addEventListener("error",function(e){i._handleError(e,i.media,i.node),r.style.display="none",s.style.display="none",l=!0}),o.addEventListener("loadedmetadata",function(){i.controlsEnabled||i.enableControls()}),o.addEventListener("keydown",function(e){i.onkeydown(t,o,e),l=!1})}}},{key:"buildkeyboard",value:function(o,e,t,i){var r=this;r.getElement(r.container).addEventListener("keydown",function(){r.keyboardAction=!0}),r.globalKeydownCallback=function(e){var t=x.default.activeElement.closest("."+r.options.classPrefix+"container"),n=r.media.closest("."+r.options.classPrefix+"container");return r.hasFocus=!(!t||!n||t.id!==n.id),r.onkeydown(o,i,e)},r.globalClickCallback=function(e){r.hasFocus=!!e.target.closest("."+r.options.classPrefix+"container")},r.globalBind("keydown",r.globalKeydownCallback),r.globalBind("click",r.globalClickCallback)}},{key:"onkeydown",value:function(e,t,n){if(e.hasFocus&&e.options.enableKeyboard)for(var o=0,i=e.options.keyActions.length;oimg");(e&&l.node.setAttribute("poster",e.src),delete l.node.autoplay,l.node.setAttribute("src",""),""!==l.media.canPlayType((0,p.getTypeFromFile)(u))&&l.node.setAttribute("src",u),d&&-1t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,o,i){r.plugins[e]=r.detectPlugin(t,n,o,i)},detectPlugin:function(e,t,n,o){var i=[0,0,0],r=void 0,a=void 0;if(null!==F.NAV.plugins&&void 0!==F.NAV.plugins&&"object"===d(F.NAV.plugins[e])){if((r=F.NAV.plugins[e].description)&&(void 0===F.NAV.mimeTypes||!F.NAV.mimeTypes[t]||F.NAV.mimeTypes[t].enabledPlugin))for(var s=0,l=(i=r.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;s
    '+N.default.t("mejs.install-flash")+"
    "}else x=['id="__'+r.id+'"','name="__'+r.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+r.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+r.options.pluginPath+r.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(x.push('width="'+S+'"'),x.push('height="'+b+'"')):x.push('style="position: fixed; left: -9999em; top: -9999em;"'),r.flashWrapper.innerHTML="";if(r.flashNode=r.flashWrapper.lastChild,r.hide=function(){o=!1,E&&(r.flashNode.style.display="none")},r.show=function(){o=!0,E&&(r.flashNode.style.display="")},r.setSize=function(e,t){r.flashNode.style.width=e+"px",r.flashNode.style.height=t+"px",null!==r.flashApi&&"function"==typeof r.flashApi.fire_setSize&&r.flashApi.fire_setSize(e,t)},r.destroy=function(){r.flashNode.remove()},n&&0":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function s(o,i){var r=this,a=arguments,s=2x',t.firstChild.href}function d(e){var t=1