Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-29-2015, 11:15 PM   #1
jverrone3
Junior Member
jverrone3 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2015
Device: none
Javascript iframe bug?

I was having an issue displaying an iframe in the viewer. Is there a bug in calibre that is preventing the iframe from functioning? I was able to show a div the contains text and an iframe, but the iframe content is blank and does not function properly.
jverrone3 is offline   Reply With Quote
Old 03-29-2015, 11:47 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,930
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The calibre viewer uses WebKit, so I highly doubt there is a bug in iframe support. But, since you haven't provided an example, it is impossible to say with any certainty.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-01-2015, 01:29 PM   #3
jverrone3
Junior Member
jverrone3 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2015
Device: none
Code:
function addVideoFrame()
{
    var style_css = "\
    .no_display { \
        display : none; \
    } \
    \
    .SSvideo { \
        z-index: 1; \
        padding: 5px; \
        background-color: black; \
        position: fixed; \
        top: 0%; \
    }";
    $("head").append("<style>" + style_css + "</style>");

    var frame_html = "<div id = 'video_frame' class = 'SSvideo no_display'> \
        <h3 id = 'frame_title' style = 'color: white;'></h3> \
        <iframe src= 'http://www.youtube.com/v/DFl9o-e05is?autoplay=1' width = 350px  height = 350px style ='display: block; margin: auto'> </iframe> \
        </div>";
    $("body").append(frame_html);
}
This is the javascript function that gets called on a right click in the viewer. The div shows up and we can see text that is inserted into the H3 tags, but the iframe will not show any content (we have tried static websites, etc.).
jverrone3 is offline   Reply With Quote
Old 04-01-2015, 10:26 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,930
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The viewer has no support for video playback, so that is not going to work, regardless of any iframe issues.
kovidgoyal is offline   Reply With Quote
Reply

Tags
javascript, run javascript, viewer, viewer plugin


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IDPF validation error Iframe scrolling Jesver ePub 5 05-20-2014 03:51 AM
epub3 iframe Zeynep ePub 2 07-15-2013 05:08 AM
Bug: --debug-javascript broken on Mac Yves000 Development 5 05-24-2013 02:20 AM
Embedded font bug or CSS bug in ADE JSWolf ePub 10 06-11-2011 02:34 PM
Facebook Like in EBooks? iFrame supported? saper General Discussions 1 03-29-2011 05:41 AM


All times are GMT -4. The time now is 06:58 AM.


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