- changed version to 1.3
Hyperlinks to Add Content To Serviio
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)
-
repo owner -
repo owner -
repo owner -
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.
-
repo owner I think it'll be something like
serviio://
or
serviio:online:video:live://
-
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.
-
reporter serviio://
I think the first option would be the best and easy format to follow
-
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"
-
Putting it in http://www.freeformatter.com/url-parser-query-string-splitter.html it looks good provided Android's Uri implementation is happy with an invalid port (as 'live' will be the port), which acording to the docs it will be OK with http://developer.android.com/reference/android/net/Uri.html#getPort%28%29
Will check tonight and confirm
-
repo owner actually the
video:live
bit should be authority. -
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. -
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¶m2=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
-
repo owner cool
-
-
repo owner - changed status to resolved
-
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.
-
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
orvideo
- online_repo_type can be
web
,live
orfeed
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
- file_type can be
- Log in to comment