CARVIEW |
Select Language
HTTP/2 200
date: Thu, 31 Jul 2025 10:11:33 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"143b6c954c2b077248ff22102ad11aeb"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=R9sAxQyG6RE6KWJGykgMMgh%2BVidS6ZseSlQGDksgghsF8%2FXSJVZ9tNxwKxk72d9aX%2FC1S5sVmojmOm%2FCmZShefQjk9DqSbIClgdDA93y6KPmaIt87egyqQQ%2BQSjfe4B5NNXlZ%2F3j28eznNI8%2F1ooU%2Bj9tU2vlLsqMGs8xIadmolJeoaRhN8%2FoQNeyNA4OeBUEPpDUu00frVJcUiFQIgSsJd%2BdNQ5HtakGjPBMZIELxhtFCP0i7wXad2ZNCKvlM1Np1%2FdSgUiTcfDSx36sLzDiA%3D%3D--YAdFnYMYrOPSHM9Z--Eq5RZaAfZhhhiUTqc9%2BF7g%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.822301676.1753956692; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 10:11:32 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 10:11:32 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 85A2:184B44:7C1073:962BA4:688B4154
Home · CarGuo/GSYVideoPlayer Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Home
Shuyu Guo edited this page Jan 22, 2024
·
95 revisions
基于IJKPlayer(兼容系统MediaPlayer与EXOPlayer2),实现了多功能的视频播放器。 (请仔细阅读下方各项说明,大多数问题可在下方找到解答)。
类型 | 功能 |
---|---|
缓存 | 边播边缓存,使用了AndroidVideoCache;ExoPlayer使用SimpleCache。 |
协议 | h263\4\5、Https、concat、rtsp、hls、rtmp、crypto、mpeg等等。 |
滤镜 | 简单滤镜(马赛克、黑白、色彩过滤、高斯、模糊、模糊等等20多种)、动画、(水印、画面多重播放等)。 |
帧图 | 视频第一帧、视频帧截图功能,视频生成gif功能。 |
播放 | 列表播放、列表连续播放、重力旋转与手动旋转、视频本身rotation旋转属性、快播和慢播、网络视频加载速度。 |
画面 | 调整显示比例:默认、16:9、4:3、填充;播放时旋转画面角度(0,90,180,270);镜像旋转。 |
内核 | IJKPlayer、EXOPlayer、MediaPlayer切换、自定义内核 |
布局 | 全屏与非全屏两套布局切换、没有任何操作控件的纯播放支持、弹幕功能、继承自定义任何布局。 |
播放 | 单例播放、多个同时播放、视频列表滑动自动播放、列表切换详情页面无缝播放。 |
窗口 | 小窗口、多窗体下(包括桌面)的小窗口播放。 |
广告 | 片头广告、跳过广告支持、中间插入广告功能。 |
更多 | 暂停前后台切换不黑屏;调整不同清晰度的支持;无缝切换支持;锁定/解锁全屏点击功能;进度条小窗口预览(测试)。 |
自定义 | 可自定义渲染层、自定义管理层、自定义播放层(控制层)、自定义缓存层。 |
关于自定义和出现问题的请先看问题集锦、demo、issue。
多了解一些音视频的基础常识,对容器,音视频编码,ffmpeg先做一些了解,以及mediacodec等的不同。
尽量少出现为什么别的能播的问题哟。
播放器的可自定义还是挺高的,定制请参考demo,多看源码。现在的功能有些多,demo也在不断的更新。
一些新功能和项目结构也在不断的调整。
欢迎提出问题,谢谢。
1、播放器内置常用功能接口,具体可参阅下发链接和源码,如需要自定义可通过继承播放器后,返回自定义布局或重载接口实现。
2、需要注意的是,全屏与非全屏播放之间接的是通过切换显示实现的,所以如有自定义功能或参数,需要重载startWindowFullscreen
和resolveNormalVideoShow
接口,在其中做同步处理。避免自定义效果在切换不生效,具体可参看DEMO。
3、外部需要获取播放器时,如有全屏和非全屏切换,可使用接口detailPlayer.getCurPlay()
获取。
-
更多版本API请查阅:版本更新说明
有了一些调整,后面将修改wiki说明。
类 | 说明 |
---|---|
GSYTextureRenderView | 画面渲染绘制相关层。【源码】 |
GSYVideoView | 视频播放相关层。【源码】 |
GSYVideoControlView | 控制与UI显示相关。【源码】 |
GSYBaseVideoPlayer | 全屏和小屏幕相关处理层,最基础可基础对象类。【源码】 |
StandardGSYVideoPlayer | 可以直接使用的标准播放器,标准使用例子,适合参考实现或基础【源码】 |
VideoAllCallBack | 视频相关的回调接口【源码】 |
ListGSYVideoPlayer | 继承StandardGSYVideoPlayer,添加连续播放一个视频列表的功能。【源码】 |
PreViewGSYVideoPlayer | 继承StandardGSYVideoPlayer,小窗口进度预览,测试版本。【源码】 |
LandLayoutVideo | 继承CustomGSYVideoPlayer ,DEMO里演示全屏非全屏不同布局效果。【源码】 |
SampleVideo | 继承StandardGSYVideoPlayer,DEMO演示清晰度切换,镜像,旋转等效果。【源码】 |
DanmakuVideoPlayer | 继承StandardGSYVideoPlayer,DEMO演示弹幕集成效果。【源码】 |
NormalGSYVideoPlayer | 继承StandardGSYVideoPlayer,使用图片播放按键和loading的播放器。【源码】 |
EmptyControlVideo | 继承StandardGSYVideoPlayer,空播放UI的播放器。【源码】 |
SmartPickVideo | 无缝切换的播放器。【源码】 |
SampleCoverVideo | 内置封面的播放器。【源码】 |
FloatingVideo | 多窗体下的悬浮窗页面支持Video。【源码】 |
GSYSampleADVideoPlayer | 简单片头广告。【源码】 |
GSYADVideoPlayer | 广告支持【源码】 |
类 | 说明 |
---|---|
GSYVideoType | 默认配置开关(显示比例,是否硬解码,切换播放器等)。【源码】 |
ListVideoUtil | 单例列表播放器封装,封装了StandardGSYVideoPlayer ,对应 DEMO ListVideo2Activity,目前不再维护。 |
OrientationUtils | 旋转工具类。【接口文档】 |
GSYVideoManager | 视频管理器,实际上的单例播放器,全局暂停/播放接口,清理缓存,配种option,切换播放器,设置静音等。【接口文档】 |
Debuger | log输出类 |
GSYVideoOptionBuilder | 配置工具类【源码】 |
GSYBaseActivityDetail | detail模式的抽象Activity 【源码】 |
类 | 说明 |
---|---|
PlayActivity | 直接打开一个播放器作为全屏,不需要单独调用全屏功能。 |
ListVideoActivity | 普通列表DEMO,滑出屏幕会被释放。 |
ListVideo2Activity | ListVideoUtil的DEMO,滑出列表不会被释放。 |
RecyclerViewActivity | 普通列表DEMO的RecyclerView。 |
RecyclerView2Activity | ListVideoUtil的RecyclerView。 |
DetailPlayer | 详情类型的DEMO,手机旋转\点击全屏等效果。 |
DetailListPlayer | 详情类型的DEMO,播放一个列表,自动播放下一个,手机旋转\点击全屏等效果。 |
WebDetailActivity | 嵌套WebView的详情类型DEMO,主要是滑动演示。 |
WebDetailActivity | 嵌套WebView的详情类型DEMO,主要是滑动演示。 |
DanmkuVideoActivity | 嵌套DanmakuVideoPlayer的DEMO,主要是弹幕功能。 |
DetailMoreTypeActivity | 支持全屏与非全屏切换的清晰度,旋转,镜像等功能。 |
InputUrlDetailActivity | 增加了自定义输入框输入url页面。 |
PlayEmptyControlActivity | 没有任何ui的播放页面。 |
DetailControlActivity | 增加一些特俗控制的播放页面。 |
PlayEmptyControlActivity | 没有任何控制ui的播放器。 |
PlayPickActivity | 无缝切换播放页面。 |
DetailFilterActivity | 滤镜效果播放页面 |
WindowActivity | 多窗体下(包括桌面)的小窗口播放(WindowActivity) |
DetailADPlayer | 简单片头广告 |
ListMultiVideoActivity | 同时播放 |
DetailADPlayer2、ListADVideoActivity | 高级功能广告支持 |
SwitchPlay | 列表切换详情页面无缝播放【源码】 |
自定义 | 高级自定义demo【源码】 |
持续完善中。。。。。
Clone this wiki locally
You can’t perform that action at this time.