diff --git a/cinera/cinera.c b/cinera/cinera.c index daa962f..27a49e6 100644 --- a/cinera/cinera.c +++ b/cinera/cinera.c @@ -23,7 +23,7 @@ typedef struct version CINERA_APP_VERSION = { .Major = 0, .Minor = 10, - .Patch = 25 + .Patch = 26 }; #define __USE_XOPEN2K8 // NOTE(matt): O_NOFOLLOW diff --git a/cinera/cinera_player_post.js b/cinera/cinera_player_post.js index de2e18f..9cbc389 100644 --- a/cinera/cinera_player_post.js +++ b/cinera/cinera_player_post.js @@ -42,7 +42,7 @@ window.addEventListener("resize", function() { } }); -window.onorientationchange = function() { +screen.orientation.onchange = function() { if(CineraProps.IsMobile) { setTimeout(DelayedUpdateSize, 512, player); diff --git a/cinera/cinera_player_pre.js b/cinera/cinera_player_pre.js index 1ef1124..f781269 100644 --- a/cinera/cinera_player_pre.js +++ b/cinera/cinera_player_pre.js @@ -955,8 +955,7 @@ Player.prototype.InitMobileStyle = function() this.IconifyMenuTogglers(); this.InitMobileControls(); this.ConnectMobileControls(); - var VideoContainer = this.root.querySelector(".video_container"); - this.ApplyMobileStyle(VideoContainer); + this.ApplyMobileStyle(this.videoContainer); } // Call this after changing the size of the video container in order to update the platform player. @@ -1461,7 +1460,10 @@ Player.prototype.onPlatformReady = function() { case vod_platform.VIMEO: { this.videoContainer.style.position = "relative"; - this.videoContainer.style.alignSelf = "unset"; + if(!CineraProps.IsMobile) + { + this.videoContainer.style.alignSelf = "unset"; + } var CallData = { id: this.videoContainer.getAttribute("data-videoId"), diff --git a/cinera/cinera_pre.js b/cinera/cinera_pre.js index cab734c..5b23b3f 100644 --- a/cinera/cinera_pre.js +++ b/cinera/cinera_pre.js @@ -13,6 +13,9 @@ DeriveReliableWindowDimensions() Y: null, }; + var ScrollPosX = window.scrollX; + var ScrollPosY = window.scrollY; + var DisplaySettings = []; for(var i = 0; i < document.body.children.length; ++i) { @@ -40,6 +43,9 @@ DeriveReliableWindowDimensions() Child.style.display = DisplaySettings.shift(); } + ScrollTriggeredInternally = true; + window.scroll(ScrollPosX, ScrollPosY); + return Result; } @@ -76,7 +82,7 @@ function IsVisible(Element, WindowDim) { function GetRealOrientation(PreferredLandscape, IsMobile) { - var Result = window.orientation; + var Result = screen.orientation.angle; var WindowDim = GetWindowDim(IsMobile); if(WindowDim.Y > WindowDim.X) { @@ -317,6 +323,7 @@ function IsInRangeEx(Min, N, Max) } /* Auto-scrolling */ +var ScrollTriggeredInternally = false; var LastScrollYPos = 0; var ScrollTicking = false; var ScrollerFunction; @@ -383,7 +390,11 @@ function InitScrollEventListener(Element, IsMobile, StickyObscuringElement) { window.addEventListener('scroll', function() { - if(ScrollCondition == undefined || ScrollCondition == true) + if(ScrollTriggeredInternally) + { + ScrollTriggeredInternally = false; + } + else if(ScrollCondition == undefined || ScrollCondition == true) { LastScrollYPos = window.scrollY; diff --git a/cinera/cinera_search_pre.js b/cinera/cinera_search_pre.js index 0c7ee2b..0d0073b 100644 --- a/cinera/cinera_search_pre.js +++ b/cinera/cinera_search_pre.js @@ -3866,7 +3866,7 @@ InitResizeEventListener() function InitOrientationChangeListener() { - window.onorientationchange = function() + screen.orientation.onchange = function() { if(CineraProps.IsMobile) {