Code Monkey home page Code Monkey logo

sharpcast's Introduction

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.

sharpcast's People

Contributors

jpepiot avatar janek91 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.