Sound /Volume for Android Native Players

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JereMiami
Posts: 119
Joined: Mon Nov 03, 2014 12:17 am

Sound /Volume for Android Native Players

Post by JereMiami » Sat Jun 18, 2022 10:09 pm

Hey all:

I have a card on android and it works nicely to play videos automatically and in a looping format when the card opens. Here is that code, which is pretty standard stuff:

Code: Select all

           put the rect of grc "video" of tTemp into tRect
               put ("video" && tGroupNo) into fld "playerName" of tTemp
               mobileControlCreate "player", ("video" && tGroupNo)
               mobileControlSet ("video" && tGroupNo), "filename", tVidFile
               mobileControlSet ("video" && tGroupNo), "visible", true
               mobileControlSet ("video" && tGroupNo), "showController", false
               mobileControlSet ("video" && tGroupNo), "looping", true
               mobileControlSet ("video" && tGroupNo), "preserveAspect", true
               mobileControlSet ("video" && tGroupNo), "rect", tRect
My question though is, the video has sound. I don't want sound, but just the video play and looping. I have turned off the native player controls because they are chunky and cover half the video player. So, anyone know how to turn the volume off so that there is no sound?

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

Re: Sound /Volume for Android Native Players

Post by Klaus » Sun Jun 19, 2022 7:52 pm

Hm, looks likesomething like:

Code: Select all

mobilecontrolset xyz,"volume",50
is really missing, at last in the dictionary.

Can't you just set the playloudness to 0 and back to its previous value when the video has finished?
The dictionary indicates that "the playloudness" is available on all platforms, at least worth a try.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”