Hyperlinks to Add Content To Serviio

Issue #541 resolved
Aziz Rahman created an issue

Original post here - http://forum.serviio.org/viewtopic.php?f=3&t=6297

Specially formatted hyperlink on a browser can send URL and its specific Serviio content(source type, media type, name, thumbnail url) so its easy to add to Serviio.

This will make easier to share links to other Serviio users and these links can be held on an online database like serviiDB to add to Serviio without a third party app/program simply using a browser

Comments (17)

  1. Will Lunniss

    When you do this, can you post the protocal name that you pick so that I can double check that I will be able to register ServiiDroid to handle it on Android. Something like the proposed 'serviio' should work nicely.

  2. Will Lunniss

    The first works, just tried the second and it doesn't register properly if I put : in the scheme.

    Could do serviio://live.video.online/data

    Then the host part would be live.video.online, which can be split on . to give online, video, live. But need to work out a nice way to encode the title, url and thumbnail url into the data part seeing as url can be quite complex.

  3. Petr Nejedly repo owner

    This is the current state, Will does that look ok for Android?

    serviio://video:live?url=rtmp%3A%2F%2Fsome.com%3Fparam%3D1%26param2%3D2+playPath%3Daa%2Fbb%2Fcc+live%3D1&thUrl=http%3A%2F%2Fwww.aa.com%2Fth.jpg%3Fparam%3D1&name=my+live+stream+%C4%8C%C5%A1%C5%99"

  4. Will Lunniss

    video:live is the authority, however, Uri.parse() will try to find the port, which comes after the : in the authority. The docs suggest it won't fail when the string after : cannot be read into an int, so should be fine.

  5. Will Lunniss

    That works.

    Log.d("Uri Test", "Media Type : " + uri.getAuthority().split(":")[0]);
    Log.d("Uri Test", "Source Type : " + uri.getAuthority().split(":")[1]);
    Log.d("Uri Test", "Title : " + uri.getQueryParameter("name"));
    Log.d("Uri Test", "Url : " + uri.getQueryParameter("url"));
    Log.d("Uri Test", "Thumbnail Url : " + uri.getQueryParameter("thUrl"));
    

    Gives:

    06-05 18:48:12.614: D/Uri Test(11636): Media Type : video
    06-05 18:48:12.614: D/Uri Test(11636): Source Type : live
    06-05 18:48:12.614: D/Uri Test(11636): Title : my live stream Čšř
    06-05 18:48:12.624: D/Uri Test(11636): Url : rtmp://some.com?param=1&param2=2 playPath=aa/bb/cc live=1
    06-05 18:48:12.624: D/Uri Test(11636): Thumbnail Url : http://www.aa.com/th.jpg?param=1
    
  6. Stephen Strickland

    Can you give me a list of all the parameters that this URL can have. I will start working on serviidb.com to generate the URLs automatically for each media entry.

  7. Petr Nejedly repo owner

    ServiioLink looks like this:

    serviio://<file_type>:<online_repo_type>?url=<url_encoded_content_url>&thUrl=<url_encoded_thumbnail_url>&name=<url_encoded_repository_name>

    where

    • file_type can be audio, image or video
    • online_repo_type can be web, live or feed

    Regarding query parameters, only url is mandatory.

    Some examples:

    serviio://video:live?url=rtmp%3A%2F%2Fsome.com%3Fparam%3D1%26param2%3D2+playPath%3Daa%2Fbb%2Fcc+live%3D1&thUrl=http%3A%2F%2Fwww.aa.com%2Fth.jpg%3Fparam%3D1&name=my+live+stream+%C4%8C%C5%A1%C5%99

    serviio://audio:feed?url=http%3A%2F%2Fsome.google.com%2Ffeed.xml

  8. Log in to comment