Audio and Videos not working properly

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
paskr18
Posts: 5
Joined: Mon Oct 01, 2018 12:42 pm

Audio and Videos not working properly

Post by paskr18 » Mon Oct 01, 2018 1:11 pm

Good morning or evening every one,

I am currently encountering an issue while using the LiveCode media player.
I used to worked on the Community Edition 8.1.7 and I have now started working with the Community Edition 9.0.1.
Before my scripts for audio or videos (8.1.7) used to work on development environment and also windows exe. but now my audios work only and development and the videos not anymore. And when I try to generate an apk, the media doesn't work at all.
Here is the code I use for audio:
on mouseUp
if the environment is "mobile" then
put (specialFolderPath("engine") & "/2AF/Audio/Leson 1/haiti chéri pil bel peyi.mp3") into tPath
set the filename of player "AudioPlayer" to tPath
start player "AudioPlayer"
else
put (specialFolderPath("resources") & "/2AF/Audio/Leson 1/haiti chéri pil bel peyi.mp3") into tPath
set the filename of player "AudioPlayer" to tPath
start player "AudioPlayer"
end if
end mouseUp

Here is the one for videos:
if the environment is "mobile" then
put (specialFolderPath("engine") & "/2AF/Videos/Leson 1/Earth_to_Haiti.mp4") into tPath
set the filename of player "VideoPlayer" to tPath
start player "VideoPlayer"
else
put (specialFolderPath("documents") & "/2AF/Videos/Leson 1/Earth_to_Haiti.mp4") into tPath
set the filename of player "VideoPlayer" to tPath
start player "VideoPlayer"
end if


Thanks in advance for any comment.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Audio and Videos not working properly

Post by jacque » Mon Oct 01, 2018 3:39 pm

Some versions of Windows don't include the mp4 codec. You may need to install it.

Also, all resources are in the specialFolderPath "resources" now. The engine folder will redirect to resources but it might help to use resources for all media paths.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Audio and Videos not working properly

Post by Klaus » Mon Oct 01, 2018 4:02 pm

Hi paskr18,

welcome to the forum!
What Jaques said, and "player" objects are not supported on the mobile platform!


Best

Klaus

paskr18
Posts: 5
Joined: Mon Oct 01, 2018 12:42 pm

Re: Audio and Videos not working properly

Post by paskr18 » Mon Oct 01, 2018 5:06 pm

Thanks to both of you for your inputs.

paskr18
Posts: 5
Joined: Mon Oct 01, 2018 12:42 pm

Re: Audio and Videos not working properly

Post by paskr18 » Tue Oct 02, 2018 12:59 pm

Hello Jacque and Klaus,

Thanks to your inputs I was able to find a solution to my issues.

Have a great day.

Post Reply

Return to “Multimedia”