SharpCast is a C# implementation of the Google ChromeCast V2 protocol.
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();
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.
Begins playback of the content that was loaded with the load call.
Pauses playback of the current content.
Sets the current position in the stream.
Sets the stream volume.
Mutes/Unmutes the stream volume.
Stops playback of the current content.
Gets running application.
Checks whether an application is available.
Retrieves the media status.