Skip to content

never88gone/HSBTVBrowser

Repository files navigation

Tanghulu Browser

TestFlight Platform License Telegram

简体中文 | English

Tanghulu

Introduction

A browser for Apple TV. I've been using a browser on Apple TV for a while, but found some operational issues, so I made some optimizations based on my own experience.

You can watch TikTok, Douyin, Tencent Video, Youku, and other video platforms on Apple TV. More websites are being adapted.

Due to policy reasons, this will likely remain closed source.

Now on Afdian (爱发电)

TestFlight URL

https://testflight.apple.com/join/QWne6G6V

Operation Instructions

  1. Double-click [Play/Pause] to display an advanced menu with more options
  2. Long press [Play/Pause] to directly open the player in fullscreen mode
  3. Click [Play/Pause] to control video playback/pause
  4. Click [Menu] button to go back, or exit when on the root page
  5. Click [Left/Right] buttons to control video fast-forward/rewind, or swipe left/right on the touch area (needs to be enabled in settings)
  6. Click [Up/Down] buttons to scroll the page, or on some websites to navigate to previous/next video
  7. Double-click the touch area to switch between cursor mode/scroll mode/touch mode/drag mode:
    • Click Mode: Cursor is displayed on the page, clicking the touch area triggers page click events. For pages using iframes, you can long press the iframe area to open it in a new window
    • Scroll Mode: Scroll the page by swiping up/down on the touch area or clicking up/down buttons
    • Touch Mode: Touch area clicks use mousedown/mouseup to implement clicks. Use this mode for buttons that can't be clicked in click mode, or for CAPTCHA pages. Scrolling implements mousemove, useful for pages that require mouse movement to display certain elements
    • Drag Mode: Long press the touch area to select an element to drag, then drag it
  8. Note: If the current webpage is playing a video, [Play/Pause] will be intercepted by the system. The first click will pause the video, and long press/double-click operations will require another action

Home

Note: The home page might display a clock to avoid Apple's review. When the clock is displayed, double-click the play button to access the actual home page.

Currently, there's only one tool: enter a URL to navigate to the corresponding webpage.

Tanghulu Home

Favorites

Bookmarked pages will be displayed here.

History

Browsing history will be displayed here.

Settings

App-related settings are displayed here.

Tanghulu Settings

Browser

Using Douyin as an example, you can access Douyin from the home page and control the mouse position using the trackpad. Double-click the play button to bring up advanced options. Use up/down buttons to navigate to previous/next video.

Tanghulu Browser

If the current page is playing a video, you can use left/right buttons to display the playback progress and adjust it. The progress bar is displayed at the top of the page.

Video Playback Progress

CAPTCHA Drag Effect

Custom Features

You can upload local JavaScript files to the app to implement advanced custom features.

Script Manager

Through the script manager, you can upload and manage custom JS script files.

Script Manager

Website Settings

In website settings, you can set custom scripts for specific websites to execute at the following times:

  • Custom Fullscreen: Execute when entering fullscreen
  • Exit Fullscreen: Execute when exiting fullscreen
  • After Loading: Execute after page loading is complete

Website Settings

Custom Buttons

In the advanced menu, you can add custom buttons that execute corresponding JS scripts when clicked.

Custom Buttons

Script Auto-Execution

You can write scripts to implement automatic login, automatic clicking, and other operations. For example, writing a script to automatically log in to Douyin.

Script Auto-Execution

Known Issues

Currently known bugs that cannot be resolved in the short term:

  1. MSE Video Playback Limitation: Videos using MSE (Media Source Extensions) on platforms like iQiyi, Douyin Live, Migu Video, etc., cannot be played due to tvOS system restrictions and cannot be resolved in the short term
  2. Iframe Operation Limitation: Some pages with embedded iframes may not be operable
  3. Playback Control Conflict: When a video is playing on the page, the Play/Pause button is intercepted by the system and requires pausing the video first before using other functions

Important Notes

Memory Shortage Issues

If the page displays a memory shortage error, here are the reasons and solutions:

Reasons:

  1. The latest Apple TV only has 4GB of memory, and older models have even less
  2. Apple's memory is shared between RAM and VRAM. With modern TVs being 4K, VRAM consumes a significant amount of memory
  3. tvOS 26's fluid glass effect consumes a lot of memory
  4. The actual memory available to apps is very limited. Browsers are memory-intensive, especially when simulating a desktop environment. When webpages recognize the device as a desktop, memory usage becomes even more aggressive. This issue cannot be resolved in the short term
  5. This app uses the system's browser engine. The browser does not forcefully close other apps when consuming memory. If other apps consume too much memory, the system will close them, which requires manual user intervention

Solutions:

  1. Close other background applications
  2. Restart the device
  3. Disable the dynamic glass effect in tvOS 26 settings for Apple TV
  4. Upgrade to a newer Apple TV model

Release Notes

Telegram Group

Telegram Group

Acknowledgments