@@ -41,7 +41,17 @@ import kotlinx.coroutines.flow.onEach
4141import kotlinx.coroutines.launch
4242import kotlinx.coroutines.runBlocking
4343import org.json.JSONObject
44- import org.readium.r2.navigator.*
44+ import org.readium.r2.navigator.DecorableNavigator
45+ import org.readium.r2.navigator.Decoration
46+ import org.readium.r2.navigator.DecorationId
47+ import org.readium.r2.navigator.ExperimentalDecorator
48+ import org.readium.r2.navigator.ExperimentalDragGesture
49+ import org.readium.r2.navigator.NavigatorDelegate
50+ import org.readium.r2.navigator.R
51+ import org.readium.r2.navigator.R2BasicWebView
52+ import org.readium.r2.navigator.SelectableNavigator
53+ import org.readium.r2.navigator.Selection
54+ import org.readium.r2.navigator.VisualNavigator
4555import org.readium.r2.navigator.databinding.ActivityR2ViewpagerBinding
4656import org.readium.r2.navigator.epub.EpubNavigatorViewModel.RunScriptCommand
4757import org.readium.r2.navigator.epub.css.FontFamilyDeclaration
@@ -59,6 +69,7 @@ import org.readium.r2.navigator.preferences.Configurable
5969import org.readium.r2.navigator.preferences.FontFamily
6070import org.readium.r2.navigator.preferences.ReadingProgression
6171import org.readium.r2.navigator.util.createFragmentFactory
72+ import org.readium.r2.shared.DelicateReadiumApi
6273import org.readium.r2.shared.ExperimentalReadiumApi
6374import org.readium.r2.shared.extensions.tryOrLog
6475import org.readium.r2.shared.fetcher.Resource
@@ -154,7 +165,18 @@ class EpubNavigatorFragment internal constructor(
154165 */
155166 val shouldApplyInsetsPadding : Boolean? = true ,
156167
157- internal val javascriptInterfaces : MutableMap <String , JavascriptInterfaceFactory > = mutableMapOf()
168+ internal val javascriptInterfaces : MutableMap <String , JavascriptInterfaceFactory > = mutableMapOf(),
169+
170+ /* *
171+ * Disable user selection if the publication is protected by a DRM (e.g. with LCP).
172+ *
173+ * WARNING: If you choose to disable this, you MUST remove the Copy and Share selection
174+ * menu items in your app. Otherwise, you will void the EDRLab certification for your
175+ * application. If you need help, follow up on:
176+ * https://github.com/readium/kotlin-toolkit/issues/299#issuecomment-1315643577
177+ */
178+ @DelicateReadiumApi
179+ val disableSelectionWhenProtected : Boolean = true
158180 ) {
159181 /* *
160182 * Registers a new factory for the [JavascriptInterface] named [name].
0 commit comments