I've been doing this for some time. I gave a talk about this at the IVRPA conference in Prague in 2016. The EPUB FXL (fixed layout) format is entirely standards-based HTML/CSS/JS, so it's quite possible to crack open one of these files and add your own code. But it is FAR, FAR easier to use Adobe InDesign and the add-on CircularFLO, from circularflo.com.
I've worked with this developer to enable arbitrary web code embedding in fixed-layout EPUBs generated with InDesign and CircularFLO, specifically so I can create EPUB ebooks with embedded 360 tours. This even works for split-screen mobile views for Google Cardboard and similar headsets!
Keith