GithubHelp home page GithubHelp logo

cast-api's Introduction

Digital Media Server

GitHub top language GitHub contributors Crowdin

Digital Media Server Digital Media Server is a DLNA compatible UPnP AV Media Server. It is capable of sharing digital video, audio and image resources to UPnP AV and DLNA capable devices. It is based on PS3 Media Server by shagrath and Universal Media Server.

Digital Media Server supports Windows, Linux and macOS. It streams or transcodes many different media formats with little or no configuration. It is powered by MEncoder, FFmpeg, tsMuxeR, AviSynth, MediaInfo, VLC, OpenSubtitles.org and more, which combine to offer support for a wide range of media formats.

Terms of use

By using this software, for any purpose and in any shape or form, you grant your implicit agreement to the following statements:

  • You condemn Russia and its military aggression against Ukraine.
  • You recognize that Russia is an occupant that unlawfully invaded a sovereign state.
  • You support Ukraine's territorial integrity, including its claims over temporarily occupied territories of Crimea and Donbas.
  • You reject false narratives perpetuated by Russian state propaganda.

Glory to Ukraine! πŸ‡ΊπŸ‡¦

Current Project Developers

Links

cast-api's People

Contributors

cweitkamp avatar dependabot[bot] avatar dereulenspiegel avatar dylanmeeus avatar emlove avatar haku avatar holmes avatar jarlebh avatar jonesman avatar jruesga avatar kivinn77 avatar maggu2810 avatar nadahar avatar notexpected avatar scottalbertine avatar sfuhrm avatar stypox avatar vitalidze avatar wborn avatar zeroone3010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cast-api's Issues

Running Apps throw unexpected errors

Working around the issue of not having a list of apps. I'm caching the apps. Just fiddling around, i found that several apps give this error. As far as i can see i cannot control this.

2023-01-04 00:59:45.470 [DEBUG] [omecast.internal.ChromecastCommander] - Failed to request media status for app: Application [appId=Netflix, displayName=Netflix, iconUrl=, isIdleScreen=false, launchedFromCloud=false, namespaces=[], sessionId=801bc1fc-c175-4233-9d72-dd69777a5f18, statusText=Netflix, universalAppId=Netflix] with message : application.getTransportId() cannot be null or blank

java.lang.IllegalArgumentException: application.getTransportId() cannot be null or blank
	at org.digitalmediaserver.cast.Util.requireNotBlank(Util.java:149) ~[?:?]
	at org.digitalmediaserver.cast.Channel.startSession(Channel.java:789) ~[?:?]
	at org.digitalmediaserver.cast.CastDevice.startSession(CastDevice.java:803) ~[?:?]
	at org.openhab.binding.chromecast.internal.ChromecastCommander.handleRefresh(ChromecastCommander.java:121) ~[?:?]
	at org.openhab.binding.chromecast.internal.handler.ChromecastHandler$Coordinator.refresh(ChromecastHandler.java:348) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

Calling code:

runningApp = status.getRunningApplication()
Session session = chromeCast.startSession(SENDER_ID, runningApp);
MediaStatus mediaStatus = session.getMediaStatus();

Started the apps from the cast device itself and not from the sender. Could it be related to the sourceId param of startsession? I have that set to a static string SENDER_ID = "myVeryFirstCastController" :-)

Edit:
With Amazone prime i get this:

2023-01-04 01:45:37.888 [WARN ] [org.digitalmediaserver.cast.Channel ] - Error while processing JSON message from Unidentified cast device: Cannot construct instance of `org.digitalmediaserver.cast.MediaStatus`, problem: volume cannot be null
 at [Source: UNKNOWN; byte offset: #UNKNOWN]
2023-01-04 01:45:41.788 [ERROR] [org.digitalmediaserver.cast.Channel ] - Received unhandled "MEDIA_STATUS" message from Unidentified cast device, this should not happen: {"requestId":4403,"responseType":"MEDIA_STATUS","status":[{"mediaSessionId":25,"currentItemId":1,"playerState":"PLAYING","currentTime":298.566,"playbackRate":1,"supportedMediaCommands":13,"repeatMode":"REPEAT_OFF"}]}
2023-01-04 01:45:41.788 [DEBUG] [ast.internal.ChromecastEventReceiver] - Received an 'UNKNOWN' event (class=class com.fasterxml.jackson.databind.JsonNode)
2023-01-04 01:45:43.628 [ERROR] [org.digitalmediaserver.cast.Channel ] - Received unhandled "MEDIA_STATUS" message from Unidentified cast device, this should not happen: {"requestId":4364,"responseType":"MEDIA_STATUS","status":[{"mediaSessionId":25,"currentItemId":1,"playerState":"PLAYING","currentTime":300.417,"playbackRate":1,"supportedMediaCommands":13,"repeatMode":"REPEAT_OFF"}]}
2023-01-04 01:45:43.629 [DEBUG] [ast.internal.ChromecastEventReceiver] - Received an 'UNKNOWN' event (class=class com.fasterxml.jackson.databind.JsonNode)

From that i see two problems.

  1. the volume cannot be null, but it is. Does the lib assume it is not null while it it might be null form the api?
  2. something is wrong handling the "MEDIA_STATUS" message leading to a 'UNKNOWN' event in the registered eventhandler. (lib consumer)

Retrieve mediastatus

For a project i'm experimenting with a replacement to and this fork seems to solve most issues we have. Most of the handling is similar, but the session MediaStatus is pretty different. I have this requirement to show the title in the media player (appId: CC1AD845).

Previously we called:
chromeCast.load(title, null, url, mimeType);
This has changed to

MediaBuilder builder = new MediaBuilder(url, mimeType, StreamType.NONE);
session.load(builder, true, 0.0, false);

But i don't see an obvious place/call to add this title so it get shown. Can someone help me out here?

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.