Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "ZipArchive/ZipArchive" == 2.1.1
github "cxa/MenuItemKit" == 3.0.0
github "cxa/MenuItemKit" == 3.1.3
github "alexpopov/ZFDragableModalTransition" "merge-carthage-into-zoonooz"
github "tadija/AEXML" == 4.2.2
github "ArtSabintsev/FontBlaster" == 4.0.1
github "tadija/AEXML" == 4.3.3
github "ArtSabintsev/FontBlaster" == 4.1.0
github "jessesquires/JSQWebViewController" == 6.0.0
github "realm/realm-cocoa" == 3.1.1
github "realm/realm-cocoa" == 3.13.0
8 changes: 4 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "ArtSabintsev/FontBlaster" "4.0.1"
github "ArtSabintsev/FontBlaster" "4.1.0"
github "ZipArchive/ZipArchive" "v2.1.1"
github "alexpopov/ZFDragableModalTransition" "8da951efb4202385630d1cf7104b60d1208f807e"
github "cxa/MenuItemKit" "3.0.0"
github "cxa/MenuItemKit" "3.1.3"
github "jessesquires/JSQWebViewController" "6.0.0"
github "realm/realm-cocoa" "v3.1.1"
github "tadija/AEXML" "4.2.2"
github "realm/realm-cocoa" "v3.13.0"
github "tadija/AEXML" "4.3.3"
8 changes: 4 additions & 4 deletions FolioReaderKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Pod::Spec.new do |s|

s.libraries = "z"
s.dependency 'SSZipArchive', '2.1.1'
s.dependency 'MenuItemKit', '3.0.0'
s.dependency 'MenuItemKit', '3.1.3'
s.dependency 'ZFDragableModalTransition', '0.6'
s.dependency 'AEXML', '4.2.2'
s.dependency 'FontBlaster', '4.0.1'
s.dependency 'AEXML', '4.3.3'
s.dependency 'FontBlaster', '4.1.0'
s.dependency 'JSQWebViewController', '6.0.0'
s.dependency 'RealmSwift', '3.1.1'
s.dependency 'RealmSwift', '3.13.0'

end
54 changes: 35 additions & 19 deletions FolioReaderKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
146014E621ECBBFB0000456B /* AEXML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 146014DF21ECBBFB0000456B /* AEXML.framework */; };
146014E721ECBBFB0000456B /* FontBlaster.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 146014E021ECBBFB0000456B /* FontBlaster.framework */; };
146014EA21ECBBFB0000456B /* JSQWebViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 146014E321ECBBFB0000456B /* JSQWebViewController.framework */; };
146014EE21ECC27F0000456B /* ZFDragableModalTransition.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 146014ED21ECC27F0000456B /* ZFDragableModalTransition.framework */; };
1A41E8912031E22300A8F70C /* MediaType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A41E8902031E22300A8F70C /* MediaType.swift */; };
1A65DDCC1DA73F8E0033C277 /* MenuItemKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A65DDCB1DA73F8D0033C277 /* MenuItemKit.framework */; };
1A65DDD21DA744190033C277 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A65DDD01DA744190033C277 /* Realm.framework */; };
Expand Down Expand Up @@ -103,10 +107,6 @@
B0D69CC81D0387F7003B4CCD /* HADiscreteSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D69C441D0387F7003B4CCD /* HADiscreteSlider.swift */; };
B0D69CC91D0387F7003B4CCD /* SMSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D69C461D0387F7003B4CCD /* SMSegment.swift */; };
B0D69CCA1D0387F7003B4CCD /* SMSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D69C471D0387F7003B4CCD /* SMSegmentView.swift */; };
B0D69CD11D0388EF003B4CCD /* AEXML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0D69CCB1D0388EF003B4CCD /* AEXML.framework */; };
B0D69CD21D0388EF003B4CCD /* FontBlaster.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0D69CCC1D0388EF003B4CCD /* FontBlaster.framework */; };
B0D69CD31D0388EF003B4CCD /* JSQWebViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0D69CCD1D0388EF003B4CCD /* JSQWebViewController.framework */; };
B0D69CD51D0388EF003B4CCD /* ZFDragableModalTransition.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0D69CCF1D0388EF003B4CCD /* ZFDragableModalTransition.framework */; };
B0D69CD61D0388EF003B4CCD /* ZipArchive.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0D69CD01D0388EF003B4CCD /* ZipArchive.framework */; };
/* End PBXBuildFile section */

Expand All @@ -121,6 +121,14 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
146014DF21ECBBFB0000456B /* AEXML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AEXML.framework; path = Carthage/Build/iOS/AEXML.framework; sourceTree = "<group>"; };
146014E021ECBBFB0000456B /* FontBlaster.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FontBlaster.framework; path = Carthage/Build/iOS/FontBlaster.framework; sourceTree = "<group>"; };
146014E121ECBBFB0000456B /* ZipArchive.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZipArchive.framework; path = Carthage/Build/iOS/ZipArchive.framework; sourceTree = "<group>"; };
146014E221ECBBFB0000456B /* MenuItemKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MenuItemKit.framework; path = Carthage/Build/iOS/MenuItemKit.framework; sourceTree = "<group>"; };
146014E321ECBBFB0000456B /* JSQWebViewController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JSQWebViewController.framework; path = Carthage/Build/iOS/JSQWebViewController.framework; sourceTree = "<group>"; };
146014E421ECBBFB0000456B /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = "<group>"; };
146014E521ECBBFB0000456B /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = "<group>"; };
146014ED21ECC27F0000456B /* ZFDragableModalTransition.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZFDragableModalTransition.framework; path = Carthage/Build/iOS/ZFDragableModalTransition.framework; sourceTree = "<group>"; };
1A41E8902031E22300A8F70C /* MediaType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaType.swift; sourceTree = "<group>"; };
1A65DDCB1DA73F8D0033C277 /* MenuItemKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MenuItemKit.framework; path = Carthage/Build/iOS/MenuItemKit.framework; sourceTree = "<group>"; };
1A65DDD01DA744190033C277 /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -187,10 +195,6 @@
B0D69C441D0387F7003B4CCD /* HADiscreteSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HADiscreteSlider.swift; sourceTree = "<group>"; };
B0D69C461D0387F7003B4CCD /* SMSegment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SMSegment.swift; sourceTree = "<group>"; };
B0D69C471D0387F7003B4CCD /* SMSegmentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SMSegmentView.swift; sourceTree = "<group>"; };
B0D69CCB1D0388EF003B4CCD /* AEXML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AEXML.framework; path = Carthage/Build/iOS/AEXML.framework; sourceTree = "<group>"; };
B0D69CCC1D0388EF003B4CCD /* FontBlaster.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FontBlaster.framework; path = Carthage/Build/iOS/FontBlaster.framework; sourceTree = "<group>"; };
B0D69CCD1D0388EF003B4CCD /* JSQWebViewController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JSQWebViewController.framework; path = Carthage/Build/iOS/JSQWebViewController.framework; sourceTree = "<group>"; };
B0D69CCF1D0388EF003B4CCD /* ZFDragableModalTransition.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZFDragableModalTransition.framework; path = Carthage/Build/iOS/ZFDragableModalTransition.framework; sourceTree = "<group>"; };
B0D69CD01D0388EF003B4CCD /* ZipArchive.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZipArchive.framework; path = Carthage/Build/iOS/ZipArchive.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -200,13 +204,13 @@
buildActionMask = 2147483647;
files = (
1A65DDCC1DA73F8E0033C277 /* MenuItemKit.framework in Frameworks */,
B0D69CD11D0388EF003B4CCD /* AEXML.framework in Frameworks */,
B0D69CD21D0388EF003B4CCD /* FontBlaster.framework in Frameworks */,
B0D69CD31D0388EF003B4CCD /* JSQWebViewController.framework in Frameworks */,
B0D69CD51D0388EF003B4CCD /* ZFDragableModalTransition.framework in Frameworks */,
146014EE21ECC27F0000456B /* ZFDragableModalTransition.framework in Frameworks */,
146014EA21ECBBFB0000456B /* JSQWebViewController.framework in Frameworks */,
146014E621ECBBFB0000456B /* AEXML.framework in Frameworks */,
B0D69CD61D0388EF003B4CCD /* ZipArchive.framework in Frameworks */,
1A65DDD21DA744190033C277 /* Realm.framework in Frameworks */,
1A65DDD31DA744190033C277 /* RealmSwift.framework in Frameworks */,
146014E721ECBBFB0000456B /* FontBlaster.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -401,10 +405,14 @@
B0D69B501D0365AC003B4CCD /* Frameworks */ = {
isa = PBXGroup;
children = (
B0D69CCB1D0388EF003B4CCD /* AEXML.framework */,
B0D69CCC1D0388EF003B4CCD /* FontBlaster.framework */,
B0D69CCD1D0388EF003B4CCD /* JSQWebViewController.framework */,
B0D69CCF1D0388EF003B4CCD /* ZFDragableModalTransition.framework */,
146014ED21ECC27F0000456B /* ZFDragableModalTransition.framework */,
146014DF21ECBBFB0000456B /* AEXML.framework */,
146014E021ECBBFB0000456B /* FontBlaster.framework */,
146014E321ECBBFB0000456B /* JSQWebViewController.framework */,
146014E221ECBBFB0000456B /* MenuItemKit.framework */,
146014E521ECBBFB0000456B /* Realm.framework */,
146014E421ECBBFB0000456B /* RealmSwift.framework */,
146014E121ECBBFB0000456B /* ZipArchive.framework */,
B0D69CD01D0388EF003B4CCD /* ZipArchive.framework */,
);
name = Frameworks;
Expand Down Expand Up @@ -495,7 +503,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = FolioReader;
TargetAttributes = {
B0D6990A1D035FA2003B4CCD = {
Expand Down Expand Up @@ -671,12 +679,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -729,12 +739,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -771,6 +783,7 @@
B0D699201D035FA2003B4CCD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
Expand All @@ -783,17 +796,19 @@
);
INFOPLIST_FILE = FolioReaderKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.folioreader.FolioReaderKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
B0D699211D035FA2003B4CCD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
Expand All @@ -806,11 +821,12 @@
);
INFOPLIST_FILE = FolioReaderKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.folioreader.FolioReaderKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -56,7 +55,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
18 changes: 9 additions & 9 deletions Source/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import Foundation
import UIKit

extension UICollectionViewScrollDirection {
static func direction(withConfiguration readerConfig: FolioReaderConfig) -> UICollectionViewScrollDirection {
extension UICollectionView.ScrollDirection {
static func direction(withConfiguration readerConfig: FolioReaderConfig) -> UICollectionView.ScrollDirection {
return readerConfig.isDirection(.vertical, .horizontal, .horizontal)
}
}

extension UICollectionViewScrollPosition {
static func direction(withConfiguration readerConfig: FolioReaderConfig) -> UICollectionViewScrollPosition {
extension UICollectionView.ScrollPosition {
static func direction(withConfiguration readerConfig: FolioReaderConfig) -> UICollectionView.ScrollPosition {
return readerConfig.isDirection(.top, .left, .left)
}
}
Expand Down Expand Up @@ -462,20 +462,20 @@ internal extension UIViewController {
navBar?.showBottomHairline()
navBar?.isTranslucent = translucent
navBar?.tintColor = tintColor
navBar?.titleTextAttributes = [NSAttributedStringKey.foregroundColor: titleColor, NSAttributedStringKey.font: font]
navBar?.titleTextAttributes = [NSAttributedString.Key.foregroundColor: titleColor, NSAttributedString.Key.font: font]
}
}

internal extension UINavigationBar {

func hideBottomHairline() {
let navigationBarImageView = hairlineImageViewInNavigationBar(self)
navigationBarImageView!.isHidden = true
guard let navigationBarImageView = hairlineImageViewInNavigationBar(self) else {return}
navigationBarImageView.isHidden = true
}

func showBottomHairline() {
let navigationBarImageView = hairlineImageViewInNavigationBar(self)
navigationBarImageView!.isHidden = false
guard let navigationBarImageView = hairlineImageViewInNavigationBar(self) else {return}
navigationBarImageView.isHidden = false
}

fileprivate func hairlineImageViewInNavigationBar(_ view: UIView) -> UIImageView? {
Expand Down
10 changes: 5 additions & 5 deletions Source/FolioReaderAddHighlightNote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,21 @@ class FolioReaderAddHighlightNote: UIViewController {
let font = UIFont(name: "Avenir-Light", size: 17)!
setTranslucentNavigation(false, color: navBackground, tintColor: tintColor, titleColor: navText, andFont: font)

let titleAttrs = [NSAttributedStringKey.foregroundColor: readerConfig.tintColor]
let titleAttrs = [NSAttributedString.Key.foregroundColor: readerConfig.tintColor]
let saveButton = UIBarButtonItem(title: readerConfig.localizedSave, style: .plain, target: self, action: #selector(saveNote(_:)))
saveButton.setTitleTextAttributes(titleAttrs, for: UIControlState())
saveButton.setTitleTextAttributes(titleAttrs, for: UIControl.State())
navigationItem.rightBarButtonItem = saveButton
}

private func configureKeyboardObserver() {
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name:NSNotification.Name.UIKeyboardWillShow, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name:NSNotification.Name.UIKeyboardWillHide, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name:UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name:UIResponder.keyboardWillHideNotification, object: nil)
}

@objc private func keyboardWillShow(notification: NSNotification){
//give room at the bottom of the scroll view, so it doesn't cover up anything the user needs to tap
var userInfo = notification.userInfo!
var keyboardFrame:CGRect = (userInfo[UIKeyboardFrameBeginUserInfoKey] as! NSValue).cgRectValue
var keyboardFrame:CGRect = (userInfo[UIResponder.keyboardFrameBeginUserInfoKey] as! NSValue).cgRectValue
keyboardFrame = self.view.convert(keyboardFrame, from: nil)

var contentInset:UIEdgeInsets = self.scrollView.contentInset
Expand Down
10 changes: 3 additions & 7 deletions Source/FolioReaderAudioPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,9 @@ open class FolioReaderAudioPlayer: NSObject {

// this is needed to the audio can play even when the "silent/vibrate" toggle is on
let session = AVAudioSession.sharedInstance()
try? session.setCategory(AVAudioSessionCategoryPlayback)
try? session.setCategory(.playback, mode: .default)

NotificationCenter.default.addObserver(self,
selector: #selector(pause),
name: .AVAudioSessionInterruption,
object: session
)
NotificationCenter.default.addObserver(self,selector: #selector(pause),name: AVAudioSession.interruptionNotification,object: session )

self.updateNowPlayingInfo()
}
Expand Down Expand Up @@ -411,7 +407,7 @@ open class FolioReaderAudioPlayer: NSObject {
fileprivate func startPlayerTimer() {
// we must add the timer in this mode in order for it to continue working even when the user is scrolling a webview
playingTimer = Timer(timeInterval: 0.01, target: self, selector: #selector(playerTimerObserver), userInfo: nil, repeats: true)
RunLoop.current.add(playingTimer, forMode: RunLoopMode.commonModes)
RunLoop.current.add(playingTimer, forMode: RunLoop.Mode.common)
}

fileprivate func stopPlayerTimer() {
Expand Down
Loading