Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-17-2018, 01:54 PM   #1
Barra
Junior Member
Barra began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2018
Device: none
Stop audio on another page for Epub3

I have audio clips on each page in my book. However, if the user chooses to play a clip, I wish for only one clip to be heard at a time. I have solved this for a single page using JavaScript but I don’t know how to do it for multiple pages. In other words I don’t want multiple audio clips playing at once. And I want all audio to stop when the user turns the page.

I thought that maybe I could store a “current page” variable in a cookie or session with each page monitoring this variable using JavaScript. But I read somewhere that cookies can’t be shared between pages. Is this true and how can I stop the audio playing when a new clip is chosen?
Barra is offline   Reply With Quote
Old 08-31-2019, 04:07 PM   #2
Barra
Junior Member
Barra began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2018
Device: none
I have tested and it looks like session data isn't shared between pages in ibooks. How do I stop audio playing on one page when I move to another page?
Barra is offline   Reply With Quote
Old 09-11-2019, 11:34 AM   #3
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,831
Karma: 76070063
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by Barra View Post
I have tested and it looks like session data isn't shared between pages in ibooks. How do I stop audio playing on one page when I move to another page?
Are you saying that your audio clip continues to play when the user flips the page?

Hitch
Hitch is offline   Reply With Quote
Old 09-11-2019, 12:22 PM   #4
IronChaim
Do-er, All of the Things
IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.
 
IronChaim's Avatar
 
Posts: 25
Karma: 1970
Join Date: Jan 2017
Location: Midwest
Device: Androids
It might be a slightly different use case for what you're trying to do, but have you looked into using "media-overlays" (e.g. SMIL files + audio + XML Markup + OPF udpates)?

https://www.w3.org/publishing/epub3/...aoverlays.html
IronChaim is offline   Reply With Quote
Old 09-11-2019, 01:52 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 53,049
Karma: 49154381
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by IronChaim View Post
It might be a slightly different use case for what you're trying to do, but have you looked into using "media-overlays" (e.g. SMIL files + audio + XML Markup + OPF udpates)?

https://www.w3.org/publishing/epub3/...aoverlays.html
How many programs that support ePub 3 support media overlays?
JSWolf is online now   Reply With Quote
Old 09-11-2019, 03:08 PM   #6
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,831
Karma: 76070063
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by IronChaim View Post
It might be a slightly different use case for what you're trying to do, but have you looked into using "media-overlays" (e.g. SMIL files + audio + XML Markup + OPF udpates)?

https://www.w3.org/publishing/epub3/...aoverlays.html
SMIL files are how we do it, FWIW.

Hitch
Hitch is offline   Reply With Quote
Old 09-12-2019, 07:42 AM   #7
IronChaim
Do-er, All of the Things
IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.IronChaim once ate a cherry pie in a record 7 seconds.
 
IronChaim's Avatar
 
Posts: 25
Karma: 1970
Join Date: Jan 2017
Location: Midwest
Device: Androids
Quote:
Originally Posted by JSWolf View Post
How many programs that support ePub 3 support media overlays?
I admittedly don't know for certain, but I thought most of the majors did and what most considered 'best practice' if you're trying to create something like a "Read Along" book. But, it too early/I've not have any coffee for me to get excited about finding sources to confirm. :-P

IMHO: I would hope that readers/apps support this part of the spec for it's usefulness (and roots in accessibility), over a custom JavaScript implementation. I appreciate that it might not meet the need of the use case of the EPUB creator, but I think it allows for a better, more consistent UX.
IronChaim is offline   Reply With Quote
Old 09-12-2019, 10:12 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 53,049
Karma: 49154381
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Advanced ePub 3 features is a crap shoot outside of iBooks.
JSWolf is online now   Reply With Quote
Reply

Tags
audio, epub, epub 3

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting ePub3 with embedded audio for Kindle Fire? curtf Kindle Developer's Corner 6 03-21-2017 04:05 PM
feature request: aeneas and epub3 audio books eclipse123 Calibre 5 01-20-2016 04:30 PM
Audio Controls in ePub3 josephmwheeler ePub 23 06-03-2014 07:09 AM
EPUB3 - Float audio pane with page turns _savage ePub 22 01-30-2013 01:38 AM
Audio Controls in ePub3 josephmwheeler Apple Devices 2 07-06-2012 12:39 PM


All times are GMT -4. The time now is 08:34 PM.


MobileRead.com is a privately owned, operated and funded community.