Page 1 of 1

Audio and Videos not working properly

Posted: Mon Oct 01, 2018 1:11 pm
by paskr18
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.

Re: Audio and Videos not working properly

Posted: Mon Oct 01, 2018 3:39 pm
by jacque
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.

Re: Audio and Videos not working properly

Posted: Mon Oct 01, 2018 4:02 pm
by Klaus
Hi paskr18,

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


Best

Klaus

Re: Audio and Videos not working properly

Posted: Mon Oct 01, 2018 5:06 pm
by paskr18
Thanks to both of you for your inputs.

Re: Audio and Videos not working properly

Posted: Tue Oct 02, 2018 12:59 pm
by paskr18
Hello Jacque and Klaus,

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

Have a great day.