[webkit-dev] Where can I get MediaPlayerPrivateIOS.mm && How to replace the default video player with a customized player in UIWebView

Benjamin Poulain benjamin at webkit.org
Tue Sep 3 15:36:07 PDT 2013


On 9/3/13 3:17 AM, server leejune wrote:
> Hi all,
> I am developing a iOS web browser based on UIWebView. I want to 
> replace the default video player with a customized player in UIWebView.
This mailing list is not the right place to discuss how to use WebKit on 
WebKit-dev is about the development of WebKit itself, not how to use it.

I suggest to use the iOS developer network for getting help.
> Now I have tried the following ideas:
> 1. use js injection to replace default video.play(), but it still 
> can't work correctly for all video websites popular.
> 2. try to hack UIMoviePlayerController. I have use Objective-C runtime 
> to replace the alloc of UIMoviePlayerController with my own object and 
> forward all selectors and handle them. But there is still some crash 
> issue. and this method seems to be too ugly.
> I have search google and dig into WebKit source code. I found 
> MediaPlayerPrivateIOS has been referenced somewhere. It seems to be a 
> clue to figure out my question. But I can't found 
> MediaPlayerPrivateIOS.mm in WebKit projects. Is it open source? How 
> can I get the iOS implementation of video player.
The source of iOS WebKit is available on opensource.apple.com. Not 
everything is on webkit.org.
> And is there any idea about how to replace the default video player of 
> UIWebView?
I am afraid this is not supported.


More information about the webkit-dev mailing list