Giter Site home page Giter Site logo

xxxily / h5player Goto Github PK

View Code? Open in Web Editor NEW
2.8K 27.0 228.0 13.82 MB

This software supports all audio and video websites, such as TikTok, YouTube, Bilibili, TED, Instagram, Twitter, etc. Features include: variable playback speed, screen capture, video download, custom settings, and extensions, etc., providing you with a pleasant online audio and video playback experience.

Home Page: https://h5player.anzz.top

License: GNU General Public License v3.0

JavaScript 87.36% HTML 7.94% Vue 0.28% CSS 2.75% TypeScript 1.67%
h5player video-player tampermonkey webplayer chrome-extension userscript player video

h5player's Introduction

h5player for tampermonkey

English | 中文文档

Web Player Enhancement Script


Introduction

This script enhances video playback and is compatible with all H5 video websites, such as: Bilibili, TikTok, Tencent Video, Youku, iQIYI, Xigua Video, YouTube, Weibo Video, Zhihu Video, Sohu Video, Netease Open Class, Baidu Netdisk, AliYun Disk, TED, Instagram, Twitter, and so on.

The script allows keyboard shortcuts for full course control, supporting functions like speed control for playback, video screenshot, picture-in-picture, webpage full screen, adjusting brightness, saturation, contrast, enhanced customization configurations availability, providing you a pleasing online video playing experience.

Moreover, it also offers the ability to fast forward short pre/post rolls, speed up learning from online tutorials/educational videos, and privately store offline audio and video files.

h5player-ui

Application Scenarios

  • Endless speed control: control the rhythm freely, no matter how fast or slow.
  • Speed learning: Stay one step ahead with high-speed tutorial and lecture viewing.
  • Enjoy drama: Turn tedious viewing into joyful experience.
  • Quick short films: Say goodbye to boring waiting.
  • Video screenshot: Archive notes, clip and share conveniently.
  • Offline video: View locally, send privately, and create an offline library.
  • Real-time live streaming: Say no to latency, always stay concurrent.

Technical Features

  • Broad compatibility: All webpages with video tags are supported, even those embedded in iframes and shadowdoms.
  • Cross-domain control: Shortcuts seamlessly connect even on cross-domain restricted pages.
  • Multi-instance support (compatible with platforms like Twitter and Instagram).
  • Progress tracking.
  • Speed control memory.
  • Video zooming.
  • Picture-in-picture capability.
  • Cross-Tab control of picture-in-picture.
  • Video screenshot feature.
  • Audio instance control.
  • Offline storage of video/audio files.
  • Live video stream extraction.
  • Customizable feature additions through configurations.

This script was developed out of personal need and technical passion. Still, it draws unfounded accusations, negative reviews or reports from a few. Rather than wasting energy on these disputes, it's better to declare an @antifeature (as required by GreasyFork community standards) to filter out those who try to take advantage without contribution, or who love to instruct and criticize others from a moral high ground without even reading the documentation! This script does not have premium content, nor does it require payment, likes, or follows for usage, and never actively inserts tracking scripts, such as Baidu or Google Analytics.

However, to sustain positive, continuous iterations, the UI interface has a small amount of text-based promotional links that do not impact user experience. For those not accepting this, please disable the user graphic interface in Menu > Graphic Interface. If that's still not acceptable, please refrain from using this script.

Please note: The script provides abundant shortcut control, perfect for users who love high-efficiency shortcuts. Closing the graphic interface will not affect the core functions of the script, so users who do not need the graphic interface can confidently disable it.

Discussion Groups


Add me and I'll Invite You to the Group
(Specify: from h5player)
Telegram Group
(Join Directly)

Custom Functionality

The script already supports most commonly used features. If you need more, you can achieve this through custom configurations. For details, refer to: Custom Configurations

If you don't know how to program or don't want the hassle, but have a demand for more complex features, you may consider paying the author for 'Paid Customization';
[Contact the author through the above WeChat or TG](#Discussion Groups)

Installation

Before installing the script, the Tampermonkey plug-in should be installed first. Tampermonkey is a well-received browser extension for loading user scripts, which supports: Chrome, Edge, Firefox, Safari, Opera, and numerous domestic brand browsers.

After installing the Tampermonkey plug-in, click the link below for one-click installation:

For more detailed installation help, see here: Detailed Installation Tutorial

User Guide

Shortcut Key List

Shortcut Key Description
Fast forward 5 seconds
Rewind 5 seconds
Ctrl+→ Fast forward 30 seconds
Ctrl+← Rewind 30 seconds
Volume increase 5%
Volume decrease 5%
Ctrl+↑ Volume increase 20%
Ctrl+↓ Volume decrease 20%
C Speed up playback +0.1
X Slow down playback -0.1
Z Normal speed playback
shift+C Enlarge video screen +0.05
shift+X Shrink video screen -0.05
shift+Z Restore video screen
shift+P Enter or exit picture in picture function
shift+S Screenshot, capture current frame and save
shift+D Download audio/video files (experimental feature)
shift+R Enable or disable automatic resume playback progress feature
shift+→ Move screen to the right 10px
shift+← Move screen to the left 10px
shift+↑ Move screen upwards 10px
shift+↓ Move screen downwards 10px
Enter Enter/Exit Full Screen
shift+Enter Enter/Exit Web Full Screen
N Next video/chapter (only supported on some websites)
D Previous frame (for fine-tuning when taking screenshots to find the best quality frame)
F Next frame (for fine-tuning when taking screenshots to find the best quality frame)
E Increase brightness %
W Decrease brightness %
T Increase contrast%
R Decrease contrast %
U Increase saturation %
Y Decrease saturation %
O Increase hue by 1 degree
I Decrease hue by 1 degree
K Increase blur by 1 px
J Decrease blur by 1 px
Q Image reset
S Rotate screen by 90 degrees
M Flip screen horizontally
shift+M Flip screen vertically
ctrl+\ Whether the shortcut key is available on the whole webpage, default is true
Ctrl+space Disable/Enable this playback plugin

Supported Website List

This plugin supports all websites that use HTML5 technology for video playback

Below is a list of some common websites for easy click testing:

Video Websites URL
Bilibili https://bilibili.com
Tencent Video https://v.qq.com
Douyin https://douyin.com
iQIYI https://iqiyi.com
Youku https://youku.com
YouTube https://youtube.com
TED https://www.ted.com
Instagram https://www.instagram.com
Twitter https://twitter.com
Telegram web https://web.telegram.org
Pornhub https://www.pornhub.com
Douyu https://www.douyu.com
Huya https://www.huya.com
Weibo TV https://weibo.com/tv
Kueran Video https://krcom.cn
Sohu Video https://tv.sohu.com
NetEase Open Class https://open.163.com/ted
QQ Music - MV https://y.qq.com/portal/mv_lib.html
Phoenix Video https://v.ifeng.com/
Fun TV https://www.fun.tv
PPTV Polymeric Power https://www.pptv.com
Qilu Net https://v.iqilu.com
Sunshine Satellite TV https://www.isuntv.com
CCTV Network https://www.cntv.cn
Mango TV https://www.mgtv.com
Watermelon Video https://www.ixigua.com
Xin Chuan Broadband https://v.zhibo.tv
China Sports https://video.zhibo.tv
AcFun https://www.acfun.cn
Kwai https://www.kuaishou.com
MioMio Danmu Website https://www.miomio.tv
56 net https://www.56.com
VK https://vk.com
Vine https://vine.co
Magisto https://www.magisto.com
CBS https://www.cbs.com
FC2 Video https://video.fc2.com
Audio Websites URL
Ximalaya https://www.ximalaya.com/
Lazy to Listen https://www.lrts.me/
Dragonfly FM https://www.qtfm.cn/
Kugou Audiobook https://www.kugou.com/ts/
Baidu Wangpan Audio Files https://pan.baidu.com/
AliYun Disk Audio Files https://aliyundrive.com/
Other Network Disk Audio Files ......

If the website you frequent is not well supported, feel free to raise issues

Other Notes

    1. This script is developed and maintained in my spare time. Feedback is welcome, but any negative reviews are not accepted.
    1. If you find that the script is completely unusable, it's generally not a problem with the script itself. You are advised to try reinstalling the plugin.

Update Log

Support the Author

If my efforts have brought convenience to you, please do not hesitate to give your appreciation.

How much in donations does an open-source work with a million installations receive in a year?

PayPal: paypal.me/BlazeLiu

如果我的努力给你带来了便利,请不要吝啬你的赞赏


trackgit-views

h5player's People

Contributors

dependabot[bot] avatar gqqnbig avatar hououinkami avatar shc0743 avatar tubackup avatar xxxily avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

h5player's Issues

请教,我交换了Ctrl+↑和↑的效果,但在B站遇到了一些问题?

感谢作者,插件非常好用。

//因为mac快捷键冲突,我改成了alt键
//音量10%比较常用,所以我交换了两个操作的效果

// alt+方向键上↑:音量升高 1%
if (event.altKey && keyCode === 38) {
t.setVolume(0.01);
}
// 方向键下↓:音量降低 1%
if (event.altKey && keyCode === 40) {
t.setVolume(-0.01);
}

// 方向键上↑:音量升高 10%
if (keyCode === 38) {
t.setVolume(0.1);
}
// 方向键下↓:音量降低 10%
if (keyCode === 40) {
t.setVolume(-0.1);
}

原本建的键位下ctrl+↑会覆盖B站自己的快捷键效果。而当我修改后只有可以,而alt+↑会和B站自身的快捷键同时生效,从而导致每次都会步进11%。

请问这个问题要怎么解决,谢谢。

没有找到如何自定义快捷键

快捷键和自己习惯的键位不是很符合,希望能够自定义键位。在Changelog里看到有说支持自定义键位,但实在没有找到在哪里自定义。还望明示。

A站使用插件时暂停键不好用

你好,在Acfun使用插件时,点击空格暂停时会有非常短暂的暂停,此后仍然继续播放,如果您有时间的话,希望可以修复下这个问题。
此外,这个插件在我的日常学习中起到了很重要的作用,谢谢您与您的插件祝你每天快乐

统计访问泄露隐私

脚本里加入了以下代码

function statisticsInit () {
  window._hmt = window._hmt || [];
  (function () {
    var hm = document.createElement('script');
    hm.src = 'https://hm.baidu.com/hm.js?6815ad33453b781f873df096fae25ab4';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(hm, s);
  })();
}

本用户脚本默认在所有网页启用,意味着每个网页都会被加入上述百度统计代码,作者会获得所有用户的所有网页访问信息,具有严重的隐私泄露问题。

希望作者明确提示此统计功能,并允许用户开启。

可以支持pan.baidu.com吗?

可以支持下百度云视频在线加速播放么?
videojs.getPlayers("video-player").html5player.tech_.setPlaybackRate(2) 这段代码可以控制倍速播放

添加静音开关

Twitter默认视频是静音的,不知是否可以添加一个静音开关呢?非常感谢大佬~

mac上Command键没有处理,导致和系统按键冲突,已测试解决,请作者验证后更新下

首先,谢谢作者提供的脚本,在mac上使用,command键一直不响应,然后自己修复了下,使用了挺长时间,没发现有什么问题(其实是好久没更新脚本),更新脚本后,需要再次修改,所以希望作者测试下,合并下代码,处理下mac下Command响应的问题,谢谢

处理方式,以测试,增加event.altKey的处理:
1.
if (event.shiftKey && !event.ctrlKey && !event.altKey ) {
// 网页全屏

增加 metaKey 处理

if (event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey) {
// 网页全屏

// 防止其它无关组合键冲突
if (event.altKey || event.ctrlKey || event.shiftKey) return

增加 metaKey 处理

// 防止其它无关组合键冲突
if (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey) return

/* 当前触发的组合键 */
const combineKey = [];
if (event.ctrlKey) {
combineKey.push('ctrl');
}
if (event.shiftKey) {
combineKey.push('shift');
}
if (event.altKey) {
combineKey.push('alt');
}
combineKey.push(key);

增加 metaKey 处理

/* 当前触发的组合键 */
const combineKey = [];
if (event.ctrlKey) {
combineKey.push('ctrl');
}
if (event.shiftKey) {
combineKey.push('shift');
}
if (event.altKey) {
combineKey.push('alt');
}
if (event.metaKey) {
combineKey.push('command');
}
combineKey.push(key);

学习强国网站视频,播放声音正常,图像消失

你好,用你的脚本播放好多网站都很好用,非常感谢!
但在强国学习上播放视频出现问题:视频声音正常,播放初期两秒钟画面正常,闪一下图像消失,但声音还在正常播放,快捷键调节也正常使用,就是下面网址。
PS:系统是win10企业版,Chrome74.0.3729.157(正式版本) (64 位)

https://www.xuexi.cn/4d9c383798a2b91a51e2a1015bb55e23/b2e5aa79be613aed1f01d261c4a2ae17.html

Html5不能正常运行

My volitmonkey's Html5视频播放器增强器不能正常运行,其他的脚本可以正常使用。并且Greasy Fork中的账号我登陆不上去,修改账号密码时,后台不能发到我的邮箱,导致我不能修改密码,也不能登录。

关于截图功能

能否支持截取png格式的图片?
jpg有损感觉不太舒服
谢谢作者啦,这个插件真的非常好用!

对ckplayer支持有问题

https://www.agefans.tv/play/20190210?playid=2_24

我发现几乎所有chrome的插件,对ckplayer的支持,尤其是截图功能的支持基本都不兼容。

我测试了 HTML5视频播放器增强脚本 3.2.3 上一帧、下一帧,可以跳帧,但跳帧后会继续自动播放。

视频截屏完全没用。

每次处理这个网站的播放器都极其困难,只有把资源下载硬盘后用potplayer处理跳帧截图的问题。很麻烦。

希望能够尽快支持。谢谢。

一些情况下没有进度条。

全屏(enter)和网页全屏(shift+enter)没有进度条。
回到初始状态(esc或切换enter)要在按一下 enter 才显示进度条。

希望支持腾讯视频 还有希望添加画中画快捷键

你好,非常喜欢你的这个脚本

但我发现脚本的倍速对腾讯视频不起作用

搜了一圈,终于搜到个脚本对腾讯视频起作用的

倍速播放 在这位大佬的这个脚本里的脚本描述有段说明

特别说明
腾讯视频 由于是封装了播放器,把设置速率的接口屏蔽了。目前没有找到直接修改播放速率的接口。所以,只能通过设置 window.session 数据来改变速率。并且,需要有刷新(比如网页刷新,上下集,快进快退等等)动作的时候,设置过的播放速率才会生效。
经过测试,腾讯播放器接受的最高播放速率是 4.0 倍。

但它不支持快捷键,每次都要滑动调节倍速,总感觉有点麻烦,所以想问一下能不能把功能集成进去?

还有一点,能不能添加画中画的快捷键

之前一直在用谷歌出的 Picture-in-Picture Extension 按 alt+p 调出画中画

之后我才知道原来画中画是 html5 的一个功能,虽然谷歌的那个扩展才 6k 大小,但我还是希望把功能添进去,这样就又能少个扩展~

感谢开发者,Facebook视频支持有点问题.

Facebook里面的视频,如果直接点击它自带的播放器右下角的全屏,其实不会全屏的.当然这其实不是用户想要的,用户想要的是进入真正的全屏.而刚好用此脚本插件,按键盘回车键,是可以进入正常的真正的全屏播放的.可是,在Facebook里就会出现,全屏切换黑屏,或者卡顿,或者有时候全屏再切回来后,画面不见了等等不正常的状态.
使用浏览器edge,多次,多个不同Facebook的视频测试

关于倍速播放和网页全屏的一点小建议

您好!我是您开发的油猴插件的新用户,特别喜欢你们的插件!使用一段时间以后发现有些可以改进的地方,希望能够采纳!🙂
1)希望倍速播放能新增"0.25""0.75""1.25""1.75"这四个倍速
2)我曾经用过一个油猴插件叫"网页全屏",启用后在播放器外侧会有一个"网页全屏"和一个"画中画"的按钮,全屏和画中画以后会出现一个"还原"按钮,点击即可恢复.这个插件十分好用,但是和你们的插件不兼容😂.希望你的插件也可以做出这三个按钮,这样我就可以抛弃那个插件了🙂
最后,感谢您抽出宝贵时间阅读这份建议,希望使用你们插件的用户越来越多,谢谢 !)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.