メインコンテンツまでスキップ
バージョン: v2.0

クラス: HttpStreamProvider

定義: plugins/music/src/builtin/HttpStreamProvider.ts:262

http(s) URL から音声を取得する既定のプロバイダー。 直リンク・オブジェクトストレージ・Icecast/Shoutcast ラジオに対応します。

拡張

コンストラクター

コンストラクター

new HttpStreamProvider(): HttpStreamProvider;

戻り値

HttpStreamProvider

継承元

StreamProvider.constructor

プロパティ

container

readonly container: Container;

定義: src/component/Component.ts:30

フレームワーク共有サービスを持つコンテナ。

継承元

StreamProvider.container


location

readonly location: string | null;

定義: src/component/Component.ts:39

自動探索されたファイルの絶対パス。明示登録の場合は null

継承元

StreamProvider.location


logger

readonly logger: Logger;

定義: src/component/Component.ts:36

このコンポーネント用の子ロガー({ store, component } が付与済み)。

継承元

StreamProvider.logger


name

readonly name: string;

定義: src/component/Component.ts:27

ストア内で一意なコンポーネント名。

継承元

StreamProvider.name


priority

readonly priority: number;

定義: plugins/music/src/StreamProvider.ts:57

継承元

StreamProvider.priority


store

readonly store: ComponentStore<Component>;

定義: src/component/Component.ts:33

このコンポーネントが属するストア。

継承元

StreamProvider.store

アクセッサー

client

署名を取得する

get client(): Client;

定義: src/component/Component.ts:42

フレームワーククライアント。

戻り値

Client

継承元

StreamProvider.client


services

署名を取得する

get services(): Services;

定義: src/component/Component.ts:50

ロード済みサービスへのアクセス(services/ から自動収束)。 import せずに this.services.<名前> で参照できます。

戻り値

Services

継承元

StreamProvider.services

メソッド

canStream()

canStream(track): boolean;

定義: plugins/music/src/builtin/HttpStreamProvider.ts:263

このトラックを再生できるか。副作用のない高速な判定にしてください。

パラメータ

track

Track

戻り値

boolean

上書き

StreamProvider.canStream


onLoad()?

optional onLoad(): unknown;

定義: src/component/Component.ts:55

初期化後・ストア追加前に呼ばれます。

戻り値

unknown

継承元

StreamProvider.onLoad


onUnload()?

optional onUnload(): unknown;

定義: src/component/Component.ts:58

ストアから取り除かれるときに呼ばれます(クライアント終了時を含む)。

戻り値

unknown

継承元

StreamProvider.onUnload


stream()

stream(track, context?): Promise<AudioStream>;

定義: plugins/music/src/builtin/HttpStreamProvider.ts:267

トラックの音声ストリームを開きます。

パラメータ

track

Track

context?

StreamOpenContext = {}

戻り値

Promise<AudioStream>

上書き

StreamProvider.stream


define()

static define(options?): (_target, context) => void;

定義: plugins/music/src/StreamProvider.ts:59

パラメータ

options?

StreamProviderOptions = {}

戻り値

(_target, context) => void

継承元

StreamProvider.define