@internetarchive/bookreader 5.0.0-86 → 5.0.0-88-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/BookReader/BookReader.js +1 -1
- package/BookReader/ia-bookreader-bundle.js +201 -67
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReaderDemo/IADemoBr.js +0 -10
- package/CHANGELOG.md +3 -0
- package/index.d.ts +21 -0
- package/index.html +1 -1
- package/index.js +2 -0
- package/jsconfig.json +3 -1
- package/package.json +7 -5
- package/src/BookNavigator/search/search-results.js +1 -1
- package/src/plugins/plugin.autoplay.js +6 -1
- package/tests/e2e/autoplay.test.js +1 -1
- package/tests/jest/plugins/plugin.autoplay.test.js +0 -4
- package/BookReaderDemo/BookReaderJSAutoplay.js +0 -59
- package/BookReaderDemo/demo-autoplay.html +0 -37
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[393],{5964:function(t,e,i){i(2008),i(6099);var o,a=i(1669),n=i(1669);a.extend(BookReader.defaultOptions,{enableAutoPlayPlugin:!0}),BookReader.prototype.setup=(o=BookReader.prototype.setup,function(t){o.call(this,t),this.
|
1
|
+
"use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[393],{5964:function(t,e,i){i(2008),i(3792),i(6099),i(7495),i(7764),i(5746),i(2953),i(8408);var o,a=i(1669),n=i(1669);a.extend(BookReader.defaultOptions,{enableAutoPlayPlugin:!0}),BookReader.prototype.setup=(o=BookReader.prototype.setup,function(t){o.call(this,t),this.autoTimer=null,this.flipDelay=5e3}),BookReader.prototype.init=function(t){return function(e){var i=this;t.call(this,e),this.options.enableAutoPlayPlugin&&(this.bind(BookReader.eventNames.stop,(function(){return i.autoStop()})),"1"===new URLSearchParams(window.location.search).get("autoflip")&&this.autoToggle())}}(BookReader.prototype.init),BookReader.prototype.bindNavigationHandlers=function(t){return function(){var e=this;if(t.call(this),this.options.enableAutoPlayPlugin){var i=this.$(".BRicon");i.filter(".play").click((function(){return e.autoToggle(),!1})),i.filter(".pause").click((function(){return e.autoToggle(),!1}))}}}(BookReader.prototype.bindNavigationHandlers),BookReader.prototype.autoToggle=function(t){var e=this;if(this.options.enableAutoPlayPlugin){var i=n.extend({flipSpeed:this.flipSpeed,flipDelay:this.flipDelay},t);this.flipSpeed="number"==typeof i.flipSpeed?i.flipSpeed:this.flipSpeed,this.flipDelay="number"==typeof i.flipDelay?i.flipDelay:this.flipDelay,this.trigger(BookReader.eventNames.stop);var o=!1;this.constMode2up!=this.mode&&(o=!0,this.switchMode(this.constMode2up)),null==this.autoTimer?("rl"==this.pageProgression&&o||this.next({triggerStop:!1}),this.$(".play").hide(),this.$(".pause").show(),this.autoTimer=setInterval((function(){e.animating||(Math.max(e.twoPage.currentIndexL,e.twoPage.currentIndexR)>=e.book.getNumLeafs()-1?e.prev({triggerStop:!1}):e.next({triggerStop:!1}))}),this.flipDelay)):this.autoStop()}},BookReader.prototype.autoStop=function(){this.options.enableAutoPlayPlugin&&null!=this.autoTimer&&(clearInterval(this.autoTimer),this.flipSpeed="fast",this.$(".pause").hide(),this.$(".play").show(),this.autoTimer=null)}}},function(t){t(t.s=5964)}]);
|
2
2
|
//# sourceMappingURL=plugin.autoplay.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugins/plugin.autoplay.js","mappings":"
|
1
|
+
{"version":3,"file":"plugins/plugin.autoplay.js","mappings":"mNAYuCA,E,oBAPvCC,EAAOC,OAAOC,WAAWC,eAAgB,CACvCC,sBAAsB,IAMxBF,WAAWG,UAAUC,OAAkBP,EAOpCG,WAAWG,UAAUC,MANf,SAAUC,GACfR,EAAOS,KAAKC,KAAMF,GAElBE,KAAKC,UAAY,KACjBD,KAAKE,UAAY,GACnB,GAMFT,WAAWG,UAAUO,KAAQ,SAASb,GACpC,OAAO,SAAUQ,GAAS,IAAAM,EAAA,KACxBd,EAAOS,KAAKC,KAAMF,GAEbE,KAAKF,QAAQH,uBAElBK,KAAKK,KAAKZ,WAAWa,WAAWC,MAAM,kBAAMH,EAAKI,UAAU,IAGzB,MADhB,IAAIC,gBAAgBC,OAAOC,SAASC,QACxCC,IAAI,aAChBb,KAAKc,aAET,CACF,CAb6B,CAa1BrB,WAAWG,UAAUO,MAKxBV,WAAWG,UAAUmB,uBAA0B,SAASzB,GACtD,OAAO,WAAW,IAAA0B,EAAA,KAGhB,GAFA1B,EAAOS,KAAKC,MAEPA,KAAKF,QAAQH,qBAAlB,CAEA,IAAMsB,EAASjB,KAAKkB,EAAE,WAEtBD,EAAOE,OAAO,SAASC,OAAM,WAE3B,OADAJ,EAAKF,cACE,CACT,IAEAG,EAAOE,OAAO,UAAUC,OAAM,WAE5B,OADAJ,EAAKF,cACE,CACT,GAZ8C,CAahD,CACF,CAlB+C,CAkB5CrB,WAAWG,UAAUmB,wBAQxBtB,WAAWG,UAAUkB,WAAa,SAASO,GAAW,IAAAC,EAAA,KACpD,GAAKtB,KAAKF,QAAQH,qBAAlB,CAEA,IAAMG,EAAUoB,EAAE1B,OAAO,CACvB+B,UAAWvB,KAAKuB,UAChBrB,UAAWF,KAAKE,WACfmB,GAEHrB,KAAKuB,UAAyC,iBAAtBzB,EAAQyB,UAAyBzB,EAAQyB,UAAYvB,KAAKuB,UAClFvB,KAAKE,UAAyC,iBAAtBJ,EAAQI,UAAyBJ,EAAQI,UAAYF,KAAKE,UAClFF,KAAKwB,QAAQ/B,WAAWa,WAAWC,MAEnC,IAAIkB,GAAiB,EACjBzB,KAAK0B,cAAgB1B,KAAK2B,OAC5BF,GAAiB,EACjBzB,KAAK4B,WAAW5B,KAAK0B,eAGnB,MAAQ1B,KAAKC,WAKV,MAAQD,KAAK6B,iBAAoBJ,GAIpCzB,KAAK8B,KAAK,CAAEC,aAAa,IAG3B/B,KAAKkB,EAAE,SAASc,OAChBhC,KAAKkB,EAAE,UAAUe,OACjBjC,KAAKC,UAAYiC,aAAY,WACvBZ,EAAKa,YAELC,KAAKC,IAAIf,EAAKgB,QAAQC,cAAejB,EAAKgB,QAAQE,gBAAkBlB,EAAKmB,KAAKC,cAAgB,EAChGpB,EAAKqB,KAAK,CAAEZ,aAAa,IAEzBT,EAAKQ,KAAK,CAAEC,aAAa,IAE7B,GAAG/B,KAAKE,YAERF,KAAKQ,UAzCuC,CA2ChD,EAKAf,WAAWG,UAAUY,SAAW,WACzBR,KAAKF,QAAQH,sBAEd,MAAQK,KAAKC,YACf2C,cAAc5C,KAAKC,WACnBD,KAAKuB,UAAY,OACjBvB,KAAKkB,EAAE,UAAUc,OACjBhC,KAAKkB,EAAE,SAASe,OAChBjC,KAAKC,UAAY,KAErB,C","sources":["webpack://@internetarchive/bookreader/./src/plugins/plugin.autoplay.js"],"sourcesContent":["/*global BookReader */\n\n/**\n * Plugin which adds an autoplay feature. Useful for kiosk situations.\n */\njQuery.extend(BookReader.defaultOptions, {\n enableAutoPlayPlugin: true,\n});\n\n/**\n * @override BookReader.setup\n */\nBookReader.prototype.setup = (function(super_) {\n return function (options) {\n super_.call(this, options);\n\n this.autoTimer = null;\n this.flipDelay = 5000;\n };\n})(BookReader.prototype.setup);\n\n/**\n * @override BookReader.init\n */\nBookReader.prototype.init = (function(super_) {\n return function (options) {\n super_.call(this, options);\n\n if (!this.options.enableAutoPlayPlugin) return;\n\n this.bind(BookReader.eventNames.stop, () => this.autoStop());\n\n const urlParams = new URLSearchParams(window.location.search);\n if (urlParams.get('autoflip') === '1') {\n this.autoToggle();\n }\n };\n})(BookReader.prototype.init);\n\n/**\n * @override BookReader.bindNavigationHandlers\n */\nBookReader.prototype.bindNavigationHandlers = (function(super_) {\n return function() {\n super_.call(this);\n\n if (!this.options.enableAutoPlayPlugin) return;\n\n const jIcons = this.$('.BRicon');\n\n jIcons.filter('.play').click(() => {\n this.autoToggle();\n return false;\n });\n\n jIcons.filter('.pause').click(() => {\n this.autoToggle();\n return false;\n });\n };\n})(BookReader.prototype.bindNavigationHandlers);\n\n/**\n * Starts autoplay mode\n * @param {object} overrides\n * @param {number} overrides.flipSpeed\n * @param {number} overrides.flipDelay\n */\nBookReader.prototype.autoToggle = function(overrides) {\n if (!this.options.enableAutoPlayPlugin) return;\n\n const options = $.extend({\n flipSpeed: this.flipSpeed,\n flipDelay: this.flipDelay,\n }, overrides);\n\n this.flipSpeed = typeof options.flipSpeed === \"number\" ? options.flipSpeed : this.flipSpeed;\n this.flipDelay = typeof options.flipDelay === \"number\" ? options.flipDelay : this.flipDelay;\n this.trigger(BookReader.eventNames.stop);\n\n let bComingFrom1up = false;\n if (this.constMode2up != this.mode) {\n bComingFrom1up = true;\n this.switchMode(this.constMode2up);\n }\n\n if (null == this.autoTimer) {\n // $$$ Draw events currently cause layout problems when they occur during animation.\n // There is a specific problem when changing from 1-up immediately to autoplay in RTL so\n // we workaround for now by not triggering immediate animation in that case.\n // See https://bugs.launchpad.net/gnubook/+bug/328327\n if (('rl' == this.pageProgression) && bComingFrom1up) {\n // don't flip immediately -- wait until timer fires\n } else {\n // flip immediately\n this.next({ triggerStop: false });\n }\n\n this.$('.play').hide();\n this.$('.pause').show();\n this.autoTimer = setInterval(() => {\n if (this.animating) return;\n\n if (Math.max(this.twoPage.currentIndexL, this.twoPage.currentIndexR) >= this.book.getNumLeafs() - 1) {\n this.prev({ triggerStop: false }); // $$$ really what we want?\n } else {\n this.next({ triggerStop: false });\n }\n }, this.flipDelay);\n } else {\n this.autoStop();\n }\n};\n\n/**\n * Stop autoplay mode, allowing animations to finish\n */\nBookReader.prototype.autoStop = function() {\n if (!this.options.enableAutoPlayPlugin) return;\n\n if (null != this.autoTimer) {\n clearInterval(this.autoTimer);\n this.flipSpeed = 'fast';\n this.$('.pause').hide();\n this.$('.play').show();\n this.autoTimer = null;\n }\n};\n"],"names":["super_","jQuery","extend","BookReader","defaultOptions","enableAutoPlayPlugin","prototype","setup","options","call","this","autoTimer","flipDelay","init","_this","bind","eventNames","stop","autoStop","URLSearchParams","window","location","search","get","autoToggle","bindNavigationHandlers","_this2","jIcons","$","filter","click","overrides","_this3","flipSpeed","trigger","bComingFrom1up","constMode2up","mode","switchMode","pageProgression","next","triggerStop","hide","show","setInterval","animating","Math","max","twoPage","currentIndexL","currentIndexR","book","getNumLeafs","prev","clearInterval"],"sourceRoot":""}
|
@@ -16,7 +16,6 @@ function getFromUrl(name, def) {
|
|
16
16
|
const ocaid = urlParams.get('ocaid');
|
17
17
|
const openFullImmersionTheater = urlParams.get('view') === 'theater';
|
18
18
|
const ui = urlParams.get('ui');
|
19
|
-
const autoflip = urlParams.get('autoflip');
|
20
19
|
const searchTerm = urlParams.get('q');
|
21
20
|
|
22
21
|
const iaBookReader = document.querySelector('ia-bookreader');
|
@@ -46,12 +45,6 @@ BookReader.optionOverrides.imagesBaseURL = '/BookReader/images/';
|
|
46
45
|
const initializeBookReader = (brManifest) => {
|
47
46
|
console.log('initializeBookReader', brManifest);
|
48
47
|
|
49
|
-
const customAutoflipParams = {
|
50
|
-
autoflip: !!autoflip,
|
51
|
-
flipSpeed: parseFloat(getFromUrl('flipSpeed', '2000')),
|
52
|
-
flipDelay: parseFloat(getFromUrl('flipDelay', '5000')),
|
53
|
-
};
|
54
|
-
|
55
48
|
const options = {
|
56
49
|
el: '#BookReader',
|
57
50
|
/* Url plugin - IA uses History mode for URL */
|
@@ -90,9 +83,6 @@ const initializeBookReader = (brManifest) => {
|
|
90
83
|
|
91
84
|
const isRestricted = brManifest.data.isRestricted;
|
92
85
|
window.dispatchEvent(new CustomEvent('contextmenu', { detail: { isRestricted } }));
|
93
|
-
if (customAutoflipParams.autoflip) {
|
94
|
-
window.br.autoToggle(customAutoflipParams);
|
95
|
-
}
|
96
86
|
};
|
97
87
|
|
98
88
|
window.initializeBookReader = initializeBookReader;
|
package/CHANGELOG.md
CHANGED
package/index.d.ts
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
export type BookreaderOptions = typeof import('./src/BookReader/options').DEFAULT_OPTIONS;
|
2
|
+
|
3
|
+
export declare class Bookreader {
|
4
|
+
version: string;
|
5
|
+
constMode1up: number;
|
6
|
+
constMode2up: number;
|
7
|
+
constModeThumb: number;
|
8
|
+
constNavAnimationDuration: number;
|
9
|
+
constResizeAnimationDuration: number;
|
10
|
+
setup(options: BookreaderOptions): void;
|
11
|
+
trigger(name: string, props: object): void;
|
12
|
+
bind(name: string, callback: Function): void;
|
13
|
+
unbind(name: string, callback: Function): void;
|
14
|
+
resize(): void;
|
15
|
+
setupKeyListeners(): void;
|
16
|
+
drawLeafs(): void;
|
17
|
+
bindGestures(): void;
|
18
|
+
zoom(direction: number): void;
|
19
|
+
resizeBRcontainer(animated: boolean): void;
|
20
|
+
centerPageView(): void;
|
21
|
+
}
|
package/index.html
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
<!-- plugin.search.js -->
|
24
24
|
<li><a href="BookReaderDemo/demo-internetarchive.html?ocaid=adventureofsherl0000unse">From Internet Archive - a book with CHAPTERS</a></li>
|
25
25
|
<li><a href="BookReaderDemo/demo-iiif.html">IIIF</a></li>
|
26
|
-
<li><a href="BookReaderDemo/demo-
|
26
|
+
<li><a href="BookReaderDemo/demo-internetarchive.html?ocaid=goodytwoshoes00newyiala&autoflip=1">Autoplay (kiosk mode)</a></li>
|
27
27
|
<li><a href="BookReaderDemo/demo-plugin-menu-toggle.html">Plugin: Full screen menu toggle</a></li>
|
28
28
|
<li><a href="BookReaderDemo/immersion-mode.html">Start in immersion (fullscreen) mode</a></li>
|
29
29
|
<!-- plugin.search.js -->
|
package/index.js
ADDED
package/jsconfig.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@internetarchive/bookreader",
|
3
|
-
"version": "5.0.0-
|
3
|
+
"version": "5.0.0-88-alpha.1",
|
4
4
|
"description": "The Internet Archive BookReader.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -9,7 +9,9 @@
|
|
9
9
|
"publishConfig": {
|
10
10
|
"access": "public"
|
11
11
|
},
|
12
|
-
"
|
12
|
+
"main": "index.js",
|
13
|
+
"module": "index.js",
|
14
|
+
"types": "index.d.ts",
|
13
15
|
"keywords": [
|
14
16
|
"online",
|
15
17
|
"bookreader",
|
@@ -25,8 +27,8 @@
|
|
25
27
|
"homepage": "https://github.com/internetarchive/bookreader#readme",
|
26
28
|
"private": false,
|
27
29
|
"dependencies": {
|
28
|
-
"@internetarchive/ia-activity-indicator": "^0.0.
|
29
|
-
"@internetarchive/ia-item-navigator": "^2.1.
|
30
|
+
"@internetarchive/ia-activity-indicator": "^0.0.6",
|
31
|
+
"@internetarchive/ia-item-navigator": "^2.1.3-alpha.1",
|
30
32
|
"@internetarchive/icon-bookmark": "^1.3.4",
|
31
33
|
"@internetarchive/icon-dl": "^1.3.4",
|
32
34
|
"@internetarchive/icon-edit-pencil": "^1.3.4",
|
@@ -37,7 +39,7 @@
|
|
37
39
|
"@internetarchive/icon-visual-adjustment": "^1.3.4",
|
38
40
|
"@internetarchive/modal-manager": "^0.2.12",
|
39
41
|
"@internetarchive/shared-resize-observer": "^0.2.0",
|
40
|
-
"lit": "^2.
|
42
|
+
"lit": "^2.8.0"
|
41
43
|
},
|
42
44
|
"devDependencies": {
|
43
45
|
"@babel/core": "7.25.8",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint-disable class-methods-use-this */
|
2
2
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
3
3
|
import { css, html, LitElement, nothing } from 'lit';
|
4
|
-
import '@internetarchive/ia-activity-indicator
|
4
|
+
import '@internetarchive/ia-activity-indicator';
|
5
5
|
import checkmarkIcon from '../assets/icon_checkmark.js';
|
6
6
|
import closeIcon from '../assets/icon_close.js';
|
7
7
|
import buttonCSS from '../assets/button-base.js';
|
@@ -14,7 +14,6 @@ BookReader.prototype.setup = (function(super_) {
|
|
14
14
|
return function (options) {
|
15
15
|
super_.call(this, options);
|
16
16
|
|
17
|
-
this.auto = false;
|
18
17
|
this.autoTimer = null;
|
19
18
|
this.flipDelay = 5000;
|
20
19
|
};
|
@@ -28,7 +27,13 @@ BookReader.prototype.init = (function(super_) {
|
|
28
27
|
super_.call(this, options);
|
29
28
|
|
30
29
|
if (!this.options.enableAutoPlayPlugin) return;
|
30
|
+
|
31
31
|
this.bind(BookReader.eventNames.stop, () => this.autoStop());
|
32
|
+
|
33
|
+
const urlParams = new URLSearchParams(window.location.search);
|
34
|
+
if (urlParams.get('autoflip') === '1') {
|
35
|
+
this.autoToggle();
|
36
|
+
}
|
32
37
|
};
|
33
38
|
})(BookReader.prototype.init);
|
34
39
|
|
@@ -5,7 +5,7 @@ const getLocationHref = ClientFunction(() => window.location.href.toString());
|
|
5
5
|
const FLIP_SPEED = 1000;
|
6
6
|
const FIRST_PAGE_DELAY = 2000;
|
7
7
|
|
8
|
-
fixture `Autoplay plugin`.page `${params.baseUrl}/BookReaderDemo/demo-
|
8
|
+
fixture `Autoplay plugin`.page `${params.baseUrl}/BookReaderDemo/demo-internetarchive.html?ocaid=goody&autoflip=1`;
|
9
9
|
|
10
10
|
test('page auto-advances after allotted flip speed and delay', async t => {
|
11
11
|
await t.wait(2 * FLIP_SPEED + FIRST_PAGE_DELAY);
|
@@ -18,10 +18,6 @@ describe('Plugin: Menu Toggle', () => {
|
|
18
18
|
test('has option flag', () => {
|
19
19
|
expect(BookReader.defaultOptions.enableAutoPlayPlugin).toEqual(true);
|
20
20
|
});
|
21
|
-
test('has added BR property: auto', () => {
|
22
|
-
expect(br).toHaveProperty('auto');
|
23
|
-
expect(br.auto).toEqual(false);
|
24
|
-
});
|
25
21
|
test('has added BR property: autoTimer', () => {
|
26
22
|
expect(br).toHaveProperty('autoTimer');
|
27
23
|
expect(br.autoTimer).toEqual(null);
|
@@ -1,59 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// This file shows the minimum you need to provide to BookReader to display a book
|
3
|
-
//
|
4
|
-
// Copyright(c)2008-2009 Internet Archive. Software license AGPL version 3.
|
5
|
-
|
6
|
-
// Create the BookReader object
|
7
|
-
function instantiateBookReader(selector, extraOptions) {
|
8
|
-
selector = selector || '#BookReader';
|
9
|
-
extraOptions = extraOptions || {};
|
10
|
-
var options = {
|
11
|
-
ppi: 100,
|
12
|
-
data: [
|
13
|
-
[
|
14
|
-
{ width: 800, height: 1200,
|
15
|
-
uri: '//archive.org/download/BookReader/img/page001.jpg' },
|
16
|
-
],
|
17
|
-
[
|
18
|
-
{ width: 800, height: 1200,
|
19
|
-
uri: '//archive.org/download/BookReader/img/page002.jpg' },
|
20
|
-
{ width: 800, height: 1200,
|
21
|
-
uri: '//archive.org/download/BookReader/img/page003.jpg' },
|
22
|
-
],
|
23
|
-
[
|
24
|
-
{ width: 800, height: 1200,
|
25
|
-
uri: '//archive.org/download/BookReader/img/page004.jpg' },
|
26
|
-
{ width: 800, height: 1200,
|
27
|
-
uri: '//archive.org/download/BookReader/img/page005.jpg' },
|
28
|
-
]
|
29
|
-
],
|
30
|
-
|
31
|
-
// Book title and the URL used for the book title link
|
32
|
-
bookTitle: 'BookReader Demo',
|
33
|
-
bookUrl: '../index.html',
|
34
|
-
bookUrlText: 'Back to Demos',
|
35
|
-
bookUrlTitle: 'This is the book URL title',
|
36
|
-
|
37
|
-
// thumbnail is optional, but it is used in the info dialog
|
38
|
-
thumbnail: '//archive.org/download/BookReader/img/page014.jpg',
|
39
|
-
// Metadata is optional, but it is used in the info dialog
|
40
|
-
metadata: [
|
41
|
-
{label: 'Title', value: 'Open Library BookReader Presentation'},
|
42
|
-
{label: 'Author', value: 'Internet Archive'},
|
43
|
-
{label: 'Demo Info', value: 'This demo shows how one could use BookReader with their own content.'},
|
44
|
-
],
|
45
|
-
|
46
|
-
// Override the path used to find UI images
|
47
|
-
imagesBaseURL: '../BookReader/images/',
|
48
|
-
|
49
|
-
ui: 'full', // embed, full (responsive)
|
50
|
-
|
51
|
-
el: selector,
|
52
|
-
};
|
53
|
-
$.extend(options, extraOptions);
|
54
|
-
var br = new BookReader(options);
|
55
|
-
br.init();
|
56
|
-
setTimeout(function() {
|
57
|
-
br.autoToggle(options);
|
58
|
-
}, 0);
|
59
|
-
}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>BookReader fullscreen demo</title>
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
7
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
8
|
-
|
9
|
-
<!-- JS dependencies -->
|
10
|
-
<script src="../BookReader/webcomponents-bundle.js"></script>
|
11
|
-
<script src="../BookReader/jquery-3.js"></script>
|
12
|
-
|
13
|
-
|
14
|
-
<!-- BookReader and plugins -->
|
15
|
-
<link rel="stylesheet" href="../BookReader/BookReader.css"/>
|
16
|
-
<script src="../BookReader/BookReader.js"></script>
|
17
|
-
|
18
|
-
<!-- Autoplay plugin -->
|
19
|
-
<script src="../BookReader/plugins/plugin.autoplay.js"></script>
|
20
|
-
|
21
|
-
<!-- URL-changing plugin -->
|
22
|
-
<script src="../BookReader/plugins/plugin.url.js"></script>
|
23
|
-
|
24
|
-
<style>
|
25
|
-
html, body { width: 100%; height: 100%; margin: 0; padding: 0; }
|
26
|
-
#BookReader { width: 100%; height: 100%; }
|
27
|
-
</style>
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div id="BookReader"></div>
|
31
|
-
<script type="text/javascript" src="BookReaderJSAutoplay.js"></script>
|
32
|
-
<script>instantiateBookReader(null, {
|
33
|
-
flipSpeed: 1000,
|
34
|
-
flipDelay: 2000
|
35
|
-
})</script>
|
36
|
-
</body>
|
37
|
-
</html>
|