Skip to content

Commit 2214d2e

Browse files
authored
Fix streaming with LCP documentation (#645)
1 parent a7cd0e0 commit 2214d2e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/guides/lcp.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,27 @@ Simply open the License Document directly using the `PublicationOpener`. Make su
202202
```kotlin
203203
// Instantiate the required components.
204204
val httpClient = DefaultHttpClient()
205+
205206
val assetRetriever = AssetRetriever(
206207
contentResolver = context.contentResolver,
207208
httpClient = httpClient
208209
)
210+
211+
val lcpService = LcpService(
212+
context = context,
213+
assetRetriever = assetRetriever
214+
) ?: error("liblcp is missing on the classpath")))
215+
216+
val authentication = LcpDialogAuthentication()
217+
209218
val publicationOpener = PublicationOpener(
210219
publicationParser = DefaultPublicationParser(
211220
context,
212221
httpClient = httpClient,
213222
assetRetriever = assetRetriever
223+
),
224+
contentProtections = listOf(
225+
lcpService.contentProtection(authentication)
214226
)
215227
)
216228

0 commit comments

Comments
 (0)