IOS QuickTime Plugin, iosquicktime

Source: Internet
Author: User

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

Related Article

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.