パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.3.3

dart_chromecast

ChromeCast デバイスに動画をキャストし、再生を制御するための純粋な Dart パッケージ

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
146
いいね数
51
Pub ポイント
140

パッケージをインストール

flutter pub add dart_chromecast

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

純粋なDartパッケージで、ChromeCastデバイスへのシームレスな動画キャストと完全な再生コントロールを可能にします。複数のプラットフォームで、Chromecastデバイスの検出、接続、メディア再生の管理を行うための簡単なAPIを提供します。プラットフォーム固有のコードに依存せずにGoogleのキャストエコシステムと統合したいアプリに最適です。このパッケージはAndroid、iOS、macOS、Windows、Linuxをサポートしており、クロスプラットフォーム開発に非常に柔軟です。

用途

  • モバイルまたはデスクトップアプリからの動画の配信
  • リモートで再生を制御する
  • メディアストリーミングアプリケーションの構築
  • FlutterアプリへのChromecastサポートの統合
  • 複数デバイス間のメディア同期を有効にする

主な機能

  • クロスプラットフォーム互換性
  • キャスティングおよび再生用のシンプルな API
  • メディアメタデータおよび再生コントロールのサポート
  • リアルタイムデバイス検出
  • 組み込みのエラーハンドリングおよび接続管理

適している対象

  • メディアアプリを開発する開発者
  • リモート再生制御を必要とするアプリ
  • クロスプラットフォームテレビおよびストリーミングソリューション
  • 複数のオペレーティングシステムをターゲットとするFlutterプロジェクト

注意事項

  • 互換性のある Chromecast デバイスが必要です
  • ネットワーク構成は接続性に影響を与える可能性があります
  • 動画のキャスティングのみ(オーディオのみではない)
  • 一部のプラットフォームでは追加の権限が必要になる場合があります
  • 信頼できるキャスティングのために安定したネットワーク状態を必要とする

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

dart_chromecast

Dart package to play videos to a chromecast device. Pub.dev package: https://pub.dev/packages/dart_chromecast

This package is currently under development and the API can change completely at some point. Use at your own risk.

Simplified port of https://github.com/thibauts/node-castv2-client.

Update 0.2.0: added MDNS finder, you can now omit the --host parameter and it will ask you which chromecast to use


Find the IP address of your chromecast on mac OS

This is the way I found the IP address of my ChromeCast on my Mac. This is not guaranteed to work for everyone, but if it helps anyone, here are the terminal commands:

$ dns-sd -B _googlecast local

Copy the instance name

$ dns-sd -L <IntanceName> _googlecast._tcp. local.

Copy the name (without the port) directly after the text ' can be reached at '...

$ dns-sd -Gv4v6 <Paste>


See https://github.com/terrabythia/flutter_chromecast_example for an example implementation in Flutter of both the flutter_mdns_plugin and this repository.


usage

options

media space separated list of one or more media source urls

host (optional) IP address of a ChromeCast device in the same network that you are on.

port (optional) port of the ChromeCast device. Defaults to 8009.

flags

--append (-a) whether to append the passed in media to the current playlist and not replace the current playlist (if reconnecting was successful). Defaults to false.
--debug (-d) whether to show all info logs, defaults to false.

usage

dart example/main.dart <media> [--host <host> [--port <port> [--append [ --debug]]]]

playback control

In this demo the following keys can be used to control the playback of the video:

space toggle paused state
s stop playback
esc disconnect device
left arrow key seek -10 seconds
right arrow key seek +10 seconds

example

dart example/main.dart http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4

reconnecting to active session

When you exit the command line without disconnecting the device, the video will keep playing. To reconnect without messing with the current playlist, just run the command without any media urls. Eg:

dart example/main.dart --host=192.168.1.1

カテゴリー

依存関係

依存関係一覧 8 件

ソースリポジトリ

このパッケージを使用しているプロジェクト