Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
目前只在Edge下测试通过,其他浏览器没有测试。
图标时随便找到,我不知道图标库具体的来源。
修改点:
1、增加一个条件通过class来判断是否是Emby界面,以缓解无法识别Emby的问题。
2、在createDanmaku时增加一个判断检测_media对象是否为空。防止在加载弹幕时,用户通过点击返回按钮离开播放界面导致页面会卡死一段时间的问题。
3、增加弹幕缓存变量用于修改弹幕大小和透明度时不需要重新拉取弹幕。
4、增加LOAD_TYPE枚举用于匹配reloadDanmaku方法时的行为。
5、将reloadDanmaku方法重命名为loadDanmaku。
6、将LOAD_TYPE中的原'reload'改为'refresh'使其更符合名称,并保留'reload'。'refresh'将从服务器重新获取弹幕,而‘reload’会从缓存变量里读取。
7、新增方法createResizeButton用于创建一个带弹出面板的按钮。该按钮实现了弹幕大小调整和透明度调整。
8、手动匹配弹幕增加了处理逻辑用于处理用户点击取消按钮时的响应。
9、修改danmakuParser方法中部分代码片段以实现弹幕大小和透明度调整。