IOS QuickTime Plugin, iosquicktime
When playing a video in UIWebView, You can see figininview in view hierarchy. This class comes from QuickTime Plugin. The plugin path 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 Link Libraries and file and image resources. The name of QuickTime Plugin is very loud. In fact, there are not many codes. There are only nine Objective-C classes, which are dominated by FigPluginView. It is coupled with WebKit. framework, or used to encapsulate video playback controls for WebKit. framework. Class relationships such:
UIWebDocumentView pairs FigPluginView and UIWebPlugInView with the member variable struct _ CFDictionary * _ plugInViews. The FigPluginView is the key and UIWebPlugInView is the value.
UIWebPlugInView has a member variable UIView * _ uiView pointing to FigPluginView,
FigPluginView has the member variable WAKView * _ wakView pointing to UIWebPlugInView.
Of course, video is only one type of PluginView. UIWebPlugInView also manages other types of plugin.
The rendering process has the following relationship:
When updating the layer tree, RenderLayerBacking obtains the UIWebPlugInView from the RenderWidget through the layer relationship and calls its function attachPluginLayer to add the FigPluginView to the UIWebDocumentView. Note that this "add" is indirectly implemented through multi-layer CALayer. UIWebPlugInView also creates a hostLayer as MediaLayer. The implementation code at the end of the call chain is as follows:
-(Void) _ connectPluginLayers {WebThreadLock (); if (! _ HostingLayer) {_ hostingLayer = [[CALayer alloc] init];} [_ webView. layer insertSublayer: _ hostingLayer atIndex: 0]; if ([_ webView] _ setMediaLayer: _ hostingLayer forPluginView: self]) {self. parentedInLayer = YES; [_ uiView retain]; [_ hostingLayer addSublayer: _ uiView. layer]; [_ uiView release]; [_ webView _ setSubviewCachesNeedUpdate: YES]; [self _ reshapeOnMainThread];}/* Ask hovertree.com */
Here, we only have a rough list of items, and the inter-class mesh dependency makes it difficult to draw pictures and use text instructions. In short, we can be more sure that WAKView replaces NSView to share code with Mac WebView. However, iOS application is a single-process program and can only be combined with the CALayer tree instead of the NSView tree.
Recommended: http://www.cnblogs.com/roucheng/p/3528371.html