npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-x5-tbs-flyhh

v1.0.5

Published

Use Tencent Browser Service(TBS) instead of System WebView for Cordova App

Downloads

25

Readme

cordova-plugin-x5-tbs-flyhh

CordovaWebView替换为腾讯的X5。使用腾讯TBS完整版SDK。

优劣比较

优势

  • 安装包体积小:由于QQ、微信、QQ空间等在中国的巨大装机量,与Crosswalk比较,X5内核仅增加不到300KB左右的apk大小。
  • 兼容性强:统一不同设备到同一内核,不需要担心国产ROM奇特“定制”及老版本WebView造成的兼容性问题。
  • 视频播放能力强:自带多种解码器,也可支持直播。
  • 新浏览器特性支持:如HTTP/2、Service Worker等。

劣势

支持环境

  • cordova-android > 6.4
  • Android > 4.0

安装

cordova plugin add cordova-plugin-x5-tbs-flyhh

为确保App启动后即启动X5内核,需要在项目的MainActivityonCreate方法内,增加以下代码:

QbSdk.initX5Environment(this, null);

同时也要import下 import com.tencent.smtt.sdk.QbSdk;

安装好插件后会自动的添加权限到AndroidManifest.xml,如应用出现Crash,请检查并手动将以下权限复制入AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- 硬件加速对X5视频播放非常重要,建议开启 -->
<uses-permission android:name="android.permission.GET_TASKS" />

卸载

cordova plugin rm cordova-plugin-x5-tbs-flyhh

环境

当前版本

X5:tbs_sdk_thirdapp_v4.3.0.1020_43633_sharewithdownload_withoutGame_obfs_20190111_105200.jar(此版本可以直接在vscode中进行debug了,无需TBS Stdio)

内核替换

你当然可以手动升级到X5内核最新版,或者替换成精简版内核。你只需要删除platforms/android/libs/tbs_sdk_*.jar,替换为你需要使用的版本即可。这会使此插件无法通过cordova plugin remove等指令被完全删除,还请注意(PS:也可以使用同一名称直接替换,这样指令都正常)。

感谢

此项目继承自项目:cordova-plugin-x5-tbs

技术支持

与本项目有关的问题,如加载后无法正常启动,在本项目Issue区内提交新Issue即可。

X5相关问题,请参阅:X5技术指南

常见玄学问题

为什么X5内核没有被成功加载

请使用官方TBS Studio测试,如其安装的TBS Demo左上角仍显示Sys core,证明X5内核可能无法被第三方App调用。请参阅X5技术指南或反馈到X5官方。