Working Offline
LoadingProcess.js
El metodo loadInsideIframe() recibe del host la informacion de reading session (postMessage.data.name = readingSessionData). La a estructura a enviar desde el host es la siguiente:
{
"target": "volpe",
"connectorVersionTarget": "volpe:1.0.0",
"timestamp": "2021-12-16 10:10:10",
"type": "event",
"name": "readingSessionData",
"payload": {
"preview_mode": true,
"token": "XXXXXX",
"coniglio_track_token": "XXXXX",
"features": {
"tts": false,
"search": false,
"concurrency_limit": 1
},
"settings": {
"tenant": {
"lang": "es",
"reader_token_session_url": "", //Volpe dont need this param anymore
"exit_url": "",
"reader": {
"preview": true,
"layout": "",
"epub": { "zoom": false }
}
},
"ui_hidden": false,
"user": { "pdf": { "layout": null }, "epub": { "zoom": false } }
},
"issue": {
"name": "issue.name",
"description": "issue.description",
"file_type": "issue.file_type",
"tags": "issue.tags",
"issue_url": "issue.issue_url",
"issue_full_url": "",
"publication_date": "issue.published_at",
"user": {
"issue_is_favorite": "issue.user.issue_is_favorite",
"last_location": "issue.user.last_location"
},
"twitter_user": "issue.twitter_user"
},
"volpe_url": "this.volpeUrl",
"anonymous_session": null,
"offline_issue": "issue"
}
}
La propiedad offline_issue debe ser null para contenido online, o el objeto issue para contenido descargado (offline).
La carga del issue offline se ve en el metodo LoadingProcess.initPolpoSession()
Overall loading process differences between online and offline:
Online
- app
- Pide data base del issue. Viene de la lista
- Pide data ReaderSettings
- Volpe
- Pide data session (tiene las URL a los files)
Offline
- app
- Pide data base del issue. Viene de la lista
- Pide data ReaderSettings
- Pide data session (tiene las URL a los files)
- Volpe
- Recibe ReaderSettings y session desde la app
Analytics in Offline Mode
Volpe no longer sends analytics events directly to Coniglio. All tracking events (session-start, page-change, heartbeat, etc.) are sent via the Delfino RPC bridge to the host application using hostBridge.analytics.track(). Farfalla (web) forwards events directly to Coniglio. Fenice (mobile and desktop) adds connectivity detection and offline queuing for events other than heartbeat. See the Offline Analytics documentation for the full architecture.
The coniglio_track_token field in the readingSessionData payload below is a legacy field. The host application uses it internally for Coniglio authentication, but Volpe no longer uses it directly.