mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Inline videos and enable player controls for both Mac and iOS. Issue #1952
This commit is contained in:
@@ -130,19 +130,8 @@ function showClickedImage() {
|
||||
window.webkit.messageHandlers.imageWasShown.postMessage("");
|
||||
}
|
||||
|
||||
// Add the playsinline attribute to any HTML5 videos that don"t have it.
|
||||
// Without this attribute videos may autoplay and take over the whole screen
|
||||
// on an iphone when viewing an article.
|
||||
function inlineVideos() {
|
||||
document.querySelectorAll("video").forEach(element => {
|
||||
element.setAttribute("playsinline", true)
|
||||
element.setAttribute("controls", true)
|
||||
});
|
||||
}
|
||||
|
||||
function postRenderProcessing() {
|
||||
ImageViewer.init();
|
||||
inlineVideos();
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', (event) => {
|
||||
|
||||
Reference in New Issue
Block a user