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

server leejune leejune.server at gmail.com
Tue Sep 3 03:17:29 PDT 2013


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.

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.

And is there any idea about how to replace the default video player of
UIWebView?

Thanks very much for any answer.

BR,
Leejune
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130903/c6e2e349/attachment.html>


More information about the webkit-dev mailing list