TMediaPlayer background audio controls on iOS (FMX) - firemonkey

In Rad Studio we have the TMedialPlayer control that can play audio. This thread shows to keep the audio playing after the user locks the screen (Project->Options->Version Info-> UIBackgroundModes set to audio).
However, we have no ability to invoke the iOS audio controls (pause, play) on lock screen. Apple will reject any app that plays audio in the background without displaying the audio controls on lock screen and in control center (Apple documentation on controlling background audio).
Anyone have any good ideas on how this can be achieved (using C++ FMX)?
Can the functions mentioned on that Apple documentation page be called from FMX app?
Is there a third party medial control with this capability (to show the apple audio controls)?

Related

Xamarin forms Plugin.MediaManager Android : Video is not visible but audio is playing

I am using Xamarin MediaManager plugin to play videos. Since there is no fullscreen option available in Android. I have created two screens A and B. When I play video in screen A and when user clicks on maximizing the same video I am trying to play it in screen B. Video is playing in screen B no issues, but when I go back from screen B to screen A then i can hear only the audio and the video is stuck. When i click the maximizing again Video is playing fine in Screen B without any issues. I am not getting where I am doing wrong here.
Any help, guidance is much appreciated

Prevent Windows 10 control html5 video playback

I'm working on site that uses video that should not be stopped by user.
But when video is playing I can change system volume and I see system overlay in top-left screen corner where I can click 'pause' and pause video.
Are there any ways to prevent such behavior? I mean via html / js etc.
System: Windows 10
Browser: Chrome + Chrome-based
You cannot control this. Browsers and most operating systems give users the ability to stop media from playing. In the case of Windows 10, it's the OS that allows users to control the media, and there's zero you can do from the JavaScript layer to change that.

How can I find a list of active plugins on a web page in a browser window

Say I open Youtube,and the video starts playing. How do I find out what in-browser and system plugins / resources are being used to play the music / video?
Asking because on my Firefox, about 50% of the time, when I open youtube, it starts playing the audio of the page in the background, even as the video loads. So when the video is playing, there's audio with it, but there's the same audio, with a small delay playing in the background.
I've tried disabling the extra flash plugin that most other guides about this recommend, and it hasn't helped. Now I want to find out what my browser is using to play the background music.
Simplest thing is probably to right-click on the video and check if the menu that appears is the typical Flash rc-menu or the browser native video right-click menu.

How to identify a window playing a video in a browser

I wish to understand how one can programmatically identify if a window is playing video content?
I used spy++ to identify particular attributes for windows playing video but I did not find any particular attributes associated with window playing video.
I have handles to all windows on screen and want to find which ones are playing video ? Could you please throw some light on how can one do this and are there any special properties associated with a window playing video?
I found similar article :
can we get window handle of the window which is playing video?
But I don't want to minimize application , I know user is using browser(ie,firefix,chrome) to watch video (from youtube,hulu)and window is visible on screen.
You can if you have execution privileges over the environment the Flash Player is executed in. You can listen for the playing event thrown by the Flash Player.
Listen for my Flash event in Javascript

IOS Music Control in Background

I am trying to find the solution to have the control of play/pause when my app is playing the own music in Background. I am using AVAudioPlayer and didnĀ“t find the way to implement this controls. When the app is "close" the music play perfectly but I have to open the app again to pause or change music when needed.
Any solution ?
If you're running iOS 4 you can try putting the app in the background whilst playing music, and then pressing the home button twice for the 'multitasking' bar.
Swipe the bar to the right, which shows you the normal playback controls for Music, YouTube, etc.
If you use the AVAudioPlayer I'm quite sure you can use those same controls to control your app's playback of media.
Bryan
*EDIT does using the remote on the iPhone headphones work?

Resources