QuickTime Plugin for iOS

Source: Internet
Author: User

When UIWebView plays a video, you can see a figpluginview figure in the view hierarchy. The path for this class from QuickTime Plugin,plugin is:/applications/xcode.app/contents/developer/platforms/iphonesimulator.platform /developer/sdks/iphonesimulator6.1.sdk/system/library/internet Plug-ins/quicktime Plugin.webplugin
This is a folder with a library of links and file and picture resources. QuickTime plugin This name is very loud, in fact, the code is not much, Objective-c class only 9, it is only Figpluginview-based. It is coupled to the webkit.framework, or is meant to encapsulate the video playback control for Webkit.framework. Class relationships such as:

Uiwebdocumentview will pair Figpluginview and Uiwebpluginview with member variable struct __cfdictionary *_pluginviews, where Figpluginview is key, Uiwebpluginview is value.
Uiwebpluginview has a member variable UIView *_uiview points to Figpluginview,
Figpluginview has a member variable Wakview *_wakview points to Uiwebpluginview.

Of course, video is just one of Pluginview, Uiwebpluginview also manages other kinds of plugin.

There is this relationship in the rendering process:

renderlayerbacking when updating the layer tree, from renderwidget to get uiwebpluginview through several layers of relationships, Call its function Attachpluginlayer to add Figpluginview to Uiwebdocumentview. Note that this "add" is implemented indirectly through many layers of calayer, and Uiwebpluginview also creates a hostlayer as Medialayer. The end implementation code of the call chain is as follows:

- (void) _connectpluginlayers {webthreadlock (); if(!_hostinglayer) {_hostinglayer=[[Calayer alloc] init]; } [_webview.layer Insertsublayer:_hostinglayer atindex:0]; if([[[_webview WebView] _setmedialayer:_hostinglayer forpluginview:self]) {Self.parentedinlayer=YES;          [_uiview retain];          [_hostinglayer Addsublayer:_uiview.layer];          [_uiview release];          [_webview _setsubviewcachesneedupdate:yes];      [Self _reshapeonmainthread]; }  }  /*how to ask Hovertree.com*/

Here is only a general list, the inter-class mesh dependency, it is difficult to draw and the text description. In short can be more certain, Wakview is to replace the NSView, in order to and Mac WebView Common code, but iOS application is a single process program, can only use Calayer tree instead of NSView tree to do the combination.

Recommendation: http://www.cnblogs.com/roucheng/p/3528371.html

QuickTime Plugin for iOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.