Code Monkey home page Code Monkey logo

biliatv's Introduction

biliATV

由于工作繁忙天天加班的原因, 项目暂停开发新功能, 但会继续维护现有功能

由于扫描登录限制,登录有效期只有一天

为了搞智能家居需要一个家庭中枢而购买的 AppleTV 从此一发不可收拾 😂

国内大部分资源可以直接用 LazyCat 解决

但是LazyCat的喵哩喵哩满足不了我的需求 所以打算自己再写一个 一个完整的bilibili客户端

使用技巧

长按视频封面可以强制打开视频详情界面 (如果不分P的视频将会直接播放)

需要重新安装的更新:

  • 2017/12/13: 修复番剧清晰度解析问题
  • 2018/01/22: 修复因b站接口调整导致番剧无法播放的问题
  • 2018/11/9: 修复了部分视频、番剧无法正常播放的问题

todo:

  • 页面

    • 二维码登录
    • 账号密码登录
    • 我的动态
    • 我的追番
    • 我的收藏
    • 我的历史
    • 番剧timeline
    • 番剧页面
    • 视频详情V2
    • UP主页面 80%(更多页面未完成)
    • 热门视频(B站首页)
    • 搜索(仅搜索AV号)
    • 设置界面
  • 视频地址解析与播放

    • 解析视频地址
    • 解析高清视频地址(默认被我设置为1080p,番剧解析不稳定原因不明清晰度忽高忽低)
    • 解决番剧高清解析偶尔失败的问题
    • 自定义视频清晰度
    • 播放视频(使用 DanMuPlayer )
    • 视频地址过期重新获取视频地址并继续播放
    • 剧集连播
    • 记录播放位置 再次打开提示还原
    • 将播放位置提交到B站的历史记录中 方便其他设备继续播放
    • 加载弹幕

关于私有API

项目使用了UIWebView在tvOS中UIWebView是私有API 需要手动修改Xcode文件来解锁,否则无法编译

参考: tvOSBrowser

文件位置:

Availability.h 在AppleTV位于: Xcode > Contents > Developer > Platforms > AppleTVOS.platform > Developer > SDKs > AppleTVOS.sdk > usr > include
Availability.h 在AppleTV模拟器位于: Xcode > Contents > Developer > Platforms > AppleTVSimulator.platform > Developer > SDKs > AppleTVSimulator.sdk > usr > include

将以下内容 :

#define __TVOS_UNAVAILABLE                    __OS_AVAILABILITY(tvos,unavailable)
#define __TVOS_PROHIBITED                     __OS_AVAILABILITY(tvos,unavailable)

替换为 :

#define __TVOS_UNAVAILABLE_NOTQUITE                    __OS_AVAILABILITY(tvos,unavailable)
#define __TVOS_PROHIBITED_NOTQUITE                     __OS_AVAILABILITY(tvos,unavailable)

部署方法

由于使用了submodule所以请不要直接下载zip,而是使用git clone

git clone https://github.com/xioxin/biliATV.git
cd biliATV && sh build.sh

感谢

截图

许可证

GPL-3.0

biliatv's People

Contributors

tt702 avatar xioxin avatar xummer 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

biliatv's Issues

点进视频无限菊花

模拟器运行后,点开视频后一直菊花,log:

🔥webViewDidFinishLoad
【调教咖啡厅】S代表什么? S STANDS FOR..._综合_动画_bilibili_哔哩哔哩
cid2AidAndPage: 27186033=> 16670058#1
Optional("[[\"1、正片\",\"/video/av16670058/index_1.html\",\"27186033\"],[\"2、请保护好您的耳朵\",\"/video/av16670058/index_2.html\",\"27336274\"]]")
biliVideoModel(aid: 16670058, mid: 14038510, pageno: 1, typeid: 27, totalpage: 2, tid: 0, season_id: 0, season_long_title: "", allow_bp: "", gift_id: "", gift_url: "", first_ep_id: "http://www.bilibili.com/video/av16670058/", wb_title: "【调教咖啡厅】S代表什么? S STANDS FOR...", wb_desc: "【调教咖啡厅】S代表什么? S STANDS FOR... UP主:zclk", wb_info: "【调教咖啡厅】S代表什么? S STANDS FOR...   UP主:zclk", wb_url: "http://www.bilibili.com/video/av16670058/", wb_full_url: "http://www.bilibili.com/video/av16670058/", wb_img: "http://i1.hdslb.com/bfs/archive/c89b3e55d955e31b9ff882ce45e580fecabcbebb.png", wb_summary: "素材来源于youtube自制剪辑", cardrich: biliATV.biliCardrichModel(mid: 14038510, name: "zclk", sex: "保密", face: "http://i0.hdslb.com/bfs/face/38abf10a4888ec3d276139e8c32aef6fcc0161e4.jpg", fans: 0, sign: ""), part: [biliATV.biliPartModel(page: 1, name: "1、正片", href: "/video/av16670058/index_1.html", cid: 27186033, playData: nil), biliATV.biliPartModel(page: 2, name: "2、请保护好您的耳朵", href: "/video/av16670058/index_2.html", cid: 27336274, playData: nil)])
成功
======checkCompleted======== 16670058#1
has Data part.count:2
has Page 1

screen shot 2017-12-26 at 11 55 02 am

请问还在更新吗?执行build.sh报错

error: Server does not allow request for unadvertised object 27d082a7b5860956ddd4caf391907b2d9af12d30
Fetched in submodule path './', but it did not contain 27d082a7b5860956ddd4caf391907b2d9af12d30. Direct fetching of that commit failed.

卡在clone SGPlayer

➜ biliATV git clone https://github.com/xioxin/biliATV.git
cd biliATV && sh build.sh
Cloning into 'biliATV'...
remote: Counting objects: 1551, done.
remote: Compressing objects: 100% (137/137), done.
remote: Total 1551 (delta 191), reused 144 (delta 99), pack-reused 1315
Receiving objects: 100% (1551/1551), 1.81 MiB | 71.00 KiB/s, done.
Resolving deltas: 100% (1094/1094), done.
Submodule 'DanMuPlayer' (https://github.com/fuzhuo/DanMuPlayer.git) registered for path './'
Cloning into '/Users/Bo/Desktop/biliATV/biliATV/DanMuPlayer'...
Submodule path './': checked out '005469e99de156fef3468c1c8311e9c9d42e5df5'
Submodule 'SGPlayer' (https://github.com/fuzhuo/SGPlayer.git) registered for path './SGPlayer'
Cloning into '/Users/Bo/Desktop/biliATV/biliATV/DanMuPlayer/SGPlayer'...

卡在最后一行clone SGPlayer 半个多小时都没进展。。。。

视频无法暂停及调整播放进度

更新到1.26提交的 291e974 版本后,无法暂停

按触摸板暂停,和暂停按钮均无效。
会出现下面的播放条,但是无法暂停 及 调整播放进度

还有时候会出现点击播放,开始缓冲,但是无法播放的情况,但该情况可以关闭app,然后重启解决,复现步骤暂时未知。。但出现过好几次了。。。

编译的时候遇到了大量关于libtool的错误

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lavcodec error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lavcodec is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lavfilter error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lavfilter is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lavformat error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lavformat is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lavutil error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lavutil is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lcrypto error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lcrypto is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lssl error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lssl is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lswresample error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lswresample is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lswscale error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lswscale is not an object file (not allowed in a library)
请问这是为什么呢

构建之前 identifier报错

The app identifier "com.SuiBianGaiGai.biliATV1" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.
F6116020-4CAD-4AC9-915D-443B56456D02

编译问题

1.git submodule模块依赖问题
2.最新编译器 不再支持swift 4以下

Error Launching Application

TV version
Apple TV 4K/tvOS 11.2.1

真机调试版本报
Error Launching Application
The operation couldn't be completed.(TVMLKitErrorDomain error 3.)

真机调试的时候把tvBaseURL改成本地起的服务器就不会有这个问题 不过进app之后的内容出现问题
模拟器调试的时候不改tvBaseURL也没有任何问题 进app之后的内容也正常

求助

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.