So, I am looking to make a media player that is cross-platform (windows 10 + windows 10 mobile, XBOne, iOS, OSX, and Android), using C# (by far my most proficient language). I need it to remain playing in the background when the user is doing other things (for all but the XBOne). Ideally, I would like to use a cross-platform framework such as Unity, but if that's not possible, I need to know what steps I must take to make my app persist on each platform.
OSX/Windows 10 are easy, but I haven't been able to find absolutely any good information for Android/iOS especially. How does one keep a media player app going in the background on these? I see posts saying a media player that persists is doable, but they never say how.
Related
I'm working on a Unity project that uses the device camera for AR purposes (I'm using AR Foundation). I currently have it set so that the device won't go to sleep (because I want it to operate for long-periods without user-interaction). Specifically, Screen.sleepTImeout = SleepTimeout.NeverSleep. If I didn't have this, then the device would go to sleep, and the program would stop functioning. Does anyone know if there is a way to keep the program working in the background after the device goes to sleep...similar to how music apps keep playing music? I've come up empty handed after a few hours of searching for a solution. Any help would be greatly appreciated!!!
Some people aren't finding this in more recent versions of Unity. But it's still there: In Player settings, under the section "Resolution and Presentation", you find "Resolution" and below that, there's "Run In Background".
This is only available for Web players and standalones (Anything Except IOS And Android Pretty Much), though (you won't find it when you have the iOS, Android or Flash tab selected.
I am writing a C# SDK (to be used by UWP Publishers) and would like to detect if another application (Pandora, Spotify, Amazon Music, etc.) is playing music in the background, so that I can mute my SDK's sounds.
This comment to this question seems to indicate that I can use BackgroundMediaPlayer.IsMediaPlaying(), but when I play Pandora in a web browser, or the Amazon Music App, this method seems to always return false when music is playing in another app.
This answer to this question seems to indicate that we used to be able to use Microsoft.Xna.Framework.Media.MediaPlayer.State to detect if another app was playing background music, but I don't believe this call is not available in UWP (please let me know if I'm wrong -- I mainly care about this working on Desktop and XBox One).
So my question is, how can I determine if another app (on desktop or in web browser or on Windows phone) is playing music?
I believe the BackgroundMediaPlayer.IsMediaPlaying detects audio playing from WinRT/UWP apps only and not Win32 apps. This API was important for apps on Mobile because you were only allowed to have one app with background audio at any given time. I don't think there is a way to detect this for Win32 apps at this time.
The BackgroundMediaPlayer.IsMediaPlaying method is now obsolete. I've noticed that if background music is playing in UWP, calls to Microsoft.Xna.Framework.Media.MediaPlayer.Play succeed but do not actually play any music, so it seems the check is not necessary in some cases.
I'm part of a team porting old WebGL / Cocos2D-JS games into Unity games, but since there's a lot of them, it's taking awhile.
So one of them asks, why not just use Unity's webview (as can be seen here) to show the WebGL games while the Unity versions are under construction?
I went ahead and tried that, running off a PC with Prepros hosting some web games created with Cocos2D, which is then accessed by a link in Unity.
Unfortunately, all I get is a black page (the same web view can open google just fine, for example).
Maybe I'm just doing something wrong, but I'd like to know if this is even possible in the first place.
The objective is to get Unity to play WebGL games on phones while the actual mobile versions of those games are under construction. Can it be done?
Is there a way to rewind/fast forward (or at least start playing at a certain position of a track) a media that is being played (using XNA.Framework.Media.MediaPlayer static instance) from a Media Library integrated application on Windows Phone Mango?
BTW: I have created a feature request on wpdev user voice community, so if you are in need of the similar functionality, go ahead and make a vote: http://wpdev.uservoice.com/forums/110705-app-platform/suggestions/2459380-allow-setting-a-playback-start-position-within-the
In XNA 4.0 there is no real way of doing this using MediaPlayer unless there are undocumented hacks to get it to. But definitely there are no documented ways of doing this with the MediaPlayer class.
I recently purchased an XBox 360 and was first introduced to the term "Media Extender". I didn't realize that windows had the ability to stream content to an XBox and was very surprised and excited. I also noticed that people wrote their own plugins that allowed streaming of, for example, netflix. I would like to know more about how to do this but find it hard to even Google it because I know so little about the terminology (I'm not sure whether the XBox is the "extender" or the "extender" is a plugin that makes the Xbox stream). Can anybody explain this technology to me and perhaps direct me to good getting started reference for building my own plugins (for instance, to stream Pandora to the Xbox)?
An Xbox 360 is a Windows Media Center Extender device, implemented in software on the Xbox. Dedicated hardware implementations exist, such as this, but I don't think they've ever taken off like they were supposed to.
Windows Media Center can be extended via its APIs for building add-ins. Take a look at this Google search.
In my experience (we use this in our lounge) not all plugins seem to work via the Xbox 360 - some work only on the PC.
Hope this helps some.