mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Merge pull request #3364 from bdougsand/issue-2369
Fixes #2369: Video playback is reset on rotation
This commit is contained in:
@@ -80,13 +80,6 @@ class WebViewController: UIViewController {
|
||||
loadWebView()
|
||||
|
||||
}
|
||||
|
||||
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
|
||||
// We need to reload the webview on the iPhone when rotation happens to clear out any old bad viewport sizes
|
||||
if traitCollection.userInterfaceIdiom == .phone {
|
||||
loadWebView()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
|
||||
@@ -155,6 +155,17 @@ function postRenderProcessing() {
|
||||
showFeedInspectorSetup();
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
const meta = document.querySelector("meta[name=viewport]");
|
||||
|
||||
if (!meta) return;
|
||||
|
||||
const originalContent = meta.content;
|
||||
meta.setAttribute("content", originalContent + ", maximum-scale=1.0");
|
||||
meta.setAttribute("content", originalContent);
|
||||
}
|
||||
window.addEventListener("resize", onResize);
|
||||
|
||||
|
||||
function makeHighlightRect({left, top, width, height}, offsetTop=0, offsetLeft=0) {
|
||||
const overlay = document.createElement('a');
|
||||
|
||||
Reference in New Issue
Block a user