Proposal [Rest API] Support streaming from http sources

Discussion in 'General Development' started by wizmo, Jun 30, 2022.

  1. wizmo

    wizmo Member

    I have a work-around to stream to the zidoo player that will be included in the next release of the Home-Assistant custom component. This Proposal is to either add this ability natively to the Rest API, or to fix an issue with Music Player 6.0

    Main Feature Request
    It would be best if streaming was supported natively by using a http:// reference in
    ZidooFileControl/v2/openFile?url= request.

    For example: ZidooFileControl/v2/openFile?url=http://192.168.1.1/music.mp3&type=0

    Fix Current Work-Around for Media Player 6.0

    currently I have discovered that it is possible to use the upnp request to start streams using undocumented calls

    ZidooFileControl/v2/openFile?url=<quoted_upnp>
    where <quoted_upnp> = upnp://<upnp_server>?type=<app_type>&res=<quoted_http_ref>
    the string must be quoted to protect references (i.i. "/" becomes "%2F")
    where
    <upnp_server> = udn ref ( ignored in most apps except Media_Player )
    <app_type> options are:
    0 = default Media Control app
    1 = Music Player
    2 = Video Player
    3 = Image Player
    4 = custom media app
    <quoted_http_ref> = remote file url
    the string must be double quoted (i.e. "/" becomes "%252F")
    There is an additional field for openFile - &way=<app_type> but this appears to be ignored
    There are additional fields in the <quoted_upnp> reference, but all seems to be optional ad/or ignored.

    This solution works for remote images, compatible videos, and other sources using 3rd party apps.

    It does not work on audio files with Music Player 6.0, which appears to re-query the UPNP server. (Fortunately, it is possible to play audio files using the Video Player).

    If the main feature request is not possible, could the Music Player be modified to fall back to the same operation as the other apps in some way to override the re-query (for example, if null is sent as the upnp_server?
     
    Last edited: Jun 30, 2022
    Sledgehamma likes this.

Share This Page