diff --git a/src/qml/presenter/Library.qml b/src/qml/presenter/Library.qml index cdb4504..f7b8051 100644 --- a/src/qml/presenter/Library.qml +++ b/src/qml/presenter/Library.qml @@ -338,12 +338,17 @@ Item { function addPres(url) { console.log(pdf.status); let pageCount = 1; - pdf.source = url; - while (pdf.status != 2) { - console.log(pdf.status); - console.log("PAGECOUNT: " + pdf.pageCount); - pageCount = pdf.pageCount; - } + + if (url.endsWith(".pdf")) { + pdf.source = url; + while (pdf.status != 2) { + console.log(pdf.status); + console.log("PAGECOUNT: " + pdf.pageCount); + pageCount = pdf.pageCount; + } + } else + pageCount = 1; + presProxyModel.presentationModel.newItem(url, pageCount); selectedLibrary = "presentation"; presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count() - 1; @@ -377,10 +382,7 @@ Item { } if (presexts.includes(extension)) { - if (file.endsWith(".html")) { - web.url = file; - } else - addPres(file); + addPres(file); } } diff --git a/src/qml/presenter/PresentationEditor.qml b/src/qml/presenter/PresentationEditor.qml index 9c3ab96..c72448e 100644 --- a/src/qml/presenter/PresentationEditor.qml +++ b/src/qml/presenter/PresentationEditor.qml @@ -128,6 +128,7 @@ Item { Layout.alignment: Qt.AlignCenter url: isHtml ? presentation.filePath : "" visible: isHtml + settings.playbackRequiresUserGesture: false } RowLayout { Layout.fillWidth: true; diff --git a/src/rust/reveal_js.rs b/src/rust/reveal_js.rs index f203981..f368375 100644 --- a/src/rust/reveal_js.rs +++ b/src/rust/reveal_js.rs @@ -20,7 +20,7 @@ pub fn count_slides_and_fragments(html_file_path: &str) -> i32 { let total = num_slides + num_fragments; println!( - "SLIDE_NUMBERS: {:?}, {:?}, {:?}", + "SLIDE_NUMBERS: slides: {:?}, fragments: {:?}, total: {:?}", num_slides, num_fragments, total );