How Android enables WebView to support HTML5 video (full screen) playback

Source: Internet
Author: User

http://blog.csdn.net/zrzlj/article/details/8050633

1) need to declare in the Androidmanifest.xml file need to use Hardwareaccelerate, can be refined to the activity level, if the unwanted view can declare do not use acceleration, but need to do in the code, as follows: A. If you want to declare the entire app to be accelerated: < application ... android:hardwareaccelerated = "true"> B. If you want to declare in activity, then: <activity ... android:hardwareaccelerated= "true" &gt, can also be finer to window, Getwindow.setflags (                                                                             windowmanager.layoutparams.flag_hardware_accelerated, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);          &NBSP;C   If application or activity has stated that hardware acceleration is necessary, but for some reason (such as saving power?) ), some view does not require hardware acceleration,                   view.setlayertype (view.layer_ Type_software, null);     2) It's strange to say that you need to use &LT;USE-SDK&GT;&LT;/USE-SDK in the Androidmanifest.xml file. > tags, and if it's empty, you have to write targetsdk or MINSDK, but I've tried it, no matter how much it's written. Theoretically, Android should be from 3.0 (API level 11) can start to speed up the 2D rendering, but I can use the TARGETSDK set to 5, but this label does not write yet.

How Android enables WebView to support HTML5 video (full screen) playback

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.