Skip to content

SharpCast is a C# implementation of the Google ChromeCast V2 protocol.

Notifications You must be signed in to change notification settings

jpepiot/SharpCast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SharpCast

SharpCast is a C# implementation of the Google ChromeCast V2 protocol.

USAGE

Player player = new Player("MYIPADDRESS");

// Get notified when the status of the media changed
player.MediaStatusChanged += (sender, status) => {
Console.WriteLine("New player state :" + status.PlayerState);
};

player.Connect();

// Load media content
client.LoadVideo(new Uri("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"),
"video/mp4",
new MovieMediaMetadata {
Title = "Big buck dunny",
Images = new[] { new Image {
Url = "http://www.ni-mate.com/wp-content/uploads/2012/12/Very_BBB_xmas1_8bit_600px_wide.jpg" }}});

// Start playing the media
player.Play();

API

.Connect()

Connects to ChromeCast device.

.Load(Uri contentUri, string contentType, MediaMetadata metadata, bool autoPlay, StreamType streamType)

Loads new content.

.LoadVideo(Uri contentUri, string contentType, MovieMediaMetadata metadata, bool autoPlay, StreamType streamType)

Loads new video content.

.LoadPhoto(Uri contentUri, string contentType, PhotoMediaMetadata metadata, bool autoPlay, StreamType streamType)

Loads new photo content.

.LoadMusic(Uri contentUri, string contentType, MusicTrackMediaMetadata metadata, bool autoPlay, StreamType streamType)

Loads new music content.

.Play()

Begins playback of the content that was loaded with the load call.

.Pause()

Pauses playback of the current content.

.Seek(double position)

Sets the current position in the stream.

.SetVolume(double level)

Sets the stream volume.

.SetMuted(bool muted)

Mutes/Unmutes the stream volume.

.StopApp()

Stops playback of the current content.

.LaunchApp(string applicationId)

.GetRunningApp()

Gets running application.

.GetAppAvailability(string applicationId)

Checks whether an application is available.

.GetStatus()

Retrieves the media status.

About

SharpCast is a C# implementation of the Google ChromeCast V2 protocol.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages