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

azasypkin/rust-caster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMPORTANT: This repository is no longer maintained since the tool has been merged to the Rust Cast repository as the example.


Rust Caster

Build Status

Just a helper tool for Rust Cast crate.

Usage

Generic features

To get the address of the device you can use avahi with the following command:

$ avahi-browse -a --resolve
// Get some info about the Google Cast enabled device (e.g. Chromecast). 
$ cargo run -- -a 192.168.0.100 -i

Number of apps run: 1
App#0: Default Media Receiver (CC1AD845)
Volume level: 1
Muted: false

// Run specific app on the Chromecast.
$ cargo run -- -a 192.168.0.100 -r youtube

// Stop specific active app.
$ cargo run -- -a 192.168.0.100 -s youtube

// Stop currently active app.
$ cargo run -- -a 192.168.0.100 --stop-current

The following app has been stopped: Default Media Receiver (CC1AD845)

Media features

// Stream a video.
$ cargo run -- -a 192.168.0.100 -m https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

// Stream a video of specific format with buffering.
$ cargo run -- -a 192.168.0.100 -m https://xxx.webm --media-type video/webm --media-stream-type buffered

// Stream video from YouTube.
$ cargo run -- -a 192.168.0.100 -m 7LcUOEP7Brc --media-app youtube

// Display an image.
$ cargo run -- -a 192.168.0.100 -m https://azasypkin.github.io/style-my-image/images/mozilla.jpg

// Change volume level.
$ cargo run -- -a 192.168.0.100 --media-volume 0.5

// Mute/unmute media.
$ cargo run -- -a 192.168.0.100 --media-mute [--media-unmute]

// Pause media.
$ cargo run -- -a 192.168.0.100 --media-app youtube --media-pause

// Resume/play media.
$ cargo run -- -a 192.168.0.100 --media-app youtube --media-play

// Seek media.
$ cargo run -- -a 192.168.0.100 --media-app youtube --media-seek 100

For all possible values of --media-type see Supported Media for Google Cast.

About

Test tool that demonstrates Rust Cast crate - https://github.com/azasypkin/rust-cast.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages