Skip to content

Commit

Permalink
Fixed #20: added recommended playsinline for videos
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed May 13, 2024
1 parent 89c99ce commit 35ca575
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/nautiluszim/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def extract_to_fs(
def load_collection(self):
"""Load the collection.json"""
if not self.collection:
self.json_collection = []
return
with open(self.collection) as fp:
self.json_collection = [i for i in json.load(fp) if i.get("files", [])]
Expand Down Expand Up @@ -452,7 +453,7 @@ def get_file_entry_from(self, file: str | dict[str, str]) -> tuple:
uri = None
filename = None
if not archive_member and not url:
raise ValueError("archive_member and url are both missing")
raise ValueError("archive-member and url are both missing")
if url:
uri = url
filename = Path(url).name
Expand Down
4 changes: 3 additions & 1 deletion src/nautiluszim/templates/nautilus.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,16 @@ var Nautilus = (function() {

Nautilus.prototype.init_videojs = function () {
videojs.options.controls = true;
videojs.options.playsinline = true;
videojs.options.crossorigin = true;
videojs.options.preload = "auto";
videojs.options.techOrder = ["html5", "ogvjs"];
videojs.options.ogvjs = {base: "vendors/ogvjs"};
videojs.options.controlBar = {pictureInPictureToggle: false};
// for some reason, global controls options is not working
window.videojs_options = {controls: true,
preload: 'auto',
preload: 'auto',
playsinline: true,
crossorigin: true,
controlBar: {pictureInPictureToggle: false}};
};
Expand Down

0 comments on commit 35ca575

Please sign in to comment.