Shinyapp Deployment Issue with Youtube video in iFrame

77 views
Skip to first unread message

Sushanta Deb

unread,
Mar 5, 2016, 8:14:44 PM3/5/16
to Shiny - Web Framework for R
Hi,

Below code embedding a Youtube video works  fine in my EC2@ RStudio  but does not show up when deployed to Shinyapps.io

Code:

actionButton("Demo", label = "",class="btn-group btn-group-xs",icon=icon("video-camera")
bsModal("demomodal","Watch the Demo","Demo",width = "90%", div(HTML('<iframe src="http://www.youtube.com/embed/aOWB0yGTrNY/" frameborder="0" style="overflow:hidden;height:500px;width:100%" height=100% width="100%"></iframe >'),height= "100%", width= "100%")),


Please help me understand the cause and the workaround

Regards,
SD

Tareef Kawaf

unread,
Mar 7, 2016, 10:46:45 AM3/7/16
to Shiny - Web Framework for R
I am guessing it is because your iframe link is pointing to a non ssl protected URL (http://www.youtube.com....)  browsers will not allow for a page that is served over ssl to have non-ssl content on the same page.

SD

unread,
Mar 7, 2016, 5:10:21 PM3/7/16
to Shiny - Web Framework for R
Hi Tareef,

Thank you for your comments but when I open the app locally using the browser, it works fine but the problem starts when I deploy it in Shinyapps.io

Do you still think it is a security issue.  If yes, can you show me a test case where I can render a youtube video from a shinyapp.  I tried the output$video option but even that did not work out


Appreciate a solution

Thank you
SD

Joe Cheng

unread,
Mar 7, 2016, 5:35:50 PM3/7/16
to SD, Shiny - Web Framework for R
Tareef is probably right. Just try changing http to https in your iframe URL, if that doesn't work then let's investigate other possibilities. It's not a problem on your own server because you're probably not serving apps over https, while shinyapps.io does serve apps over https.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/46405e98-dc52-47c5-9666-76d53a5842b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sushanta Deb

unread,
Mar 8, 2016, 1:24:12 AM3/8/16
to Shiny - Web Framework for R, moushum...@gmail.com
Hi,

I tried the links "http://www.youtube.com/embed/YE7VzlLtp-4" and "https://www.youtube.com/embed/YE7VzlLtp-4".  Both did not yield the results.  Was wondering if we could try any workarounds

Thank you
SD

Sushanta Deb

unread,
Mar 9, 2016, 1:20:02 AM3/9/16
to Shiny - Web Framework for R, moushum...@gmail.com
Joe/Tareef:

Was wondering if you can suggest some workarounds.  Thank you

SD

Tareef Kawaf

unread,
Mar 9, 2016, 10:15:07 AM3/9/16
to Sushanta Deb, Shiny - Web Framework for R, moushum...@gmail.com
Unfortunately you are out of my depth here Sushanta.  If you had a reproducible example that you could share, it might be easier to debug what is going on.

--
You received this message because you are subscribed to a topic in the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shiny-discuss/odbD6cG5imA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/4446b8d0-23d4-478f-974c-cbef4aa9504a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages