Kodi Community Forum

Full Version: yarc for mobile: adding webspeech (voice commands)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11
Hi there,

i have been working an my own webbased remote control, since i had some special needs. If you try it, feedback or bugreports are very welcome!

Special feature (what does it makes different from other great webcontrols?):
- optimised for touch devices like mobile phones
- navigate with gestures, and set it's hight (only if you want to, you can also use keyboard or on screen-buttons)
- read language tags directly from the filename (see readme.md for more information)
- browse addon content and start media directly from your browser
- say how many items should be shown in a list
- Send a text-string from the yarc-GUI to a textfield in XBMC

An demo video (for version 0.8.0):
[video=youtube]A introduction video can be found here: https://www.youtube.com/watch?v=yltMcKJFewE[/video]

System requirements:
- Frodo
- javascirpt
- internet connection for some features

Download:
Download zip or code and add it to your XBMC and if you whish set the addon to be your default webinterface.
https://github.com/tuxfuxch/yarc

Tested on:
* Firefox
* Android: Firefox-mobile

Not entirely tested:
* Android: Maxthon
- no keyboard use
- removing form playlist: button get's often not activated
* Android: Chrome
- removing form playlist: button get's often not activated
* Ubuntu Touch Browser
- svg don't work
- Deviceorienation doesn't work (no support from browser side yet)

Read more about:
https://github.com/tuxfuxch/yarc/blob/master/README.md


Start Page with fast access to most recent media, addons and favourties (yarc remembers which sections you have open/closed):

Image

Touch and swipe for navigation and player actions:

Image

Or replace field with buttons (in case of compatibility issues):

Image

See playlist, choose, remove or move item:

Image

Listview of your media for small screens. There are possibilities to see entries only for one genre etc:

Image

Tiles for large screens (yarc remembers genre selections):

Image

See details of Media (in music you can choose to add only some titles):

Image

Start and browse addons:

Image Image

Browse favourites and browse local folders (if added to favourites):

Image

Resume started media:

Image
Hello tuxfuxch,

I got your interface to install on Gotham. (I had to remove the "xbmc.gui" requirement in addon.xml).

LOVE the swipe functionality in this interface. I can see a lot of thought went into this.

I will play with the interface more later today, time for work Sad



-Kabooga.
Hi Kabooga,

thanks for the nice words and the feedback. I will have a look into it and dig into the addons wikipages to find out what i did wrong and correct it.

more feedback is very welcome, so that i can improve it. Have fun working, and playing around later.
I wasn't seeing any movies in the list even though the VideoLibrary.GetMovies API call was successfull.

In createMovieList: I made a change to set yMovies.listLength correctly.

File yarc.js, line 737 (near there).

Code:
if((yS.listLength > yMovies.moviesJSON["result"]["limits"]["end"]) || (isNaN(yS.listLength))){

I added the test for isNaN(yS.listLength) this seemed to set the value yMovies.listLength correctly.
(2014-06-20, 00:37)tuxfuxch Wrote: [ -> ]Hi Kabooga,

thanks for the nice words and the feedback. I will have a look into it and dig into the addons wikipages to find out what i did wrong and correct it.

more feedback is very welcome, so that i can improve it. Have fun working, and playing around later.

you only need to rely on the correct xbmc.json version (the minimum you require).
Hey, thanks for the replies!

@Kabooga: thanks for the in dept analysis, this was very helpfull. It seems, that when the application is run for the first time, the initial settings i write into local storage does not get written. I think i need to redesign my concept. The problem was (as you found out) that the local storage was not set, and so it was not there when it looked for it. i think this problem was also there for the music and addonpage. i try to find a solution and update it.

@Martijn: also thanks to you for the clarification. I removed it in my working copy and checket the xbmc.json version i need. next update will be without this mistake.

i have to admit, i started this project to learn these technologies. so mistakes like the one kabooga found is a result of "i am not as far as i should be". appologise for that, and again, i realy apreciate your testing!
Ok i uplaoded the new source and a new zip with version 0.2.1

@Kabooga: thanks for the hint. it was a major flaw. the problem was, i think, that the default setting was not written. so it has affected multiple stuff. instead of changing the lines in the code i got the setting to get written, so that your solution is not needen anymore. I hope it works out.

@Martijn: the addon.xml is corrected

have fun playing with it!
Hi tuxfuxch
You asked for feedback, so here you are:
I have literally spent months on-line trawling for a solution to play my music stored in my Linux XBMC setup from my Nokia 5800 XpressMusic. Let me stress that this phone is six years old, has 42,1 megabyte of available RAM, an ARM 11 CPU @ 434 MHz running Symbian s60v5 using Opera Mobile 12. So far you are the only one who has come up with a workable solution and I owe you. Big time.

Yes I know that it would be easier just to buy another newer phone with a 2 gazillion gigahertz processor and a 16K screen, but I'm stubborn like that :-)

My biggest question: Is there any way to display the playlist in yarc?

Do keep up your fantastic work. It is very appreciated and I commend you.
hi ruth,

thanks for the feedback. i am very glad that this solution works for your "old" phone. i inteded this, although my mobile is not as old as yours. but it's good to know!

i am stubborn too Wink never change a good phone.

unfortunatelly it's not possible so far. BUT i thought about this, and you managed to bring me to the point to move it to top priority in my todolist Wink stillthen, i need you to be a bit patient, until i come up with something i think it's ok.

any suggestions how to do it? where to place a button to open the current playlist? playlist in a popup? what functionality would you like in it? delete items, or also move them?

well acutually, just the second half time of the football worldcup match switzerland - honduras started, and we are winning, so maybe more thinking tomorrow Wink
Hi tuxfuxch,
I'm rather pleased that you are considering the idea of a playlist. It does not need to have all sorts of bells and whistles - I would imagine that a new window with a back button would be fine. The option to click a title to jump to that specific song and play the list from there would be nice. A lot of functionality of adding songs you have already covered quite well. As for the placement of the playlist button I guess it could be placed to the right of "Player Menu" and be called "PL" to save space. Something like this:
---FS---Home---MediaInfo---Player Menu---PL---

Don't worry about my patience, though. Hunting for old .sis and .jar files for a Symbian s60v5 will either make you bonkers or... patient ;-)
Tried the 0.2.1 version. Came up just fine (Using IE 10).

The music tab work fine. Nice work.
Have not tried the series tab yet.
I ran into issues with the movie tab. I could see the movies listed and select a movie. If I selected a movie to play nothing would happen.

Messing around with the code I did get movies to play by changing two things
1) Near line 712 in yarc.js.
Change line
Code:
$("#popupPlayMovies").attr("name", movieNr);
to
Code:
$("#popupPlay").attr("name", movieNr);

2) At popupPlay: Changed Player.Open JSON API method to use "movieid" instead of "file". Near line 921 file yarc.js.
Code:
                    '{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "movieid": '
                            + yMovies.moviesJSON["result"]["movies"][movieNr]["movieid"] + ' } }, "id": 1 }',
These changes are what I did to make it work in my environment.

The Playlist idea:
I like ruth440's idea of putting the button next to to the Player Menu button. There or between the "Play Playlist" and "Empty Playlist" buttons in the Music tab. Either would be a good place for the Playlist button.

Overall your webinterface is shaping up to be a really nice interface to use.

PS: Putting FIFA over XBMC? Blasphemy!!! Tongue
Hi everyone,

i could not leave it and worked on the playlist feature. the code is still worse then the rest, but as "proove of concept" it's fine. more to come soon!

but with the position of the button, i need to disapoint:
1) the music tab is not so good, because there is also a video playlist
2) the button grid with the arrows is not good, because it would be removed if the swipe area is used
3) the bar with FS etc. is not good on my screen, because of my low width on my mobile, the bar is ugly breaking

so i thought about a button just over the textfield, or (wehre it is now) between the fast backward and fast forward. is it ok there or missplaced?

right now it shows the playlist, if something is playing, it's indicating whichone. and you can jump to another item. not more right now.

@Kabooga: thanks, it's true. don't know what i did that it is not working anymore. i think i need to consequently test everything before a release. i will change the bug you found. THANKS a lot!

in the new release (not uploaded yet) there will be some changes, you guys might like. but i will write more about when i upload the new version.

tomorrow or saturday it will happen. i promise!
Hi!

i did it, Version 0.3.0 is now aviable: https://github.com/tuxfuxch/yarc

Version 0.3.0:
- setting for swipe area hight added
- dark theme and setting added
- faster pagetransition
- bugfix: trailers and movies works now again
- some inter-face-lifting
- some css bug's fixed
- update of readme

BUT: i have some issues with the setting management which i could not fix yet. So when you install the new version, it will be very dark. go to the settings and make your preference (the checkbox "use dark theme" is not ticked, altough it's dark, just set what you want, it will be right after the saving)

to the movie start problem: i fixed like kabooga sugested. unfortunatelly my xbmc always crashes when i try to start a movie. i didn't have time to look into this, but since it also crashed over the webinterface, i take it as a good sign Smile i have my dvd collection all in dvd.iso and had not time to rip my whole collection or get into the problem... so please try again), there was also a problem with the trailer button.

it has now a playlist. also for video. but i could not test the video part, because i have no tv series. for the screenshots i made fake files which can't be startet, so i couldn't test that. the music section works.

i think it's ok for a first version and the code is better now. i plan to add also a "remove item" feature.
if you have the list open, and something is playing, it indicates which one. it has no auto refresh. i think it's too much overhead. would that be important? you can refresh in swicht to the other tab and back....

have fun playing with it!

oh forgot in the list: PLAYLIST feature added Smile

so now i can prepare for the brazil - chile match ! i know i know... Blasphemy....
Hi tuxfuxch
I've been playing with version 0.3 for a little while now. My initial thoughts: This blows me away and I absolutely love what you have done by adding the playlist. You are the one I can thank for hopefully not going back to Logitech Media Server (LMS) which is a major relief. Setting up both XBMC and LMS on one system is just a horrible solution, but it looks like I don't have to do that any more - fantastic!

I will give you a more detailed response regarding user experience in a few days when I've done some more testing.
OK, as promised here is a little more detailed feedback on your 0.3 yarc web interface:
To quickly recap, my reason for testing your web interface is the fact that I would like to use my phone (an old Nokia 5800 Xpressmusic) as a remote control. But not only as a simple remote control. Since I have a Linux XBMC set up with a projector, I *really* don't want to turn on my projector every time I want to listen to some music. So I need to be able to do some library control on my mobile as well. Now there are plenty of ways to do this if you have an Android or an Apple phone. But you can forget about that if you have a Symbian s60v5 phone like the Nokia 5800.

Enter yarc. With Opera Mobile 12 which is the most technically advanced browser for s60v5 that I could find, yarc seems to be working nearly out of the box. On startup my screen looks like this with the swipe area replaced by buttons:

Image

As you can see, some buttons are not being rendered correctly by Opera. Not being a programmer and thus not having a clue as of how to do a smart fix, I changed index.html a little bit.

From this:
type="button">┃◀</button>
type="button">▶┃┃</button>
type="button">■</button>
type="button">▶┃</button>
type="button" data-mini="true">◀◀</button>
type="button" data-mini="true">▶▶</button>
type="button">▲</button>
type="button">◀</button>
type="button">✔</button>
type="button">▶</button>
type="button">▼</button>

(ha-ha... pasting this code in the forum kind of screws things up as well. I guess you get the gist of it, anyway!)

To this:
type="button">Prev</button>
type="button">Play</button>
type="button">Stop</button>
type="button">Next</button>
type="button" data-mini="true">FR</button>
type="button" data-mini="true">FF</button>
type="button">Up</button>
type="button">Left</button>
type="button">OK</button>
type="button">Right</button>
type="button">Down</button>
type="button">Back</button>

Now, the player looks like this on my screen:

Image

I know that this is an extremely quick and dirty fix, but I just needed to be sure what was what. Loading up the play list went well and it respects the limit you can set in the tools section, which is a must when dealing with large libraries. Having initially tested with a small library of 50 items, everything was working fine. So I decided to use my entire music library of 10,000+ items, which was when I ran into trouble. I guess that the sorting of the list is using some kind of overlay which is apparently ignored in Opera Mobile 12. This means that the whole thing is loaded before chopping the list into sections of for example 10 albums at a time. Needless to say, Opera stalls completely when trying to display this amount of items. It loads for a couple of minutes before showing everything in one very long page. I hope this can be fixed in a future release but I must be realistic and come to terms with the fact that I'm using very outdated technology.

These are the only issues I have found so far. Of course, one can always hope for other small tweaks in the interface that you could come up with and I do love the new possibility of changing the colour theme.

So, to sum it all up: I am incredibly amazed by what you have managed to do here. It is fast, easy on older hardware, scalable and unlike many other web interfaces out there it has a clean and beautiful gui. The buttons I mentioned do show up fine in Firefox and I can easily understand that you are not testing it in an ancient browser such as Opera Mobile 12 for s60v5. The only real show stopper I could find was the missing ability of reducing the amount of lines in the music tab, but I'm afraid that this issue has to do with my phone simply not having a browser that can render the page correctly.

You are doing valuable work here and I am flattered that you decided to go along with the idea of including a play list. Thank you for a fantastic release!
Pages: 1 2 3 4 5 6 7 8 9 10 11