diff --git a/public/testBooks/multibook-index/history.db b/public/testBooks/multibook-index/history.db deleted file mode 100644 index ce655a8..0000000 Binary files a/public/testBooks/multibook-index/history.db and /dev/null differ diff --git a/public/testBooks/multibook-index/publish-settings.json b/public/testBooks/multibook-index/publish-settings.json deleted file mode 100644 index 261f25e..0000000 --- a/public/testBooks/multibook-index/publish-settings.json +++ /dev/null @@ -1 +0,0 @@ -{"audioVideo":{"pageTurnDelay":3000,"format":"facebook","motion":false,"playerSettings":"","pageRange":[]},"epub":{"howToPublishImageDescriptions":0,"removeFontSizes":false,"mode":"fixed"},"bloomPUB":{"motion":true,"textLangs":{},"audioLangs":{},"signLangs":{},"imageSettings":{"maxWidth":1280,"maxHeight":720}},"bloomLibrary":{"textLangs":{},"audioLangs":{},"signLangs":{},"comic":true}} \ No newline at end of file diff --git a/src/bloom-player-controls.tsx b/src/bloom-player-controls.tsx index 2101755..7e07a6d 100644 --- a/src/bloom-player-controls.tsx +++ b/src/bloom-player-controls.tsx @@ -5,7 +5,7 @@ book inside of the Bloom:Publish:Android screen. import { BloomPlayerCore } from "./bloom-player-core"; import * as ReactDOM from "react-dom"; import { - sendBackToHost, + informHostOfBackAction, showNavBar, hideNavBar, reportBookProperties, @@ -933,7 +933,7 @@ export const BloomPlayerControls: React.FunctionComponent = ( if ( !coreRef.current?.HandleBackButtonClickedIfHavePlayerHistory() ) { - sendBackToHost(); + informHostOfBackAction(); } }} showPlayPause={hasAudio || hasMusic || hasVideo} diff --git a/src/bloom-player-core.tsx b/src/bloom-player-core.tsx index 1e1c122..7907238 100644 --- a/src/bloom-player-core.tsx +++ b/src/bloom-player-core.tsx @@ -3,8 +3,7 @@ bloom-player-core is responsible for all the behavior of working through a book, (other than page turning). */ import * as React from "react"; -import * as ReactDOM from "react-dom"; -import axios, { AxiosPromise } from "axios"; +import axios from "axios"; import Swiper, { SwiperInstance } from "react-id-swiper"; // This loads some JS right here that is a polyfill for the (otherwise discontinued) scoped-styles html feature import "style-scoped/scoped.min.js"; @@ -20,7 +19,6 @@ import { LocalizationManager } from "./l10n/localizationManager"; import { reportAnalytics, reportPlaybackComplete, - sendMessageToHost, setAmbientAnalyticsProperties, updateBookProgressReport, } from "./externalContext"; @@ -30,7 +28,6 @@ import { sendStringToBloomApi, } from "./videoRecordingSupport"; import LangData from "./langData"; -import Replay from "@material-ui/icons/Replay"; // See related comments in controlBar.tsx import IconButton from "@material-ui/core/IconButton"; @@ -83,7 +80,7 @@ import { assembleStyleSheets } from "./stylesheets"; import { canGoBack, checkClickForBookOrPageJump, - goBackInHistoryIfPossible, + tryPopPlayerHistory, } from "./navigation"; // BloomPlayer takes a URL param that directs it to Bloom book. @@ -428,9 +425,7 @@ export class BloomPlayerCore extends React.Component { } // called by bloom-player-controls public HandleBackButtonClickedIfHavePlayerHistory(): boolean { - const backLocation = goBackInHistoryIfPossible( - this.bookInfo.bookInstanceId, - ); + const backLocation = tryPopPlayerHistory(this.bookInfo.bookInstanceId); if (backLocation) { this.navigate(backLocation.bookUrl, backLocation.pageId); return true; @@ -1667,285 +1662,6 @@ export class BloomPlayerCore extends React.Component { } } - // Make a