mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-08-04 10:36:56 +00:00
refactor: optimize player UI resizing to avoid animations
This commit is contained in:
parent
14a461ab92
commit
4913800b6a
3 changed files with 12 additions and 10 deletions
|
|
@ -1183,9 +1183,6 @@ static NSString *redactUrlsInText(NSString *text) {
|
|||
_webView = [[WKWebView alloc] initWithFrame:_hostView.bounds configuration:configuration];
|
||||
_webView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||
_webView.wantsLayer = YES;
|
||||
_webView.layerContentsRedrawPolicy = NSViewLayerContentsRedrawDuringViewResize;
|
||||
_webView.layer.needsDisplayOnBoundsChange = YES;
|
||||
_webView.layer.drawsAsynchronously = YES;
|
||||
[_webView setValue:@NO forKey:@"drawsBackground"];
|
||||
[_hostView addSubview:_webView positioned:NSWindowAbove relativeTo:_videoView];
|
||||
NSURL *controlsURL = [NSURL URLWithString:controlsUrl ?: @""];
|
||||
|
|
|
|||
|
|
@ -160,10 +160,19 @@ button:disabled {
|
|||
transition: opacity 160ms ease;
|
||||
}
|
||||
|
||||
.player.native-resizing,
|
||||
.player.native-resizing * {
|
||||
.player.native-resizing .top-gradient,
|
||||
.player.native-resizing .bottom-gradient,
|
||||
.player.native-resizing .metadata,
|
||||
.player.native-resizing .parental-guide,
|
||||
.player.native-resizing .skip-prompt,
|
||||
.player.native-resizing .next-episode-card,
|
||||
.player.native-resizing .header-actions,
|
||||
.player.native-resizing .center-controls,
|
||||
.player.native-resizing .progress,
|
||||
.player.native-resizing .locked-overlay,
|
||||
.player.native-resizing .modal-layer,
|
||||
.player.native-resizing .track-panel {
|
||||
transition-duration: 1ms !important;
|
||||
animation-duration: 1ms !important;
|
||||
}
|
||||
|
||||
.player.chrome-hidden .top-gradient,
|
||||
|
|
|
|||
|
|
@ -1391,10 +1391,6 @@ window.nuvioNativeViewportChanged = () => {
|
|||
if (activeModal) renderActiveModal();
|
||||
};
|
||||
|
||||
window.addEventListener("resize", () => {
|
||||
window.nuvioNativeViewportChanged();
|
||||
});
|
||||
|
||||
const trackListSignature = tracks =>
|
||||
normalizeTracks(tracks)
|
||||
.map(track => [
|
||||
|
|
|
|||
Loading…
Reference in a new issue