开发者

How to set a video stream on a web page to a certain size in a web view

I am trying to load a web page to fit into a web view.The web page consists of a video stream only.When i have the page scaled to fit it show the video stream in the top left part of the screen and when i don't have it scaled to fit the video is too big to fit on the iphones screen.I am trying to get it so that the video displays in the screen perfectly.

开发者_如何学编程
  1. Can i change this to fit by using xcode? if so how?

  2. Or do i have to change the video properties on the site to make the video stream fit.

Its not my site, but i do have permission to use it, so fitting it in using xcode would be preferred.Any suggestions welcome.


I am so Interested if there is a solution fitting your point #2, but for now you can do the following on JavaScript to distinguish between a regular PC or an iPhone as in your case:

  if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) 
  {
     // Change the Video properties.
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜