패키지, 저장소 및 앱 카테고리 검색

패키지 상세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
  • 미디어 메타데이터 및 재생 컨트롤 지원
  • 실시간 장치 탐지
  • 내장된 오류 처리 및 연결 관리

적합한 대상

  • 미디어 앱을 개발하는 개발자
  • 원격 재생 제어가 필요한 앱
  • 크로스플랫폼 TV 및 스트리밍 솔루션
  • 여러 운영 체제를 대상으로 하는 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 개

소스 저장소

이 패키지를 사용하는 프로젝트