diff --git a/src/Hypnonema.Client/BrowserStateHelperScript.cs b/src/Hypnonema.Client/BrowserStateHelperScript.cs index 80bbab4..e50f405 100644 --- a/src/Hypnonema.Client/BrowserStateHelperScript.cs +++ b/src/Hypnonema.Client/BrowserStateHelperScript.cs @@ -45,19 +45,21 @@ protected void RegisterNuiCallback( private CallbackDelegate GetStateResponse(IDictionary args, CallbackDelegate callback) { - bool.TryParse(args.FirstOrDefault(arg => arg.Key == "paused").Value?.ToString(), out var paused); - float.TryParse(args.FirstOrDefault(arg => arg.Key == "currentTime").Value?.ToString(), out var currentTime); - float.TryParse(args.FirstOrDefault(arg => arg.Key == "duration").Value?.ToString(), out var duration); - bool.TryParse(args.FirstOrDefault(arg => arg.Key == "ended").Value?.ToString(), out var ended); - var currentSource = args.FirstOrDefault(arg => arg.Key == "currentSource").Value?.ToString(); - - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); if (string.IsNullOrEmpty(screenName)) { - Debug.WriteLine("error: received state response without valid screenName."); + Debug.WriteLine("Warning: received state response without valid screenName."); + callback(""); return callback; } + var paused = ArgsReader.GetArgKeyValue(args, "paused"); + var repeat = ArgsReader.GetArgKeyValue(args, "repeat"); + var currentTime = ArgsReader.GetArgKeyValue(args, "currentTime"); + var duration = ArgsReader.GetArgKeyValue(args, "duration"); + var ended = ArgsReader.GetArgKeyValue(args, "ended"); + var currentSource = ArgsReader.GetArgKeyValue(args, "currentSource"); + var state = new DuiState { CurrentTime = currentTime, @@ -65,10 +67,13 @@ private CallbackDelegate GetStateResponse(IDictionary args, Call Ended = ended, IsPaused = paused, Duration = duration, - CurrentSource = currentSource + CurrentSource = currentSource, + Repeat = repeat }; StateQueue.Enqueue(state); + + callback("OK"); return callback; } } diff --git a/src/Hypnonema.Client/ClientScript.cs b/src/Hypnonema.Client/ClientScript.cs index 8660375..fa41108 100644 --- a/src/Hypnonema.Client/ClientScript.cs +++ b/src/Hypnonema.Client/ClientScript.cs @@ -44,8 +44,6 @@ public ClientScript() this.RegisterEventHandler(ClientEvents.DeletedScreen, new Action(this.DeletedScreen)); this.RegisterEventHandler(ClientEvents.PauseVideo, new Action(this.PauseVideo)); this.RegisterEventHandler(ClientEvents.ResumeVideo, new Action(this.ResumeVideo)); - - // this.RegisterEventHandler(ClientEvents.UpdateState, new Func(this.StateTick)); this.RegisterEventHandler(ClientEvents.OnStateTick, new Func(this.OnStateTick)); this.RegisterNuiCallback(ClientEvents.OnPlay, this.OnPlay); @@ -61,8 +59,7 @@ public ClientScript() this.RegisterNuiCallback(ClientEvents.OnPause, this.OnPause); this.RegisterNuiCallback(ClientEvents.OnResumeVideo, this.OnResume); this.RegisterNuiCallback(ClientEvents.OnSeek, this.OnSeek); - - // this.RegisterNuiCallback(ClientEvents.OnStateTick, this.OnStateTick); + this.RegisterNuiCallback(ClientEvents.OnToggleRepeat, this.OnToggleRepeat); } protected void RegisterNuiCallback( @@ -175,127 +172,47 @@ private void OnClientResourceStart(string resourceName) private CallbackDelegate OnCloseScreen(IDictionary args, CallbackDelegate callback) { - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); if (string.IsNullOrEmpty(screenName)) return callback; TriggerServerEvent(ServerEvents.OnCloseScreen, screenName); + + callback("OK"); return callback; } private CallbackDelegate OnCreateScreen(IDictionary args, CallbackDelegate callback) { - var name = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); - if (string.IsNullOrEmpty(name)) return callback; - - if (!bool.TryParse( - args.FirstOrDefault(arg => arg.Key == "is3DRendered").Value?.ToString(), - out var is3DRendered)) is3DRendered = false; - - if (!bool.TryParse( - args.FirstOrDefault(arg => arg.Key == "alwaysOn").Value?.ToString(), - out var alwaysOn)) alwaysOn = false; - - var modelName = args.FirstOrDefault(arg => arg.Key == "modelName").Value?.ToString(); - if (string.IsNullOrEmpty(modelName) && !is3DRendered) - { - Debug.WriteLine("failed to create screen. modelName is missing"); - return callback; - } - - var renderTargetName = args.FirstOrDefault(arg => arg.Key == "renderTargetName").Value?.ToString(); - if (string.IsNullOrEmpty(renderTargetName) && !is3DRendered) - { - Debug.WriteLine("failed to create screen. renderTargetName is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "positionX").Value?.ToString(), out var positionX) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. positionX is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "positionY").Value?.ToString(), out var positionY) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. positionY is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "positionZ").Value?.ToString(), out var positionZ) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. positionZ is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "rotationX").Value?.ToString(), out var rotationX) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. rotationX is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "rotationY").Value?.ToString(), out var rotationY) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. rotationY is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "rotationZ").Value?.ToString(), out var rotationZ) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. rotationZ is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "scaleX").Value?.ToString(), out var scaleX) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. scaleX is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "scaleY").Value?.ToString(), out var scaleY) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. scaleY is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "scaleZ").Value?.ToString(), out var scaleZ) - && is3DRendered) + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); + if (string.IsNullOrEmpty(screenName)) { - Debug.WriteLine("failed to create screen. scaleZ is missing"); + Debug.WriteLine("failed to create screen: screenName is missing"); return callback; } - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "globalVolume").Value?.ToString(), - out var globalVolume)) globalVolume = 100.0f; - - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "soundAttenuation").Value?.ToString(), - out var soundAttenuation)) soundAttenuation = 5.0f; - - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "soundMinDistance").Value?.ToString(), - out var soundMinDistance)) soundMinDistance = 15.0f; - - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "soundMaxDistance").Value?.ToString(), - out var soundMaxDistance)) soundMaxDistance = 100.0f; - - if (!bool.TryParse( - args.FirstOrDefault(arg => arg.Key == "is3DAudioEnabled").Value?.ToString(), - out var is3DAudioEnabled)) is3DAudioEnabled = false; - + var is3DRendered = ArgsReader.GetArgKeyValue(args, "is3DRendered"); + var alwaysOn = ArgsReader.GetArgKeyValue(args, "alwaysOn"); + var modelName = ArgsReader.GetArgKeyValue(args, "modelName"); + var renderTargetName = ArgsReader.GetArgKeyValue(args, "renderTargetName"); + var positionX = ArgsReader.GetArgKeyValue(args, "positionX"); + var positionY = ArgsReader.GetArgKeyValue(args, "positionY"); + var positionZ = ArgsReader.GetArgKeyValue(args, "positionZ"); + var rotationX = ArgsReader.GetArgKeyValue(args, "rotationX"); + var rotationY = ArgsReader.GetArgKeyValue(args, "rotationY"); + var rotationZ = ArgsReader.GetArgKeyValue(args, "rotationZ"); + var scaleX = ArgsReader.GetArgKeyValue(args, "scaleX"); + var scaleY = ArgsReader.GetArgKeyValue(args, "scaleY"); + var scaleZ = ArgsReader.GetArgKeyValue(args, "scaleZ"); + var globalVolume = ArgsReader.GetArgKeyValue(args, "globalVolume", 100f); + var soundAttenuation = ArgsReader.GetArgKeyValue(args, "soundAttenuation", 5f); + var soundMinDistance = ArgsReader.GetArgKeyValue(args, "soundMinDistance", 15f); + var soundMaxDistance = ArgsReader.GetArgKeyValue(args, "soundMaxDistance", 100f); + var is3DAudioEnabled = ArgsReader.GetArgKeyValue(args, "is3DAudioEnabled"); + var screen = new Screen { AlwaysOn = alwaysOn, - Name = name, + Name = screenName, Is3DRendered = is3DRendered, BrowserSettings = new DuiBrowserSettings @@ -331,12 +248,14 @@ private CallbackDelegate OnCreateScreen(IDictionary args, Callba // TODO: IsAceAllowed() to reduce server load TriggerServerEvent(ServerEvents.OnCreateScreen, JsonConvert.SerializeObject(screen)); + + callback("OK"); return callback; } private CallbackDelegate OnDeleteScreen(IDictionary args, CallbackDelegate callback) { - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); if (string.IsNullOrEmpty(screenName)) { Debug.WriteLine("screen deletion failed: no screenName provided."); @@ -344,129 +263,34 @@ private CallbackDelegate OnDeleteScreen(IDictionary args, Callba } TriggerServerEvent(ServerEvents.OnDeleteScreen, screenName); + + callback("OK"); return callback; } private CallbackDelegate OnEditScreen(IDictionary args, CallbackDelegate callback) { - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); - if (string.IsNullOrEmpty(screenName)) - { - Debug.WriteLine("failed to edit screen. screenName is missing"); - return callback; - } - - if (!int.TryParse(args.FirstOrDefault(arg => arg.Key == "id").Value?.ToString(), out var id)) - { - Debug.WriteLine("failed to edit screen. id is missing"); - return callback; - } - - if (!bool.TryParse( - args.FirstOrDefault(arg => arg.Key == "is3DRendered").Value?.ToString(), - out var is3DRendered)) is3DRendered = false; - - if (!bool.TryParse( - args.FirstOrDefault(arg => arg.Key == "alwaysOn").Value?.ToString(), - out var alwaysOn)) alwaysOn = false; - - var modelName = args.FirstOrDefault(arg => arg.Key == "modelName").Value?.ToString(); - if (string.IsNullOrEmpty(modelName) && !is3DRendered) - { - Debug.WriteLine("failed to edit screen. modelName is missing"); - return callback; - } - - var renderTargetName = args.FirstOrDefault(arg => arg.Key == "renderTargetName").Value?.ToString(); - if (string.IsNullOrEmpty(renderTargetName) && !is3DRendered) - { - Debug.WriteLine("failed to create screen. renderTargetName is missing"); - return callback; - } - - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "globalVolume").Value?.ToString(), - out var globalVolume)) globalVolume = 100.0f; - - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "soundAttenuation").Value?.ToString(), - out var soundAttenuation)) soundAttenuation = 5.0f; - - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "soundMinDistance").Value?.ToString(), - out var soundMinDistance)) soundMinDistance = 15.0f; - - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "soundMaxDistance").Value?.ToString(), - out var soundMaxDistance)) soundMaxDistance = 100.0f; - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "positionX").Value?.ToString(), out var positionX) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. positionX is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "positionY").Value?.ToString(), out var positionY) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. positionY is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "positionZ").Value?.ToString(), out var positionZ) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. positionZ is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "rotationX").Value?.ToString(), out var rotationX) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. rotationX is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "rotationY").Value?.ToString(), out var rotationY) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. rotationY is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "rotationZ").Value?.ToString(), out var rotationZ) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. rotationZ is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "scaleX").Value?.ToString(), out var scaleX) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. scaleX is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "scaleY").Value?.ToString(), out var scaleY) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. scaleY is missing"); - return callback; - } - - if (!float.TryParse(args.FirstOrDefault(arg => arg.Key == "scaleZ").Value?.ToString(), out var scaleZ) - && is3DRendered) - { - Debug.WriteLine("failed to create screen. scaleZ is missing"); - return callback; - } - - if (!bool.TryParse( - args.FirstOrDefault(arg => arg.Key == "is3DAudioEnabled").Value?.ToString(), - out var is3DAudioEnabled)) is3DAudioEnabled = false; - + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); + var id = ArgsReader.GetArgKeyValue(args, "id"); + var is3DRendered = ArgsReader.GetArgKeyValue(args, "is3DRendered"); + var alwaysOn = ArgsReader.GetArgKeyValue(args, "alwaysOn"); + var modelName = ArgsReader.GetArgKeyValue(args, "modelName"); + var renderTargetName = ArgsReader.GetArgKeyValue(args, "renderTargetName"); + var globalVolume = ArgsReader.GetArgKeyValue(args, "globalVolume", 100f); + var soundAttenuation = ArgsReader.GetArgKeyValue(args, "soundAttenuation", 5f); + var soundMinDistance = ArgsReader.GetArgKeyValue(args, "soundMinDistance", 15f); + var soundMaxDistance = ArgsReader.GetArgKeyValue(args, "soundMaxDistance", 100f); + var positionX = ArgsReader.GetArgKeyValue(args, "positionX"); + var positionY = ArgsReader.GetArgKeyValue(args, "positionY"); + var positionZ = ArgsReader.GetArgKeyValue(args, "positionZ"); + var rotationX = ArgsReader.GetArgKeyValue(args, "rotationX"); + var rotationY = ArgsReader.GetArgKeyValue(args, "rotationY"); + var rotationZ = ArgsReader.GetArgKeyValue(args, "rotationZ"); + var scaleX = ArgsReader.GetArgKeyValue(args, "scaleX"); + var scaleY = ArgsReader.GetArgKeyValue(args, "scaleY"); + var scaleZ = ArgsReader.GetArgKeyValue(args, "scaleZ"); + var is3DAudioEnabled = ArgsReader.GetArgKeyValue(args, "is3DAudioEnabled"); + var screen = new Screen { Id = id, @@ -506,6 +330,8 @@ private CallbackDelegate OnEditScreen(IDictionary args, Callback }; TriggerServerEvent(ServerEvents.OnEditScreen, JsonConvert.SerializeObject(screen)); + + callback("OK"); return callback; } @@ -521,6 +347,8 @@ private CallbackDelegate OnHideNUI(IDictionary args, CallbackDel { API.SetNuiFocus(false, false); API.SendNuiMessage(JsonConvert.SerializeObject(new { type = "HypnonemaNUI.HideUI" })); + + callback("OK"); return callback; } @@ -545,16 +373,18 @@ private async Task OnInitialize(string jsonScreens, int rendererLimit, bool isAc await this.playerPool.SynchronizeState(screenDuiState.State, screenDuiState.Screen); } - Debug.WriteLine("Initialized.."); + // Debug.WriteLine("Initialized.."); this.isInitialized = true; } private CallbackDelegate OnPause(IDictionary args, CallbackDelegate callback) { - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); if (string.IsNullOrEmpty(screenName)) return callback; TriggerServerEvent(ServerEvents.OnPause, screenName); + + callback("OK"); return callback; } @@ -566,12 +396,13 @@ private async Task OnPlay(string url, string jsonScreen) private CallbackDelegate OnPlay(IDictionary args, CallbackDelegate callback) { - var videoUrl = args.FirstOrDefault(arg => arg.Key == "videoUrl").Value?.ToString(); - var screen = args.FirstOrDefault(arg => arg.Key == "screen").Value?.ToString(); + var videoUrl = ArgsReader.GetArgKeyValue(args, "videoUrl"); + var screen = ArgsReader.GetArgKeyValue(args, "screen"); if (!string.IsNullOrEmpty(videoUrl) && !string.IsNullOrEmpty(screen)) TriggerServerEvent(ServerEvents.OnPlaybackReceived, videoUrl, screen); + callback("OK"); return callback; } @@ -596,6 +427,8 @@ private async Task OnRequestState(IDictionary JsonConvert.SerializeObject( new { type = "HypnonemaNUI.UpdateStatuses", screenStates }, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); + + callback("OK"); return callback; } @@ -609,24 +442,25 @@ private void OnResourceStop(string resourceName) private CallbackDelegate OnResume(IDictionary args, CallbackDelegate callback) { - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); if (string.IsNullOrEmpty(screenName)) return callback; TriggerServerEvent(ServerEvents.OnResumeVideo, screenName); + + callback("OK"); return callback; } private CallbackDelegate OnSeek(IDictionary args, CallbackDelegate callback) { - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); if (string.IsNullOrEmpty(screenName)) return callback; - if (!float.TryParse( - args.FirstOrDefault(arg => arg.Key == "time").Value?.ToString(), - out var time)) return callback; + var time = ArgsReader.GetArgKeyValue(args, "time"); this.playerPool.Seek(screenName, time); + callback("OK"); return callback; } @@ -683,10 +517,12 @@ private async Task OnStateTick() private CallbackDelegate OnStopVideo(IDictionary args, CallbackDelegate callback) { - var screenName = args.FirstOrDefault(arg => arg.Key == "screenName").Value?.ToString(); + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); if (string.IsNullOrEmpty(screenName)) return callback; TriggerServerEvent(ServerEvents.OnStopVideo, screenName); + + callback("OK"); return callback; } @@ -695,12 +531,25 @@ private async Task OnTick() await this.playerPool.OnTick(); } + private CallbackDelegate OnToggleRepeat(IDictionary args, CallbackDelegate callback) + { + var screenName = ArgsReader.GetArgKeyValue(args, "screenName"); + if (string.IsNullOrEmpty(screenName)) return callback; + + TriggerServerEvent(ServerEvents.OnToggleRepeat, screenName); + + callback("OK"); + return callback; + } + private CallbackDelegate OnVolumeChange(IDictionary args, CallbackDelegate callback) { - var volume = args.FirstOrDefault(arg => arg.Key == "volume").Value?.ToString(); + var volume = ArgsReader.GetArgKeyValue(args, "volume"); if (string.IsNullOrEmpty(volume)) return callback; TriggerServerEvent(ServerEvents.OnSetVolume, volume); + + callback("OK"); return callback; } @@ -729,6 +578,12 @@ private void StopVideo(string screenName) this.playerPool.StopVideo(screenName); } + [EventHandler(ClientEvents.ToggleRepeat)] + private void ToggleRepeat(string screenName) + { + this.playerPool.ToggleRepeat(screenName); + } + private async Task TriggerStateTick() { while (true) diff --git a/src/Hypnonema.Client/Graphics/DuiBrowser.cs b/src/Hypnonema.Client/Graphics/DuiBrowser.cs index 67fe118..72f00e3 100644 --- a/src/Hypnonema.Client/Graphics/DuiBrowser.cs +++ b/src/Hypnonema.Client/Graphics/DuiBrowser.cs @@ -74,7 +74,7 @@ public void Init(string screenName, string posterUrl) { this.SendMessage(new { type = "init", screenName, posterUrl }); } - + public void Pause() { this.SendMessage(new { type = "pause" }); @@ -105,6 +105,11 @@ public void SetVolume(float volume) this.SendMessage(new { type = "volume", volume = volume / 100 }); } + public void Mute(bool muted) + { + this.SendMessage(new { type = "mute", muted }); + } + public void Stop() { this.SendMessage(new { type = "stop" }); @@ -146,14 +151,14 @@ public void Toggle3DAudio(bool value) this.SendMessage(new { type = "toggle3DAudio", enabled = value }); } - public void ToggleReplay(bool toggle) + public void ToggleRepeat() { - this.SendMessage(new { type = "toggleReplay", value = toggle }); + this.SendMessage(new { type = "toggleRepeat" }); } - public void Update(bool paused, float currentTime, string currentSource) + public void Update(bool paused, float currentTime, string currentSource, bool repeat) { - this.SendMessage(new { type = "update", paused, currentTime, src = currentSource }); + this.SendMessage(new { type = "update", paused, currentTime, src = currentSource, repeat }); } } } \ No newline at end of file diff --git a/src/Hypnonema.Client/Hypnonema.Client.csproj b/src/Hypnonema.Client/Hypnonema.Client.csproj index f896985..db12ca3 100644 --- a/src/Hypnonema.Client/Hypnonema.Client.csproj +++ b/src/Hypnonema.Client/Hypnonema.Client.csproj @@ -36,7 +36,7 @@ - ..\..\packages\CitizenFX.Core.Client.1.0.2432\lib\net45\CitizenFX.Core.Client.dll + ..\..\packages\CitizenFX.Core.Client.1.0.2695\lib\net45\CitizenFX.Core.Client.dll False @@ -53,6 +53,7 @@ + diff --git a/src/Hypnonema.Client/Players/IVideoPlayer.cs b/src/Hypnonema.Client/Players/IVideoPlayer.cs index 7830b46..fd93cee 100644 --- a/src/Hypnonema.Client/Players/IVideoPlayer.cs +++ b/src/Hypnonema.Client/Players/IVideoPlayer.cs @@ -33,8 +33,8 @@ public interface IVideoPlayer : IDisposable void Stop(); - void SynchronizeState(bool paused, float currentTime, string currentSource); + void SynchronizeState(bool paused, float currentTime, string currentSource, bool repeat); - void ToggleReplay(bool replay); + void ToggleRepeat(); } } \ No newline at end of file diff --git a/src/Hypnonema.Client/Players/VideoPlayer2D.cs b/src/Hypnonema.Client/Players/VideoPlayer2D.cs index 0b4987b..ee0453b 100644 --- a/src/Hypnonema.Client/Players/VideoPlayer2D.cs +++ b/src/Hypnonema.Client/Players/VideoPlayer2D.cs @@ -127,9 +127,9 @@ public void Stop() this.Browser.Stop(); } - public void SynchronizeState(bool paused, float currentTime, string currentSource) + public void SynchronizeState(bool paused, float currentTime, string currentSource, bool repeat) { - this.Browser.Update(paused, currentTime, currentSource); + this.Browser.Update(paused, currentTime, currentSource, repeat); } public void Toggle3DAudio(bool value) @@ -137,9 +137,9 @@ public void Toggle3DAudio(bool value) this.Browser.Toggle3DAudio(value); } - public void ToggleReplay(bool replay) + public void ToggleRepeat() { - this.Browser.ToggleReplay(replay); + this.Browser.ToggleRepeat(); } private static Prop GetClosestObjectOfType(float radius, uint modelHash) diff --git a/src/Hypnonema.Client/Players/VideoPlayer3D.cs b/src/Hypnonema.Client/Players/VideoPlayer3D.cs index c31822c..14d9e64 100644 --- a/src/Hypnonema.Client/Players/VideoPlayer3D.cs +++ b/src/Hypnonema.Client/Players/VideoPlayer3D.cs @@ -112,9 +112,9 @@ public void Stop() this.Browser.Stop(); } - public void SynchronizeState(bool paused, float currentTime, string currentSource) + public void SynchronizeState(bool paused, float currentTime, string currentSource, bool repeat) { - this.Browser.Update(paused, currentTime, currentSource); + this.Browser.Update(paused, currentTime, currentSource, repeat); } public void Toggle3DAudio(bool value) @@ -122,9 +122,9 @@ public void Toggle3DAudio(bool value) this.Browser.Toggle3DAudio(value); } - public void ToggleReplay(bool replay) + public void ToggleRepeat() { - this.Browser.ToggleReplay(replay); + this.Browser.ToggleRepeat(); } private float GetSoundFactor(float distance) diff --git a/src/Hypnonema.Client/Players/VideoPlayerPool.cs b/src/Hypnonema.Client/Players/VideoPlayerPool.cs index a8c6bba..a169dd6 100644 --- a/src/Hypnonema.Client/Players/VideoPlayerPool.cs +++ b/src/Hypnonema.Client/Players/VideoPlayerPool.cs @@ -63,7 +63,7 @@ public async Task CreateVideoPlayerAsync(Shared.Models.Screen scre browser.CreateRuntimeTexture(); await BaseScript.Delay(1000); - Debug.WriteLine("sending init.."); + // Debug.WriteLine("sending init.."); browser.Init(screen.Name, this.posterUrl); if (!screen.Is3DRendered) @@ -155,11 +155,19 @@ public async Task SynchronizeState(DuiState state, Shared.Models.Screen screen) return; } - Debug.WriteLine("Synchronizing.."); - player.SynchronizeState(state.IsPaused, state.CurrentTime, state.CurrentSource); + Debug.WriteLine($"Synchronizing: {screen.Name}"); + player.SynchronizeState(state.IsPaused, state.CurrentTime, state.CurrentSource, state.Repeat); this.VideoPlayers.Add(player); } + public void ToggleRepeat(string screenName) + { + var player = this.VideoPlayers.FirstOrDefault(s => s.ScreenName == screenName); + if (player == null) return; + + player.ToggleRepeat(); + } + private static VideoPlayer2D CreateVideoPlayer2D(DuiBrowser browser, Shared.Models.Screen screen) { var renderTarget = new RenderTarget( diff --git a/src/Hypnonema.Client/packages.config b/src/Hypnonema.Client/packages.config index 1f88420..6dec3ff 100644 --- a/src/Hypnonema.Client/packages.config +++ b/src/Hypnonema.Client/packages.config @@ -1,6 +1,5 @@  - - - + + \ No newline at end of file diff --git a/src/Hypnonema.DUI/package-lock.json b/src/Hypnonema.DUI/package-lock.json index 5f0705c..4345dee 100644 --- a/src/Hypnonema.DUI/package-lock.json +++ b/src/Hypnonema.DUI/package-lock.json @@ -55,19 +55,12 @@ } } }, - "@types/events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "dev": true - }, "@types/glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", - "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", "dev": true, "requires": { - "@types/events": "*", "@types/minimatch": "*", "@types/node": "*" } @@ -85,9 +78,9 @@ "dev": true }, "@types/q": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", - "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", "dev": true }, "@webassemblyjs/ast": { @@ -300,9 +293,9 @@ } }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", "dev": true }, "acorn-globals": { @@ -316,9 +309,9 @@ }, "dependencies": { "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true } } @@ -671,9 +664,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "micromatch": { @@ -2173,8 +2166,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -2938,9 +2930,9 @@ }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -3487,13 +3479,21 @@ } }, "css-tree": { - "version": "1.0.0-alpha.33", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.33.tgz", - "integrity": "sha512-SPt57bh5nQnpsTBsx/IXbO14sRc9xXu5MtMAVuo0BaQQmyf0NupNPPSoMaqiAF5tDFafYsTkfeH4Q/HCKXkg4w==", + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", "dev": true, "requires": { "mdn-data": "2.0.4", - "source-map": "^0.5.3" + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "css-unit-converter": { @@ -3769,28 +3769,34 @@ "dev": true }, "csso": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz", - "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz", + "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==", "dev": true, "requires": { - "css-tree": "1.0.0-alpha.29" + "css-tree": "1.0.0-alpha.39" }, "dependencies": { "css-tree": { - "version": "1.0.0-alpha.29", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==", + "version": "1.0.0-alpha.39", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz", + "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==", "dev": true, "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" + "mdn-data": "2.0.6", + "source-map": "^0.6.1" } }, "mdn-data": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", - "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz", + "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } @@ -3978,9 +3984,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -4628,9 +4634,9 @@ } }, "enzyme-to-json": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.4.4.tgz", - "integrity": "sha512-50LELP/SCPJJGic5rAARvU7pgE3m1YaNj7JLM+Qkhl5t7PAs6fiyc8xzc50RnkKPFQCv0EeFVjEWdIFRGPWMsA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.5.0.tgz", + "integrity": "sha512-clusXRsiaQhG7+wtyc4t7MU8N3zCOgf4eY9+CeSenYzKlFST4lxerfOvnWd4SNaToKhkuba+w6m242YpQOS7eA==", "dev": true, "requires": { "lodash": "^4.17.15", @@ -4776,9 +4782,9 @@ "dev": true }, "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", "dev": true }, "events": { @@ -5444,30 +5450,10 @@ } }, "follow-redirects": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", - "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", - "dev": true, - "requires": { - "debug": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz", + "integrity": "sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg==", + "dev": true }, "for-in": { "version": "1.0.2", @@ -6462,13 +6448,13 @@ } }, "globule": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", - "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.12", + "lodash": "~4.17.10", "minimatch": "~3.0.2" } }, @@ -6509,15 +6495,16 @@ "dev": true }, "handlebars": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.5.tgz", - "integrity": "sha512-0Ce31oWVB7YidkaTq33ZxEbN+UDxMMgThvCe8ptgQViymL5DPis9uLdTA13MiRPhgvqyxIegugrP97iK3JeBHg==", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", "dev": true, "requires": { + "minimist": "^1.2.5", "neo-async": "^2.6.0", - "optimist": "^0.6.1", "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" }, "dependencies": { "source-map": { @@ -6815,9 +6802,9 @@ "dev": true }, "html-inline-css-webpack-plugin": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/html-inline-css-webpack-plugin/-/html-inline-css-webpack-plugin-1.8.0.tgz", - "integrity": "sha512-lNBoRA2Sl1+0VCUevElT/In208AtkvDFAMZN8K9bBkZ9gn+Ymi8vRCrKkSIF4MNVxdDL2x0LOGyDscQ7So9zcQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/html-inline-css-webpack-plugin/-/html-inline-css-webpack-plugin-1.8.1.tgz", + "integrity": "sha512-j5+l24Ke1mO0HI+8icUntqIiSKihlJraQkMdL4Iw8LNKdd+1Vf50zs26yLsddsa664ZQWXr3RwlV4lRDW21U5w==", "dev": true, "requires": { "lodash": "^4.17.15" @@ -6933,16 +6920,10 @@ } } }, - "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", - "dev": true - }, "http-proxy": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", - "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "dev": true, "requires": { "eventemitter3": "^4.0.0", @@ -7392,9 +7373,9 @@ } }, "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, "invariant": { @@ -8713,9 +8694,9 @@ } }, "js-base64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", - "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.3.tgz", + "integrity": "sha512-fiUvdfCaAXoQTHdKMgTvg6IkecXDcVz6V5rlftUTclF9IKBjMizvSdQaCl/z/6TApDeby5NL+axYou3i0mu1Pg==", "dev": true }, "js-tokens": { @@ -8959,9 +8940,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -8977,9 +8958,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, "lodash.escape": { @@ -9146,6 +9127,11 @@ "p-is-promise": "^2.0.0" } }, + "memoize-one": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.1.1.tgz", + "integrity": "sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==" + }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", @@ -9365,9 +9351,9 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "mississippi": { @@ -9410,12 +9396,20 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } } }, "moo": { @@ -9498,9 +9492,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -9687,9 +9681,9 @@ } }, "node-sass": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.0.tgz", - "integrity": "sha512-AxqU+DFpk0lEz95sI6jO0hU0Rwyw7BXVEv6o9OItoXLyeygPeaSpiV4rwQb10JiTghHaa0gZeD21sz+OsQluaw==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -9706,7 +9700,7 @@ "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -10109,15 +10103,74 @@ } }, "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", "dev": true, "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", + "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + } } }, "obuf": { @@ -10165,16 +10218,6 @@ "is-wsl": "^1.1.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, "optimize-css-assets-webpack-plugin": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz", @@ -10512,6 +10555,13 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true, + "optional": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -12924,9 +12974,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -12989,19 +13039,26 @@ "scheduler": "^0.19.1" } }, + "react-fast-compare": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, "react-is": { "version": "16.11.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.11.0.tgz", "integrity": "sha512-gbBVYR2p8mnriqAwWx9LbuUrShnAuSCNnuPGyc7GJrMVQtPDAh8iLpv7FRuMPFb56KkaVZIYSz1PrjI9q0QPCw==" }, "react-player": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/react-player/-/react-player-1.15.3.tgz", - "integrity": "sha512-8fc0R1AipFIy7l4lKgnIg+gMU2IY32ZMxxBlINjXAq/YnN3HUP3hOaE+aQ0lQv+a1/MMZgbekWD86ZGDO7kB8g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/react-player/-/react-player-2.5.0.tgz", + "integrity": "sha512-wwTp6KO6uF/QRvwV2rh+jb6A7rfZLgdVPKTgidXYYvb2IkjYd3Db9BtSVGqQeLw1e9y3OSucBCrLlJtovSMuzg==", "requires": { "deepmerge": "^4.0.0", "load-script": "^1.0.0", - "prop-types": "^15.7.2" + "memoize-one": "^5.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.0.1" } }, "react-test-renderer": { @@ -13458,22 +13515,22 @@ }, "dependencies": { "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", "object-inspect": "^1.7.0", "object-keys": "^1.1.1", "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" } }, "es-to-primitive": { @@ -13494,47 +13551,25 @@ "dev": true }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", "dev": true, "requires": { - "has": "^1.0.3" + "has-symbols": "^1.0.1" } }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", "dev": true - }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" - } - }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" - } } } }, @@ -14109,9 +14144,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "micromatch": { @@ -14136,120 +14171,175 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "yargs": "^13.3.2" }, "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "color-convert": "^1.9.0" } }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "locate-path": "^3.0.0" } }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "lcid": "^1.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "p-try": "^2.0.0" } }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { - "camelcase": "^3.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -14503,9 +14593,9 @@ }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -14659,8 +14749,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -14675,13 +14764,22 @@ } }, "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz", + "integrity": "sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==", "dev": true, "requires": { "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" + "uuid": "^3.4.0", + "websocket-driver": "0.6.5" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } } }, "sockjs-client": { @@ -15576,17 +15674,17 @@ "dev": true }, "svgo": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.0.tgz", - "integrity": "sha512-MLfUA6O+qauLDbym+mMZgtXCGRfIxyQoeH6IKVcFslyODEe/ElJNwr0FohQ3xG4C6HK6bk3KYPPXwHVJk3V5NQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", "dev": true, "requires": { "chalk": "^2.4.1", "coa": "^2.0.2", "css-select": "^2.0.0", "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.33", - "csso": "^3.5.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", "js-yaml": "^3.13.1", "mkdirp": "~0.5.1", "object.values": "^1.1.0", @@ -15617,17 +15715,23 @@ } }, "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", "dev": true, "requires": { "boolbase": "^1.0.0", - "css-what": "^2.1.2", + "css-what": "^3.2.1", "domutils": "^1.7.0", "nth-check": "^1.0.2" } }, + "css-what": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz", + "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==", + "dev": true + }, "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", @@ -16329,9 +16433,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", - "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "dev": true }, "validate-npm-package-license": { @@ -16402,22 +16506,168 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } }, "watchpack": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz", - "integrity": "sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz", + "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==", "dev": true, "requires": { - "chokidar": "^2.1.8", + "chokidar": "^3.4.0", "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true, + "optional": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", + "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "optional": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "optional": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "optional": true + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "watchpack-chokidar2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz", + "integrity": "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "^2.1.8" } }, "wbuf": { @@ -16775,9 +17025,9 @@ } }, "webpack-bundle-analyzer": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.7.0.tgz", - "integrity": "sha512-mETdjZ30a3Yf+NTB/wqTgACK7rAYQl5uxKK0WVTNmF0sM3Uv8s3R58YZMW7Rhu0Lk2Rmuhdj5dcH5Q76zCDVdA==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.8.0.tgz", + "integrity": "sha512-PODQhAYVEourCcOuU+NiYI7WdR8QyELZGgPvB1y2tjbUpbmcQOt5Q7jEK+ttd5se0KSBKD9SXHCEozS++Wllmw==", "dev": true, "requires": { "acorn": "^7.1.1", @@ -16796,15 +17046,15 @@ }, "dependencies": { "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", + "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", "dev": true }, "acorn-walk": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", - "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, "ansi-styles": { @@ -16848,22 +17098,22 @@ } }, "webpack-cli": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.11.tgz", - "integrity": "sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g==", - "dev": true, - "requires": { - "chalk": "2.4.2", - "cross-spawn": "6.0.5", - "enhanced-resolve": "4.1.0", - "findup-sync": "3.0.0", - "global-modules": "2.0.0", - "import-local": "2.0.0", - "interpret": "1.2.0", - "loader-utils": "1.2.3", - "supports-color": "6.1.0", - "v8-compile-cache": "2.0.3", - "yargs": "13.2.4" + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", + "integrity": "sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.1", + "findup-sync": "^3.0.0", + "global-modules": "^2.0.0", + "import-local": "^2.0.0", + "interpret": "^1.4.0", + "loader-utils": "^1.4.0", + "supports-color": "^6.1.0", + "v8-compile-cache": "^2.1.1", + "yargs": "^13.3.2" }, "dependencies": { "ansi-regex": { @@ -16920,16 +17170,11 @@ "wrap-ansi": "^5.1.0" } }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true }, "find-up": { "version": "3.0.0", @@ -16956,6 +17201,26 @@ "resolve-cwd": "^2.0.0" } }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -16966,6 +17231,12 @@ "path-exists": "^3.0.0" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -17052,22 +17323,21 @@ "dev": true }, "yargs": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", - "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.0" + "yargs-parser": "^13.1.2" } }, "yargs-parser": { @@ -17096,9 +17366,9 @@ } }, "webpack-dev-server": { - "version": "3.10.3", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz", - "integrity": "sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz", + "integrity": "sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==", "dev": true, "requires": { "ansi-html": "0.0.7", @@ -17109,39 +17379,76 @@ "debug": "^4.1.1", "del": "^4.1.1", "express": "^4.17.1", - "html-entities": "^1.2.1", + "html-entities": "^1.3.1", "http-proxy-middleware": "0.19.1", "import-local": "^2.0.0", "internal-ip": "^4.3.0", "ip": "^1.1.5", "is-absolute-url": "^3.0.3", "killable": "^1.0.1", - "loglevel": "^1.6.6", + "loglevel": "^1.6.8", "opn": "^5.5.0", "p-retry": "^3.0.1", - "portfinder": "^1.0.25", + "portfinder": "^1.0.26", "schema-utils": "^1.0.0", "selfsigned": "^1.10.7", "semver": "^6.3.0", "serve-index": "^1.9.1", - "sockjs": "0.3.19", + "sockjs": "0.3.20", "sockjs-client": "1.4.0", - "spdy": "^4.0.1", + "spdy": "^4.0.2", "strip-ansi": "^3.0.1", "supports-color": "^6.1.0", "url": "^0.11.0", "webpack-dev-middleware": "^3.7.2", "webpack-log": "^2.0.0", "ws": "^6.2.1", - "yargs": "12.0.5" + "yargs": "^13.3.2" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -17160,6 +17467,12 @@ "locate-path": "^3.0.0" } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", @@ -17225,6 +17538,12 @@ "find-up": "^3.0.0" } }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", @@ -17242,6 +17561,28 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -17251,6 +17592,28 @@ "has-flag": "^3.0.0" } }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "ws": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", @@ -17260,30 +17623,34 @@ "async-limiter": "~1.0.0" } }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -17342,20 +17709,18 @@ } }, "websocket-driver": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", - "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", "dev": true, "requires": { - "http-parser-js": ">=0.4.0 <0.4.11", - "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, "whatwg-encoding": { @@ -17409,9 +17774,9 @@ } }, "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, "worker-farm": { diff --git a/src/Hypnonema.DUI/package.json b/src/Hypnonema.DUI/package.json index 17561c5..36796d8 100644 --- a/src/Hypnonema.DUI/package.json +++ b/src/Hypnonema.DUI/package.json @@ -19,7 +19,7 @@ "prop-types": "^15.6.2", "react": "^16.13.1", "react-dom": "^16.13.1", - "react-player": "^1.15.3" + "react-player": "^2.5.0" }, "devDependencies": { "babel-core": "^6.26.3", @@ -32,23 +32,23 @@ "css-loader": "^1.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.2", - "enzyme-to-json": "^3.4.4", + "enzyme-to-json": "^3.5.0", "file-loader": "^1.1.11", - "html-inline-css-webpack-plugin": "^1.8.0", + "html-inline-css-webpack-plugin": "^1.8.1", "html-webpack-inline-source-plugin": "0.0.10", "html-webpack-plugin": "^3.2.0", "jest": "^23.4.1", "mini-css-extract-plugin": "^0.4.1", - "node-sass": "^4.14.0", + "node-sass": "^4.14.1", "optimize-css-assets-webpack-plugin": "^5.0.0", "react-test-renderer": "^16.13.1", "sass-loader": "^7.0.3", "style-loader": "^0.21.0", "url-loader": "^1.0.1", "webpack": "^4.43.0", - "webpack-bundle-analyzer": "^3.7.0", - "webpack-cli": "^3.3.11", - "webpack-dev-server": "^3.10.3", + "webpack-bundle-analyzer": "^3.8.0", + "webpack-cli": "^3.3.12", + "webpack-dev-server": "^3.11.0", "webpack-manifest-plugin": "^2.0.3", "webpack-merge": "^4.1.3" }, diff --git a/src/Hypnonema.DUI/src/components/App.jsx b/src/Hypnonema.DUI/src/components/App.jsx index 4378071..fc28d6c 100644 --- a/src/Hypnonema.DUI/src/components/App.jsx +++ b/src/Hypnonema.DUI/src/components/App.jsx @@ -47,7 +47,7 @@ class App extends Component { played: 0, loaded: 0, pip: false, - }) + }); }; // although not very nice, this method removes branding and stuff.. @@ -63,7 +63,7 @@ class App extends Component { `; const iframeRef = document.getElementsByTagName('iframe')[0]; - if (typeof(iframeRef) !== 'undefined' && iframeRef !== null) { + if (typeof (iframeRef) !== 'undefined' && iframeRef !== null) { const head = iframeRef.contentDocument.getElementsByTagName('head')[0]; const style = iframeRef.contentDocument.createElement('style'); head.appendChild(style); @@ -103,7 +103,21 @@ class App extends Component { }; handleVolume = (volume) => { - this.setState({volume: parseFloat(volume)}) + const vol = parseFloat(volume); + + // twitch requires currently to be manually muted. + const url = new URL(this.state.url); + if (url.hostname.includes('twitch')) { + const currentPlayer = this.player.getInternalPlayer(); + + if (vol > 0) { + currentPlayer.setMuted(false); + } else { + currentPlayer.setMuted(true); + } + } + + this.setState({volume: vol}); }; handleSeek = (time) => { @@ -115,7 +129,7 @@ class App extends Component { }; enable3DAudio = (value) => { - this.setState({is3DAudioEnabled: value}) + this.setState({is3DAudioEnabled: value}) }; sendDuiResponse = (url, body) => { @@ -133,7 +147,8 @@ class App extends Component { duration: this.state.duration, currentSource: this.state.url, ended: this.player.getCurrentTime() === this.player.getDuration(), - screenName: this.state.screenName + screenName: this.state.screenName, + repeat: this.state.loop, } }; @@ -169,10 +184,40 @@ class App extends Component { this.sendDuiResponse(url, body); }; + handleMute = (muted) => { + if (this.state.playing && (this.player !== null && this.player !== undefined)) { + this.setState({muted: muted}); + } + }; + handleTick = (listenerObj, pannerObj) => { this.audio3D.onTick(listenerObj, pannerObj); }; + handleReady = () => { + const url = new URL(this.state.url); + + // twitch mature audience fix + if (url.hostname.includes('twitch')) { + + const iframeRef = document.getElementsByTagName('iframe')[0]; + if (typeof (iframeRef) !== 'undefined' && iframeRef !== null) { + + // selects the accept button + const elements = iframeRef.contentDocument.querySelectorAll('[data-a-target="player-overlay-mature-accept"]'); + if (elements.length !== 0) { + elements[0].click(); + } + + // unmute player if muted + const twitchPlayer = this.player.getInternalPlayer(); + if (twitchPlayer.getMuted()) { + twitchPlayer.setMuted(false); + } + } + } + }; + handleMessage = (ev) => { switch (ev.data.type) { case 'init': @@ -182,6 +227,9 @@ class App extends Component { case 'play': this.loadAndPlay(ev.data.src.url); break; + case 'mute': + this.handleMute(ev.data.muted); + break; case 'toggle3DAudio': this.enable3DAudio(ev.data.enabled); break; @@ -196,6 +244,7 @@ class App extends Component { } this.handleSeek(ev.data.currentTime); + this.setState({loop: ev.data.repeat}); break; case 'seek': this.handleSeek(ev.data.time); @@ -215,7 +264,7 @@ class App extends Component { case 'volume': this.handleVolume(ev.data.volume); break; - case 'toggleReplay': + case 'toggleRepeat': this.handleToggleLoop(); break; default: @@ -257,6 +306,7 @@ class App extends Component { volume={volume} muted={muted} onPlay={this.handlePlay} + onReady={this.handleReady} onPause={this.handlePause} onEnded={this.handleEnded} onStart={this.handleStart} @@ -270,6 +320,12 @@ class App extends Component { autoplay: true, } }, + twitch: { + options: { + autoplay: true, + muted: false + } + }, }} /> diff --git a/src/Hypnonema.NUI/src/app/app.component.ts b/src/Hypnonema.NUI/src/app/app.component.ts index 3a9cae4..d92612c 100644 --- a/src/Hypnonema.NUI/src/app/app.component.ts +++ b/src/Hypnonema.NUI/src/app/app.component.ts @@ -58,6 +58,7 @@ export class AppComponent implements OnInit { isPaused: false, currentSource: 'https://youtube.com/blablabla', ended: false, + repeat: false, }; screenStatus = [testStatus]; diff --git a/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.html b/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.html index b41202d..ff5152d 100644 --- a/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.html +++ b/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.html @@ -2,6 +2,15 @@
+ + + repeat + + + repeat + + + stop diff --git a/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.scss b/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.scss index ad22931..5604d00 100644 --- a/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.scss +++ b/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.scss @@ -58,7 +58,8 @@ mat-form-field { &__progress { &__start { - width: 15%; + width: 10%; + padding-left: 8%; display: flex; } & { @@ -74,7 +75,7 @@ mat-form-field { } &__bar { - width: 100%; + width: 80%; padding: 0 15px; } mat-slider { diff --git a/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.ts b/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.ts index 1b4d172..7200e6d 100644 --- a/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.ts +++ b/src/Hypnonema.NUI/src/app/layout/current-track/current-track.component.ts @@ -74,6 +74,15 @@ export class CurrentTrackComponent implements OnInit { }, 500); } + repeat(screenName: string) { + this.nuiService.repeatVideo(screenName); + + const refThis = this; + setTimeout(() => { + refThis.nuiService.requestDuiState(this.selectedScreenName); + }, 250); + } + resumeOrPause(paused) { if (paused) { this.nuiService.resumeVideo(this.selectedScreenName); diff --git a/src/Hypnonema.NUI/src/app/modules/core/nui.service.ts b/src/Hypnonema.NUI/src/app/modules/core/nui.service.ts index 62a97ec..087f3e0 100644 --- a/src/Hypnonema.NUI/src/app/modules/core/nui.service.ts +++ b/src/Hypnonema.NUI/src/app/modules/core/nui.service.ts @@ -9,6 +9,13 @@ export class NuiService { constructor(private http: HttpClient) { } + public repeatVideo(screenName: string) { + this.http.post(`http://${environment.resourceName}/Hypnonema.OnToggleRepeat`, { + screenName + }).subscribe(() => { + }, error => console.log(error.toString())); + } + public editScreen(screenName: string, screenId: number, is3DRendered: boolean, alwaysOn: boolean, modelName: string, renderTargetName: string, globalVolume: number, soundAttenuation: number, soundMinDistance: number, soundMaxDistance: number, positionX: number, positionY: number, positionZ: number, rotationX: number, @@ -87,7 +94,7 @@ export class NuiService { } public createScreen(screenName: string, alwaysOn: boolean, globalVolume: number, soundAttenuation: number, - soundMinDistance: number, soundMaxDistance: number, is3DRendered: boolean, use3DAudio: boolean, modelName?: string, + soundMinDistance: number, soundMaxDistance: number, is3DRendered: boolean, is3DAudioEnabled: boolean, modelName?: string, renderTargetName?: string, positionX?: number, positionY?: number, positionZ?: number, rotationX?: number, rotationY?: number, rotationZ?: number, scaleX?: number, scaleY?: number, scaleZ?: number, ) { @@ -110,7 +117,7 @@ export class NuiService { scaleX, scaleY, scaleZ, - use3DAudio, + is3DAudioEnabled, }) .subscribe(() => { }, error => { diff --git a/src/Hypnonema.NUI/src/app/modules/status/status.component.html b/src/Hypnonema.NUI/src/app/modules/status/status.component.html index 7bd229a..a8b2409 100644 --- a/src/Hypnonema.NUI/src/app/modules/status/status.component.html +++ b/src/Hypnonema.NUI/src/app/modules/status/status.component.html @@ -21,7 +21,12 @@

Status

- Playing + + Playing + + + Repeating + diff --git a/src/Hypnonema.NUI/src/app/screen-model.ts b/src/Hypnonema.NUI/src/app/screen-model.ts index cc36d08..8311bde 100644 --- a/src/Hypnonema.NUI/src/app/screen-model.ts +++ b/src/Hypnonema.NUI/src/app/screen-model.ts @@ -40,4 +40,5 @@ export interface ScreenStatus { duration: number; currentSource: string; ended: boolean; + repeat: boolean; } diff --git a/src/Hypnonema.Server/Hypnonema.Server.csproj b/src/Hypnonema.Server/Hypnonema.Server.csproj index 4b3da1c..fc25851 100644 --- a/src/Hypnonema.Server/Hypnonema.Server.csproj +++ b/src/Hypnonema.Server/Hypnonema.Server.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/Hypnonema.Server/ServerScript.cs b/src/Hypnonema.Server/ServerScript.cs index d4e460f..edcbd44 100644 --- a/src/Hypnonema.Server/ServerScript.cs +++ b/src/Hypnonema.Server/ServerScript.cs @@ -35,25 +35,6 @@ public class ServerScript : BaseScript private int syncInterval = 5000; - public ServerScript() - { - this.RegisterEventHandler("onResourceStart", new Action(this.OnResourceStart)); - this.RegisterEventHandler("onResourceStop", new Action(this.OnResourceStop)); - this.RegisterEventHandler(ServerEvents.OnInitialize, new Action(this.OnClientInitialize)); - this.RegisterEventHandler(ServerEvents.OnEditScreen, new Action(this.OnEditScreen)); - this.RegisterEventHandler(ServerEvents.OnCloseScreen, new Action(this.OnCloseScreen)); - this.RegisterEventHandler(ServerEvents.OnDeleteScreen, new Action(this.OnDeleteScreen)); - this.RegisterEventHandler(ServerEvents.OnPause, new Action(this.OnPause)); - this.RegisterEventHandler(ServerEvents.OnStateTick, new Action(this.OnStateTick)); - this.RegisterEventHandler(ServerEvents.OnResumeVideo, new Action(this.OnResume)); - this.RegisterEventHandler( - ServerEvents.OnPlaybackReceived, - new Action(this.OnPlaybackReceived)); - this.RegisterEventHandler(ServerEvents.OnCreateScreen, new Action(this.OnCreateScreen)); - this.RegisterEventHandler(ServerEvents.OnSetVolume, new Action(this.OnSetVolume)); - this.RegisterEventHandler(ServerEvents.OnStopVideo, new Action(this.OnStopVideo)); - } - private static void RegisterCommand(string cmdName, InputArgument handler, bool restricted) { try @@ -86,6 +67,7 @@ private bool IsPlayerAllowed(Player player) /// Triggered from Client at the first Tick. /// /// + [EventHandler(ServerEvents.OnInitialize)] private void OnClientInitialize([FromSource] Player p) { try @@ -125,6 +107,7 @@ private void OnClientInitialize([FromSource] Player p) } } + [EventHandler(ServerEvents.OnCloseScreen)] private void OnCloseScreen([FromSource] Player p, string screenName) { if (!this.IsPlayerAllowed(p)) @@ -136,6 +119,7 @@ private void OnCloseScreen([FromSource] Player p, string screenName) TriggerClientEvent(ClientEvents.CloseScreen, screenName); } + [EventHandler(ServerEvents.OnCreateScreen)] private void OnCreateScreen([FromSource] Player p, string jsonScreen) { if (!this.IsPlayerAllowed(p)) @@ -166,6 +150,7 @@ private void OnCreateScreen([FromSource] Player p, string jsonScreen) } } + [EventHandler(ServerEvents.OnDeleteScreen)] private void OnDeleteScreen([FromSource] Player p, string screenName) { if (!this.IsPlayerAllowed(p)) @@ -181,6 +166,7 @@ private void OnDeleteScreen([FromSource] Player p, string screenName) else this.AddChatMessage(p, $"Error: Screen \"{screenName}\" not found.", new[] { 255, 0, 0 }); } + [EventHandler(ServerEvents.OnEditScreen)] private void OnEditScreen([FromSource] Player p, string jsonScreen) { if (!this.IsPlayerAllowed(p)) return; @@ -213,6 +199,7 @@ private void OnHypnonemaCommand(int source, List args, string raw) this.AddChatMessage(p, "Showing Window"); } + [EventHandler(ServerEvents.OnPause)] private void OnPause([FromSource] Player p, string screenName) { if (!this.IsPlayerAllowed(p)) @@ -224,6 +211,7 @@ private void OnPause([FromSource] Player p, string screenName) TriggerClientEvent(ClientEvents.PauseVideo, screenName); } + [EventHandler(ServerEvents.OnPlaybackReceived)] private void OnPlaybackReceived([FromSource] Player p, string videoUrl, string screenName) { if (!this.IsPlayerAllowed(p)) @@ -260,6 +248,7 @@ private void OnPlaybackReceived([FromSource] Player p, string videoUrl, string s Logger.WriteLine($"playing {videoUrl} on screen {screenName}", Logger.LogLevel.Information); } + [EventHandler("onResourceStart")] private void OnResourceStart(string resourceName) { if (API.GetCurrentResourceName() != resourceName) return; @@ -297,6 +286,7 @@ private void OnResourceStart(string resourceName) RegisterCommand(this.cmdName, new Action, string>(this.OnHypnonemaCommand), true); } + [EventHandler("onResourceStop")] private void OnResourceStop(string resourceName) { if (API.GetCurrentResourceName() != resourceName) return; @@ -304,6 +294,7 @@ private void OnResourceStop(string resourceName) this.database?.Dispose(); } + [EventHandler(ServerEvents.OnResumeVideo)] private void OnResume([FromSource] Player p, string screenName) { if (!this.IsPlayerAllowed(p)) @@ -315,11 +306,13 @@ private void OnResume([FromSource] Player p, string screenName) TriggerClientEvent(ClientEvents.ResumeVideo, screenName); } + [EventHandler(ServerEvents.OnSetVolume)] private void OnSetVolume([FromSource] Player p, float volume, string screenName) { if (this.IsPlayerAllowed(p)) TriggerClientEvent(ClientEvents.SetVolume, volume, screenName); } + [EventHandler(ServerEvents.OnStateTick)] private void OnStateTick([FromSource] Player p, string jsonState) { if (!this.IsPlayerAllowed(p)) return; @@ -337,14 +330,16 @@ private void OnStateTick([FromSource] Player p, string jsonState) } } + [EventHandler(ServerEvents.OnStopVideo)] private void OnStopVideo([FromSource] Player p, string screenName) { if (this.IsPlayerAllowed(p)) TriggerClientEvent(ClientEvents.StopVideo, screenName); } - private void RegisterEventHandler(string eventName, Delegate actionDelegate) + [EventHandler(ServerEvents.OnToggleRepeat)] + private void OnToggleRepeat([FromSource] Player p, string screenName) { - this.EventHandlers.Add(eventName, actionDelegate); + if (this.IsPlayerAllowed(p)) TriggerClientEvent(ClientEvents.ToggleRepeat, screenName); } } } \ No newline at end of file diff --git a/src/Hypnonema.Shared/ClientEvents.cs b/src/Hypnonema.Shared/ClientEvents.cs index 9a908e7..84dcbc9 100644 --- a/src/Hypnonema.Shared/ClientEvents.cs +++ b/src/Hypnonema.Shared/ClientEvents.cs @@ -38,7 +38,7 @@ public static class ClientEvents public const string OnStopVideo = "Hypnonema.OnStopVideo"; - public const string OnToggleReplay = "Hypnonema.OnToggleReplay"; + public const string OnToggleRepeat = "Hypnonema.OnToggleRepeat"; public const string OnVolumeChange = "Hypnonema.OnVolumeChange"; @@ -54,7 +54,7 @@ public static class ClientEvents public const string StopVideo = "Hypnonema.StopVideo"; - public const string ToggleReplay = "Hypnonema.ToggleReplay"; + public const string ToggleRepeat = "Hypnonema.ToggleRepeat"; public const string UpdateState = "Hypnonema.UpdateState"; } diff --git a/src/Hypnonema.Shared/DuiState.cs b/src/Hypnonema.Shared/DuiState.cs index 8d395d5..a896940 100644 --- a/src/Hypnonema.Shared/DuiState.cs +++ b/src/Hypnonema.Shared/DuiState.cs @@ -13,5 +13,7 @@ public class DuiState public bool IsPaused { get; set; } public string ScreenName { get; set; } + + public bool Repeat { get; set; } } } \ No newline at end of file diff --git a/src/Hypnonema.Shared/ServerEvents.cs b/src/Hypnonema.Shared/ServerEvents.cs index bafcf0c..29a688e 100644 --- a/src/Hypnonema.Shared/ServerEvents.cs +++ b/src/Hypnonema.Shared/ServerEvents.cs @@ -24,6 +24,6 @@ public static class ServerEvents public const string OnStopVideo = "Hypnonema.OnStopVideo"; - public const string OnToggleReplay = "Hypnonema.OnToggleReplay"; + public const string OnToggleRepeat = "Hypnonema.OnToggleRepeat"; } } \ No newline at end of file