media player doesn't work??
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
media player doesn't work??
Does the media player not work with android devices?
I dragged the media player onto my stack, then was able to add a URL to the file which was a remote MP3. Worked.
I also added a streaming .PLU url from a streaming internet radio station. Worked great.
I createed a mac osx standalone and it worked great.
But when I save as an android app the media object shows up as a blue ugly bar and sits there and does nothing. It won't play.
Is there a special setting for this on android?
I am trying to play an MP3 URL or a PLS url
I dragged the media player onto my stack, then was able to add a URL to the file which was a remote MP3. Worked.
I also added a streaming .PLU url from a streaming internet radio station. Worked great.
I createed a mac osx standalone and it worked great.
But when I save as an android app the media object shows up as a blue ugly bar and sits there and does nothing. It won't play.
Is there a special setting for this on android?
I am trying to play an MP3 URL or a PLS url
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: media player doesn't work??
Hi theshermanator,
Welcome to the forum!
Please do not double post your questions as no one will know which to follow.
Android does not use the media player, look up AndroidPlayer in the dictionary and mobileControlCreate in the Android user notes. You will have to scroll down a few pages to see the Player controls in the notes.
Simon
Welcome to the forum!
Please do not double post your questions as no one will know which to follow.
Android does not use the media player, look up AndroidPlayer in the dictionary and mobileControlCreate in the Android user notes. You will have to scroll down a few pages to see the Player controls in the notes.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
Thanks , sorry about that.
I did try mobileControlCreate however I got a handler not found error .. Do I have to install an additional plugin for this?
I did try mobileControlCreate however I got a handler not found error .. Do I have to install an additional plugin for this?
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
Nevermind my last post
This is what i'm doing:
mobileControlCreate "player", "movie"
put the result into sPlayerID
mobileControlSet sPlayerID, "h t t p : / / u r l t o s e r v e r : 8 0 3 0 /listen.pls", tMoviePath
play sPlayerID
Does this look right?
I'm not getting any errors
But I'm not getting any audio ...
This is what i'm doing:
mobileControlCreate "player", "movie"
put the result into sPlayerID
mobileControlSet sPlayerID, "h t t p : / / u r l t o s e r v e r : 8 0 3 0 /listen.pls", tMoviePath
play sPlayerID
Does this look right?
I'm not getting any errors
But I'm not getting any audio ...
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
actually i'm also getting this error when trying to run the code:
(Handler: can't find handler) near "mobileControlCreate", char 1
(Handler: can't find handler) near "mobileControlCreate", char 1
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: media player doesn't work??
Android does not support .pls:
http://developer.android.com/guide/appe ... rmats.html
(Handler: can't find handler) near "mobileControlCreate", char 1
Only shows up in the IDE as it is a mobile command (not for desktop).
You should have
if the environment is "mobile" then
mobileControlCreate "player"
etc.
Simon
http://developer.android.com/guide/appe ... rmats.html
(Handler: can't find handler) near "mobileControlCreate", char 1
Only shows up in the IDE as it is a mobile command (not for desktop).
You should have
if the environment is "mobile" then
mobileControlCreate "player"
etc.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
I added that in my script:
if enviornment is "mobile" then
mobileControlCreate "player", "movie"
put the result into sPlayerID
mobileControlSet sPlayerID, "h t t p : // w w w . u n i v e r s a l - s o u n d b a n k . c o m /mp3/sounds/22415.mp3", tMoviePath
end if
However nothing plays when I test the app on android
if enviornment is "mobile" then
mobileControlCreate "player", "movie"
put the result into sPlayerID
mobileControlSet sPlayerID, "h t t p : // w w w . u n i v e r s a l - s o u n d b a n k . c o m /mp3/sounds/22415.mp3", tMoviePath
end if
However nothing plays when I test the app on android
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: media player doesn't work??
You have some oddities in there. Look here it's already been discussed:
http://forums.runrev.com/phpBB2/viewtop ... yer#p63321
Simon
http://forums.runrev.com/phpBB2/viewtop ... yer#p63321
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
Thank Simon I tried your example but it will didn't play .... Does this support an mp3 URL verses local file ???
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: media player doesn't work??
Try the local first just to see if you can play it (you have to know the path to it).
I know locals work.
Then try the URL, tell me if it works.
Simon
I know locals work.
Then try the URL, tell me if it works.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
When trying to play a mp3 url I can a playback of a static sound .. which sounds like perhaps it's not supporting the audio compression type? Perhaps converting the mp3 url to mp4 would work? ..
I tried to play a local file without any success
..
I tried to play a local file without any success
..
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
Okay I figured out that it's a compression issue.
Could not play a .mp3 url... However I was SUCCESSFUL at playing an audio file compressed as M4A.
likely could just be due to bitrate or sample rate on the actual file regardless of it's compression. I'm sure there is a way to get around streaming .PLS from an internet radio audio stream .. I'll continue to post my results ..
Could not play a .mp3 url... However I was SUCCESSFUL at playing an audio file compressed as M4A.
likely could just be due to bitrate or sample rate on the actual file regardless of it's compression. I'm sure there is a way to get around streaming .PLS from an internet radio audio stream .. I'll continue to post my results ..
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: media player doesn't work??
Great work!
Keep posting your findings.
Simon
Keep posting your findings.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 11
- Joined: Thu Apr 25, 2013 3:55 am
Re: media player doesn't work??
Fixed!
I found out that you can play .MP3 and any other audio compression via URL but your audio compression must be:
Bit rate: 128 kbps rate
Sample rate: 44.100 HZ sample rate
This is the same for streaming audio such as internet radio
I was successful when playing streaming audio from internet radio. By linking directly to the source feed verses the .PLS file (which probably just confuses the stack as it's looking for audio data not a config file)
For example:
this works: h t t p : / / 6 4 . 7 1 . 1 5 8 . 1 7 2 :8030/
this does not work:h t t p : / / 6 4 . 7 1 . 1 5 8 . 1 7 2 : 8030/listen.pls
I found out that you can play .MP3 and any other audio compression via URL but your audio compression must be:
Bit rate: 128 kbps rate
Sample rate: 44.100 HZ sample rate
This is the same for streaming audio such as internet radio
I was successful when playing streaming audio from internet radio. By linking directly to the source feed verses the .PLS file (which probably just confuses the stack as it's looking for audio data not a config file)
For example:
this works: h t t p : / / 6 4 . 7 1 . 1 5 8 . 1 7 2 :8030/
this does not work:h t t p : / / 6 4 . 7 1 . 1 5 8 . 1 7 2 : 8030/listen.pls