Virtual DJ Studio Home | NGWave Home | Official Facebook Page | Unofficial VDJ Users Group

Author Topic: Busy as heck working on 7.0...  (Read 75377 times)

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Busy as heck working on 7.0...
« on: August 19, 2013, 06:11:17 PM »
So I've been busy working on several aspects of Virtual DJ Studio 7.0, researching UPnP protocols and VPN/PPTP, along with a million other things... so I took a break to make dinner, and I looked at my computer and saw the attached. I've never had so much going on at once! Luckily this HP handles it like a pro, but it just looks insane - 14 Chrome tabs open, my development environment, a couple Notepads, VDJ itself, two terminals (one logged into my web server, one my home Linux computer), and of course Windows Calculator :)

And the installer for an Android phone I'm working with to perfect the app... thanks Fabio!

Notice all the m3u playlist files in the Download bar... I've been trying to resolve an issue where Android won't play back the "preview" in the app, rather it wants to download it. Unfortunately it won't open it from an m3u or pls playlist file, so that effort was moot...

Anyway, just wanted to update you guys on the progress so far. The app works great, with two issues:

1) I really want to NOT have to require port forwarding; hopefully UPnP will solve this... hopefully...

- and -

2) Doesn't seem like Android likes to stream MP3 files, without some app installed to handle them. The built-in player just won't do it. Only option would be to convert them to .flv (flash video/audio) files, and that's far too much CPU load on your DJ laptop...

I kinda figured mp3 was so well known and popular that any device should play them w/o problems (the iPod/iPhone does). Not sure why but Android doesn't like streaming them.

I'll figure it out eventually... I'm sure...


[attachment deleted by admin]
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #1 on: August 19, 2013, 06:56:23 PM »
No problem Justin :)

regarding playing mp3s in Android browser, I found the following:

http://stackoverflow.com/questions/10900816/playing-audio-with-html5-in-android-browser

Towards the bottom of the post you'll see the following code:

Code: [Select]
<audio id="audio1" controls="controls" loop="loop" autoplay="autoplay" >
   <source src="scene1.mp3" type="audio/mpeg" />
   <source src="scene1.ogg" type="audio/ogg" />
</audio>

I'm not sure if it will help but what the heck...it might.

Also, I'm thinking it might be browser related.  When you get a change get the search back on and I'll test it with different browsers from my end.  I have the built-in browser, Firefox, Chrome and Dolphin on my phone.

-Fabio



Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #2 on: August 19, 2013, 07:07:24 PM »
I hadn't even thought of embedding the preview as a "background audio" - the whole idea of background music in a web page went out in like 1998 or so... but that might possibly be a solution - load up a page with the song name displayed, and the audio going in the background!

As for it not showing controls etc, not a problem, we're only giving you 20 seconds anyway. I'll do some tests in the morning.

Quote
When you get a change get the search back on and I'll test it with different browsers from my end.

Done and done. For now I just reverted to it downloading the MP3 (which streams on iWhatever)... but I'll leave VDJ running overnight, as I'm about done coding for the day. Time to watch some Law & Order, throw back a couple, and get some sleep :)

That is, if I can put the DroidX down long enough lol...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #3 on: August 19, 2013, 07:08:34 PM »
By the way, as you're probably aware, Flash is a dying technology so going that direction just to play mp3s is probably not a good idea. Besides the fact that you'd fix it on Android but will break it on iOS.  Even on Android since version Jelly Bean (I believe), they stopped supporting it...luckily you can still side load it, but only certain browser will still support it.  For example FF on my Galaxy note 2 does support it, if installed, but Chrome completely ignores it.



Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #4 on: August 19, 2013, 08:37:53 PM »
Good information. I'm not all that big on mobile technologies, and I had no idea Flash was a dying technology... Youtube videos are all streamed as FLV flash videos, so I thought that was here to stay...

I certainly don't want to break support for iOS, so I'll have to do some trial & error to make sure the app supports as many platforms as possible. Note that this really only affects Preview, which I don't think is all that critical - the rest of the app is a combination of HTML5, CSS, and JavaScript, all three of which are supported on almost every platform out there.

I have to admit, using the DroidX with WiFi and my Hulu Plus, I'm just having fun right now. Not to mention, it's a full Linux box in my pocket... I've already installed a terminal emulator, and an SSH server that allows me to log into the device from my laptop... but that's the Linux geek in me :)

Having this much insight into the device also helps me understand it - it's just that with the preview function, it really will depend on what browser they are using. I think I'll target the default browser mostly, but I'd like to know it will function on Firefox, Safari, Chrome, etc...

The rest of the app, aside from song preview, works just fine on all browsers on all devices I've tried. And that's really what it's all about - being able to submit requests, text messages, etc. My real concern right now is the ability to use UPnP to not require port forwarding in the router. Note by the way, Android supports UPnP natively and easily, eg, streaming video from my MythTV DVR from remote locations. If they can do it, certainly VDJ can do it. MythTV is all open source, so one way or another I'll figure it out... My MythTV box is behind the same NAT router as my laptop, and it can be accessed from my friend's house with seemingly no problems. So there's no reason my laptop (and anyone's laptop behind any NAT router) shouldn't be accessible from the outside as well.
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #5 on: August 20, 2013, 01:51:22 AM »
Quote
Youtube videos are all streamed as FLV flash videos, so I thought that was here to stay...

Actually they're in both FLV and mp4...for example iPhones and iPad play the mp4 version since iOS doesn't support flash since Steve Jobs decided they were not going to support it...in some way his reasoning was correct but I thought they should have supported until it was replaced html5:

http://www.apple.com/hotnews/thoughts-on-flash/

http://www.geek.com/news/adobe-release-their-own-html5-flash-replacement-app-called-edge-1408181/

If you think DroidX is great you should try my Galaxy note 2 with larger screen dual (front and back) camera and greater capabilities with Android 4.1.2.

As far as the preview it works fine as long as pick your default player such as the Google Play Music app.  You can use any browser.  In fact, with the default browser, you only have this as your choice even if you have other players (I Have MixZing and a beta version of the VLC player). 

In my version of Android the default browser is just called "Internet" in the DroidX I believe it's just called "Browser".  The "internet" version feels a lot closer to Chrome than the "Browser" version.  On my version everytime you select a preview it will display a window to "Choose an Action" every time you pick a song to preview regardless of what you picked previously.  After that it will play the same in all browsers, with a small white band on top of the browser (Chrome, Firefox and Dolphin).  Again, you do have to pick a default player on the other browsers but after that it won't ask you what player you want to use, it will just play as soon as pick the song you want to preview.  The only difference I've seen is that Firefox downloads the file first. I can tell by the status bar on top...where as the other browsers do not download the file...if they do they're hiding it from the OS as nothing shows up on the status bar.  My suggestion would be to pick the Google Play music app...which I believe is the default anyway unless the user has downloaded other apps.  The only problem with picking other apps is that they take over the interface (full screen) whereas the Google Play music app does not  you still see the VDJ web app in the background.





[attachment deleted by admin]
Fabio Q.
Shooting Star Karaoke

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #6 on: August 20, 2013, 01:55:11 AM »
I forgot to mention...on the basic browser picture you see the Google Play Music app and the INTERNET (which is the basic browser).  If you pick INTERNET it will simply download the file and will not play it.  You will have to manually play it.
Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #7 on: August 20, 2013, 04:34:29 AM »
Quote
Actually they're in both FLV and mp4...for example iPhones and iPad play the mp4 version since iOS doesn't support flash since Steve Jobs decided they were not going to support it...

I forgot about that, YouTube actually had to accommodate the iPhone by offering it in mp4 as well, due to the dispute between Jobs and Adobe... speaking of which I just watched the trailer for the Jobs movie starring Ashton Kutcher... interesting...

As for the player, I'm just learning Android, and I guess most people who have such a device will have already taken care of a "default player", switched browsers, etc... so I think I'll leave it as just a straight MP3 preview. It's really the simplest way to implement it. I don't do any decoding/re-encoding, I just determine (based on bitrate) how many bytes = 20 seconds, and skip past the ID3 tag (so they don't get cover art, etc), and send out the data directly from the mp3 file.

The KISS principle is always a good idea :)

Looking at the log file, you've been busy while I was asleep :)

Once I fully wake up, today I'm going to tackle UPnP head-on, as that's the next hurdle to making this thing work really well without the need for port-forwarding. It would be one thing if my program were intended for use at home, but the vast majority of my customers will be using it on some bar owner's WiFi and won't have that kind of access to the router...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #8 on: August 20, 2013, 07:56:47 AM »
This might be a dumb question, but how do you take a screen shot on Android? That might be handy for marketing when 7.0 is released...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #9 on: August 20, 2013, 09:52:21 AM »
Unfortunately taking a screenshot is not that easy on the Droid X without being rooted you can follow this:

http://www.droid-life.com/2010/07/22/how-to-take-screenshots-with-the-droid-x/

or they do have paid apps that will let you do this without being rooted.

On a Galaxy note 2 there are three ways to do the need to root and without having to buy an app.

Home and Power button at the same time (I believe it's the same as the iPhone and most Android devices after 4.0), Hand Swipe gesture over the screen and the S pen gesture.
Fabio Q.
Shooting Star Karaoke

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #10 on: August 20, 2013, 09:54:59 AM »
I just found a free app to screenshots without the need to be rooted...woo hoo!

https://play.google.com/store/apps/details?id=com.icecoldapps.screenshotultimate&hl=en

Hopefully it works with the Droid X

Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #11 on: August 20, 2013, 10:46:31 AM »
Yeah, I tried that one, doesn't work without root. So, I figured I was gonna do it anyway at some point (can't ever leave well enough alone) so I rooted it :)  I thought I had "bricked" it at one point but it's simple enough to re-flash the original, signed Verizon ROM and then proceed to root it. So I have Android 2.3.5 on here now, with superuser privileges :)

Oh, and I can easily take screenshots now.



[attachment deleted by admin]
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #12 on: August 20, 2013, 12:56:15 PM »
Quote
Yeah, I tried that one, doesn't work without root.

Lier, lier, pants on fire...yup, I just tried it just for kicks...on my other DroidX and and it asks for root access.  I have a second one I use on my desk at work as desk/weather clock.  This one is already rooted and does have a valid ESN.  I didn't send it to you because I dropped it and damaged the screen (see two large dots on attached pics).  I figured since you were going to use it for testing anyway it was probably best to have the better screen.  These dots seem to have gotten larger over the time too.


[attachment deleted by admin]
Fabio Q.
Shooting Star Karaoke

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #13 on: August 20, 2013, 01:03:32 PM »

Speaking of port forwarding using uPnP.  I found the following java app, I'm not suer if it helps you, but it might at least give you some idea.

http://www.howtogeek.com/122227/how-to-quickly-forward-ports-on-your-router-from-a-desktop-application/

Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #14 on: August 20, 2013, 02:08:58 PM »
Yeah, I would definitely opt for the better screen over being able to activate it. For what I need it for, and the reason you sent them to me, this one is perfect. There also might be a way now that it's rooted, to make it into a Tracfone... Tracfone uses CDMA just like Verizon, and with some hacking it seems it can be done (I currently have a crappy LG Tracfone, would love to somehow mimic my EIN/whatever so I keep my # and get to use the Droid :) ) But that's not the point of this, and I have accomplished a lot thanks to the Droid.

I've been too frustrated with UPnP today, but I'll check out that link. In the mean time, to take my mind elsewhere, I added a QR code generator into VDJ. It's not completely perfect yet, but so far by default, it creates a QR of the IP URL for local use. I have to make it where you can set it to a vdj.net URL and save that.

It works though - and very nicely. I think I'll add an option to also include ?passcode=1234 with whatever passcode is currently set, so if you have it up on your screen, or you just want to print it out real quick before each gig, you can quickly do so from within the program. I like the screen idea, as I would personally (for non-Karaoke gigs) bring the monitor for just that purpose. The background image would be the QR code, and the text would just say "Scan with your Smart Phone to Make Requests". No typing, no nonsense.

I'm just using the included "ScanLife" app on the Droid, seems to do a sufficient job.

(BTW, did you know that Motorola paid George Lucas for the right to use the word "Droid"? Just like Apple has trademarked "There's an app for that"...)

Note that if you scan the QR in the attached pic, it'll take you to "http://192.168.1.101/"...

[attachment deleted by admin]
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/