2

Given a URL to a...

  • PDF, Apple's UIWebView component will display the PDF in the PDF reader.
  • video, Apple's UIWebView component will display the video in the video player.
  • music file, Apple's UIWebView component will play the music in the video player.

What is the best way to mimic this functionality in Sencha Touch?

Many thanks

EDIT: Also, how do you display a website in a panel? I've tried using an embed and an iframe, but these aren't scrollable on the device.

Andy
  • 14,260
  • 4
  • 43
  • 56

3 Answers3

0

Without a lot of hacky code, you can't.

Andy
  • 14,260
  • 4
  • 43
  • 56
0

I don't understand, this should work just like that? Are you thinking of rendering pdf/video/music inside Sencha Application? If yes, check out Sencha examples for audio/video. For pdf you will need some new code. I would suggest using pdf.js inside Sencha panel, haven't tried it though.

tv_
  • 166
  • 3
  • My point is that Apple's UIWebView deals with all supported types with the same piece of code (see http://stackoverflow.com/questions/1320220/file-formats-supported-by-uiwebview ) I was hoping that Sencha Touch had a similar component, but I'll probably just go down the road you outlined. – Andy Aug 17 '11 at 05:20
0

This was answered in sencha touch :: how to create a panel for website-preview inside iFrame.

Anyway, if you want to get the same effect as a UIWebView in senchatouch, I recommend using PhoneGap as long as your intention is that your webapp is used only on mobile devices. PhoneGap Plugins available to use the native WebViews each mobile OS. The plugin, both for IOS to ChildrenBrowser called Android. Sorry about the other systems can not help more.

Community
  • 1
  • 1
  • 1
    I agree that using the ChildBrowser is the best option so far (although without a 3rd PDF reader on Android you still can't view PDFs). I think your answer is the best here, but not the answer to my question. As for the post you linked to, I did see that, but it's horribly hacky, so I didn't use it. – Andy Jan 26 '12 at 15:33