Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

v2.2.0

Compare
Choose a tag to compare
@GoneTone GoneTone released this 11 Dec 14:49
· 29 commits to master since this release
b438d03
  • 請注意,現在 const HiNetHichannel = require("hinet-hichannel-taiwan-radio"); 要改寫成 const {HiNetHichannel} = require("hinet-hichannel-taiwan-radio");,不然會噴錯

  • 新增代理 (Proxy) 方法

如果運行此程式的伺服器不在台灣,請設定台灣的 Proxy 伺服器,否則取得的串流網址會驗證失敗 (HTTP 403 Forbidden),但如果播放端 IP 在國外一樣會被阻擋就是了。

const {HiNetHichannel, Proxy} = require("hinet-hichannel-taiwan-radio");

/* 連線到 Proxy 伺服器 */
const proxy = new Proxy("主機名", 3128, "http");
//proxy.login("帳號", "密碼"); //如果 Proxy 伺服器需要驗證,請調用這登入

const hichannel = new HiNetHichannel("電台名稱", proxy);