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-tbs-webview

v0.1.6

Published

Changes the default WebView to x5

Downloads

13

Readme

cordova-plugin-tbs-webview

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

优劣比较

优势

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

劣势

支持环境

  • cordova-android > 4
  • Android > 4.0

安装

cordova plugin add cordova-plugin-tbs-webview

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

QbSdk.initX5Environment(this, null);

环境

当前版本

X5:tbs_sdk_thirdapp_v4.3.0.1020_43633_sharewithdownload_withoutGame_obfs_20190111_105200.jar

内核替换

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

感谢

此项目继承自项目:https://github.com/runner525/x5webview-cordova-plugin.git

此项目参照的互联网上若干项目

技术支持

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

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

常见问题

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

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

使用CrossWalk的同时可以使用x5内核吗

不推荐同时使用Crosswalk和x5,可能有潜在的兼容风险。 如果确认要使用,可以在初始化内核之前添加这句:

HashMap map = new HashMap();
map.put(TbsCoreSettings.TBS_SETTINGS_USE_PRIVATE_CLASSLOADER, true);
QbSdk.initTbsSettings(map);

使用独立ClassLoader进行加载

用户的手机上必须要安装微信、qq、qq浏览器等app才能真正使用到X5内核吗?

当手机上有宿主(QQ、微信或QQ空间)时,其他AP只要接入了x5的SDK就会去共享宿主的内核,当没有宿主或是宿主都没有可用的内核时会自己去下载内核

接入X5 SDK时,liblbs.so文件有什么作用,不使用该so文件能否接入成功

该so的作用是在64位手机上以32位环境加载x5内核,如果App自己有相关处理不使用该so也可以正常加载x5内核

常用链接如下:

官网(https://x5.tencent.com/tbs/)

常见问题(https://x5.tencent.com/tbs/faq.html)

广告变现(https://x5.tencent.com/tbs/ad.html)