iPad - video from HTML not working in uiwebview

65 views
Skip to first unread message

Prasanna D

unread,
Jun 1, 2012, 2:55:31 AM6/1/12
to iphonesdkd...@googlegroups.com
I am trying to load some video in the webview of my iPad app. The videos are been loaded from an HTML tag. The html tag contains images, contents, audio file and video file.

When we click on the play button, we are able to hear the audio and not able to see the video.

Following is the small code which i am using

[webView loadHTMLString:[theApp.contentArr objectAtIndex:spineIndex] baseURL:url];

(void)webViewDidFinishLoad:(UIWebView *)theWebView
{
    setVideoRule  
= [NSString stringWithFormat:@"addCSSRule('video','margin-top : 100px; margin-bottom :0px; margin-right : 0px;margin-left : 0px; height:360px;width:500;')"];  
   
[webView stringByEvaluatingJavaScriptFromString:setVideoRule];
}

What to do to get the video?


Jesse Tayler

unread,
Jun 1, 2012, 10:05:44 AM6/1/12
to iphonesdkd...@googlegroups.com, iphonesdkd...@googlegroups.com
More likely your video codec?

Are you certain that video plays on the device I mean?

Anyway embedding a video doesn't  require that JavaScript but I don't see anything wrong with your code...



Sent from my iPad
--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/iphonesdkdevelopment/-/O1kYUdvt_vEJ.
To post to this group, send email to iphonesdkd...@googlegroups.com.
To unsubscribe from this group, send email to iphonesdkdevelop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonesdkdevelopment?hl=en.
Reply all
Reply to author
Forward
0 new messages